/* audio-converter.css — Audio Converter tool (MS-494).
 * Layers on top of the cosmic shell (css/cosmic-shell.css). Uses the shell theme
 * tokens (--ink, --sub, --accent, --line, --bg/2/3) so it is light/dark aware by
 * construction. All selectors are scoped to .ac-* to avoid leaking into the shell. */

.ac-shell {
  max-width: 760px;
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Access / usage bar ─────────────────────────────────────────────────── */
/* The shared .vr-access bar — copied verbatim from css/vocal-cosmic.css so this
   page's access bar is pixel-identical to Vocal Remover / Chord Analyzer without
   pulling in VR's whole stylesheet. Bottom margin dropped: .ac-shell's gap owns
   the vertical rhythm here. */
.vr-access {
  display: flex; align-items: center; gap: 10px; max-width: 760px;
  margin: 0 auto; padding: 11px 16px; border-radius: 12px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--surface-2, color-mix(in srgb, var(--bg2) 70%, transparent));
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.vr-access.ok { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.vr-access svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.vr-access a { color: var(--accent); font-weight: 600; }

/* ── Drop zone ──────────────────────────────────────────────────────────── */
.ac-drop {
  border: 1.6px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg2) 40%, transparent);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  outline: none;
}
.ac-drop:hover,
.ac-drop:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ac-drop.is-drag {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translateY(-1px);
}
.ac-drop__icon { color: var(--accent); margin-bottom: 6px; }
.ac-drop__title { margin: 4px 0 2px; font: 600 17px/1.3 var(--font-display, system-ui); color: var(--ink); }
.ac-drop__sub { margin: 0 0 8px; color: var(--sub); font-size: 13.5px; }
.ac-drop__formats {
  margin: 0; color: var(--sub); opacity: .8;
  font: 500 11.5px/1.5 var(--font-mono, ui-monospace, monospace);
  letter-spacing: .02em;
}
.ac-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.ac-link:hover { border-bottom-color: var(--accent); }

/* ── Options ────────────────────────────────────────────────────────────── */
.ac-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.ac-field { display: flex; flex-direction: column; gap: 6px; }
.ac-field > label {
  font: 600 11px/1 var(--font-body, system-ui, sans-serif);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sub);
}
.ac-select-wrap { position: relative; }
.ac-select-wrap::after {
  content: "";
  position: absolute; right: 13px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.ac-select-wrap select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 42px; padding: 0 34px 0 13px;
  border: 1px solid var(--line); border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  color: var(--ink); font: 500 14px/1 var(--font-body, system-ui, sans-serif);
  cursor: pointer; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ac-select-wrap select:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ac-select-wrap select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
/* Native option lists render on a system (usually light) surface — force dark ink. */
.ac-select-wrap select option,
.ac-select-wrap select optgroup { color: #111; }

/* ── Quality guidance note ──────────────────────────────────────────────── */
.ac-note {
  padding: 11px 14px;
  border-radius: 12px;
  font: 500 13px/1.5 var(--font-body, system-ui, sans-serif);
  border: 1px solid var(--line);
  color: var(--ink);
  background: color-mix(in srgb, var(--bg2) 45%, transparent);
}
.ac-note--info { border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.ac-note--caution {
  border-color: color-mix(in srgb, #d9a441 55%, var(--line));
  background: color-mix(in srgb, #d9a441 10%, transparent);
}
.ac-note--warn {
  border-color: color-mix(in srgb, #e0603e 55%, var(--line));
  background: color-mix(in srgb, #e0603e 11%, transparent);
}

/* ── Actions ────────────────────────────────────────────────────────────── */
.ac-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  height: 44px; padding: 0 22px; border-radius: 12px;
  font: 600 14.5px/1 var(--font-body, system-ui, sans-serif);
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.ac-btn--primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 12px 30px -14px color-mix(in srgb, var(--accent) 90%, black);
}
.ac-btn--primary:hover:not(:disabled) { transform: translateY(-1px); }
.ac-btn--primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.ac-btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.ac-btn--ghost:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ac-engine { color: var(--sub); font-size: 13px; }
.ac-engine--busy::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px;
  vertical-align: -1px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
  animation: ac-spin .7s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* ── Queue ──────────────────────────────────────────────────────────────── */
.ac-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ac-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--bg2) 52%, transparent);
}
.ac-item--done { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ac-item--error { border-color: color-mix(in srgb, #e0603e 50%, var(--line)); }
.ac-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-item__name {
  font: 600 14px/1.3 var(--font-body, system-ui, sans-serif); color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ac-item__meta { font: 500 11.5px/1.2 var(--font-mono, ui-monospace, monospace); color: var(--sub); letter-spacing: .02em; }
.ac-item__status { display: flex; align-items: center; gap: 10px; min-width: 120px; justify-content: flex-end; }
.ac-item__wait { color: var(--sub); font-size: 12.5px; }
.ac-item__err { color: #e0603e; font-size: 12.5px; max-width: 220px; text-align: right; }
.ac-bar { width: 90px; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 12%, transparent); overflow: hidden; }
.ac-bar__fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s ease; }
.ac-item__pct { font: 600 12px/1 var(--font-mono, ui-monospace, monospace); color: var(--sub); min-width: 34px; text-align: right; }
.ac-dl {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font: 600 13px/1 var(--font-body, system-ui, sans-serif);
  text-decoration: none; padding: 7px 12px; border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  transition: background .15s ease;
}
.ac-dl:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ac-item__remove {
  border: 0; background: none; cursor: pointer; color: var(--sub);
  width: 26px; height: 26px; border-radius: 8px; font-size: 20px; line-height: 1;
  flex: 0 0 auto;
}
.ac-item__remove:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }

/* ── Modal (limit / login) ──────────────────────────────────────────────── */
.ac-modal { position: fixed; inset: 0; z-index: 7200; display: grid; place-items: center; padding: 20px; }
.ac-modal__backdrop { position: absolute; inset: 0; background: rgba(6, 6, 14, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ac-modal__card {
  position: relative; z-index: 1; width: min(420px, 100%);
  background: color-mix(in srgb, var(--bg2) 92%, var(--bg));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 24px 24px; text-align: center;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7);
  color: var(--ink);
}
.ac-modal__x { position: absolute; top: 12px; right: 12px; border: 0; background: none; cursor: pointer; color: var(--sub); font-size: 22px; line-height: 1; width: 30px; height: 30px; border-radius: 8px; }
.ac-modal__x:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.ac-modal__title { margin: 4px 0 10px; font: 600 21px/1.2 var(--font-display, system-ui); }
.ac-modal__body { margin: 0 0 20px; color: var(--sub); font-size: 14.5px; line-height: 1.55; }
.ac-modal__cta { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ── noscript ───────────────────────────────────────────────────────────── */
.ac-noscript { max-width: 620px; margin: 40px auto; text-align: center; color: var(--ink, #eee); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .ac-drop { padding: 30px 16px; }
  .ac-options { grid-template-columns: 1fr 1fr; }
  .ac-actions { gap: 10px; }
  .ac-btn { flex: 1; }
  .ac-engine { flex-basis: 100%; }
  .ac-item__status { min-width: 96px; }
  .ac-item__err { max-width: 140px; }
}
