/* =========================================================
   Audio-Konverter – Styles (Basis: assets/css/tool-ui.css)
   ========================================================= */
.ac { display: grid; gap: 20px; }
.ac .tu-card__head { flex-wrap: wrap; }
.ac-drop { position: relative; display: grid; justify-items: center; gap: 8px; padding: 34px 20px; border-radius: 16px; text-align: center; cursor: pointer; background: #fff; border: 2px dashed rgba(15,19,48,.15); transition: border-color .2s, background .2s; }
.ac-drop:hover, .ac-drop.is-drop { border-color: var(--violet); background: rgba(155,123,255,.05); }
.ac-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ac-drop:focus-within { outline: 2px solid #8fa8ff; outline-offset: 2px; }
.ac-drop strong { color: var(--ink); }
.ac-drop > span:last-child { font-size: 13px; color: var(--muted); }
.ac-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: rgba(91,140,255,.08); overflow-wrap: anywhere; }
.ac-status[hidden], .ac-source[hidden], .ac #acMain[hidden] { display: none; }
.ac-status[data-level="err"] { background: rgba(209,52,56,.08); color: #8f1f1a; }
.ac-spin { width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; border: 2.5px solid rgba(91,140,255,.25); border-top-color: var(--blue); animation: acSpin .8s linear infinite; }
@keyframes acSpin { to { transform: rotate(360deg); } }

.ac-source { margin-top: 18px; display: grid; gap: 14px; }
.ac-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 18px; }
.ac-facts div { min-width: 0; }
.ac-facts dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.ac-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ac-facts small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ac-facts--small { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0; }
.ac-wave { position: relative; height: 96px; border-radius: 12px; background: #0f1330; overflow: hidden; cursor: crosshair; touch-action: none; }
.ac-wave canvas { display: block; width: 100%; height: 100%; color: rgba(143,168,255,.85); }
.ac-sel { position: absolute; top: 0; bottom: 0; background: rgba(91,140,255,.22); border-left: 2px solid var(--blue); border-right: 2px solid var(--blue); pointer-events: none; }
.ac-trim { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)) auto; gap: 12px; align-items: end; }
.ac-trim .tu-field { margin: 0; }
.ac #acTrimReset { justify-self: start; }
.ac #acTrimReset[hidden] { display: none; }
.ac-player { width: 100%; height: 40px; }
.ac-player[hidden] { display: none; }

.ac-formats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.ac-format { position: relative; cursor: pointer; }
.ac-format input { position: absolute; opacity: 0; pointer-events: none; }
.ac-format span { display: grid; gap: 3px; height: 100%; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1.5px solid rgba(15,19,48,.1); transition: border-color .2s, background .2s; }
.ac-format b { font-size: 15px; color: var(--ink); }
.ac-format small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.ac-format input:checked + span { border-color: var(--blue); background: rgba(91,140,255,.07); box-shadow: 0 0 0 3px rgba(91,140,255,.15); }
.ac-format input:focus-visible + span { outline: 2px solid #8fa8ff; outline-offset: 2px; }
.ac-format.is-off { cursor: not-allowed; opacity: .55; }
.ac .tu-field[hidden] { display: none; }
.ac .tu-switch small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ac-hints { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.ac-hints li { padding: 8px 12px; border-radius: 10px; font-size: 13px; background: rgba(91,140,255,.07); }
.ac-hints li[data-level="warn"] { background: rgba(232,150,72,.12); color: #8a4a12; }
.ac-hints li[data-level="err"] { background: rgba(209,52,56,.08); color: #8f1f1a; }
.ac-hints li[data-level="est"] { background: none; padding: 2px 0; color: var(--muted); }
.ac-go { margin-top: 16px; height: 50px; padding: 0 28px; font-size: 15px; }
.ac-go:disabled { opacity: .55; cursor: default; }
.ac-progress { position: relative; height: 30px; margin-top: 14px; border-radius: 10px; overflow: hidden; background: rgba(91,140,255,.1); }
.ac-progress[hidden] { display: none; }
.ac-progress__bar { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: linear-gradient(90deg, rgba(91,140,255,.35), rgba(155,123,255,.35)); transition: width .25s; }
.ac-progress__text { position: relative; display: block; padding: 0 12px; line-height: 30px; font-size: 13px; font-weight: 600; color: var(--ink); }

.ac-empty { margin: 0; font-size: 14px; color: var(--muted); }
.ac-empty--err { color: var(--err); }
.ac-file { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.ac-file__icon { display: grid; place-items: center; height: 52px; border-radius: 12px; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(140deg, var(--blue), var(--violet)); }
.ac-file__name b { display: block; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.ac-file__name small { font-size: 12.5px; color: var(--muted); }
.ac-dl { width: 100%; justify-content: center; margin-top: 12px; }
.ac.is-busy .ac-result { opacity: .5; }

@media (max-width: 1100px) { .ac-formats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ac-formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ac-trim { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ac-trim .tu-btn { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .ac-spin { animation-duration: 2.4s; } }
