/* Styl narzędzia MediaLab Online. */
.tool { padding-top: 32px; padding-bottom: 24px; }
.tool .card { margin-top: 20px; }
.tool .card + .card { margin-top: 20px; }
.tool h2 { margin-bottom: 0.7em; }

.drop { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 32px 20px; text-align: center; background: var(--surface-2); transition: border-color 0.15s, background 0.15s; }
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-title { font-size: 1.2rem; font-weight: 650; margin: 0 0 4px; }
.drop-or { margin: 0 0 8px; }
.drop-hint { margin: 14px 0 0; }
.drop[hidden] { display: none; }

.fileinfo .facts { margin-bottom: 16px; }
.warnings:empty { display: none; }
.warnings { margin-top: 14px; display: grid; gap: 10px; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs [role="tab"] { appearance: none; flex: 1 1 auto; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 9px; cursor: pointer; min-height: 44px; }
.tabs [role="tab"]:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.18); color: var(--accent-text); }
.tabs [role="tab"][aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

fieldset.choices { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.choices legend { font-weight: 650; padding: 0; margin-bottom: 8px; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.choice { position: relative; display: block; margin: 0; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-body { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--surface); cursor: pointer; }
.choice-body strong { font-size: 1rem; }
.choice-body .muted { line-height: 1.35; }
.choice:hover .choice-body { border-color: var(--accent); }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input:disabled + .choice-body { opacity: 0.5; cursor: not-allowed; border-style: dashed; }
.choice input:disabled + .choice-body:hover { border-color: var(--border-strong); }
fieldset[disabled] .choice-body { opacity: 0.5; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; flex: 1 1 160px; }
.field label { font-weight: 600; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; }
select, input[type="text"], input[type="number"] { font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; min-height: 46px; width: 100%; max-width: 100%; }
select:hover, input:hover { border-color: var(--accent); }
.field-error { color: var(--danger); font-weight: 600; min-height: 0; margin: 0 0 10px; }
.field-error:empty { display: none; }

.bar { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 16px 0 8px; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 999px; transition: width 0.25s ease-out; }
.bar.indeterminate .bar-fill { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bar.indeterminate .bar-fill { animation: none; width: 100%; opacity: 0.5; } .bar-fill { transition: none; } }

.result .facts { margin-bottom: 16px; }
.preview { margin: 0 0 18px; }
.preview audio, .preview video { width: 100%; max-height: 360px; border-radius: 12px; background: #000; }
.preview audio { background: transparent; }
.preview img { max-height: 320px; border-radius: 12px; border: 1px solid var(--border); }
.tech { margin: 14px 0; }
.tech pre { white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); margin: 0 0 12px; max-height: 240px; overflow: auto; }
[hidden] { display: none !important; }
