/* video.css — LK Forge Video suite. Loaded after shared.css + converters.css.
 * Overrides the accent to a media violet and adds the converter UI components
 * (dropzone, options, progress, result, hub cards). */

:root {
  --accent: #7c3aed;        /* violet-600 — the Video suite identity */
  --accent-weak: #ede9fe;   /* violet-100 */
}

/* ── Dropzone ──────────────────────────────────────────────────────── */
.vid-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center;
  border: 2px dashed var(--border, #cdd1f0); border-radius: var(--radius-lg, 14px);
  background: var(--surface, #fff);
  padding: 40px 20px; min-height: 150px; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.vid-drop:hover, .vid-drop:focus-visible { border-color: var(--accent); outline: none; }
.vid-drop.drag { border-color: var(--accent); background: var(--accent-weak); }
.vid-drop.has-file { border-style: solid; border-color: var(--accent); }
.vid-drop-icon { width: 40px; height: 40px; color: var(--accent); }
.vid-drop-title { font-weight: 700; color: var(--text-primary, #14152e); font-size: 1.02rem; }
.vid-drop-sub { font-size: .86rem; color: var(--text-muted, #5a5f7a); }
.vid-file-info {
  display: none; margin-top: 14px; font-size: .9rem; font-weight: 600;
  color: var(--accent); word-break: break-all;
}

/* ── Option controls ───────────────────────────────────────────────── */
.vid-controls { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0 4px; }
.vid-opt { display: flex; flex-direction: column; gap: 5px; }
.vid-opt-label { font-size: .8rem; font-weight: 600; color: var(--text-muted, #5a5f7a); }
.vid-select, .vid-text {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border, #cdd1f0);
  border-radius: 8px; background: #fff; color: var(--text-primary, #14152e); min-width: 150px;
}
.vid-select:focus, .vid-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

.vid-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.btn-convert { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-convert:disabled { opacity: .5; cursor: not-allowed; }

/* ── Progress ──────────────────────────────────────────────────────── */
.vid-progress { display: none; margin-top: 20px; }
.vid-phase { font-size: .9rem; font-weight: 600; color: var(--text-primary, #14152e); margin-bottom: 8px; }
.vid-bar-track { height: 10px; background: var(--accent-weak); border-radius: 999px; overflow: hidden; }
.vid-bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s ease; }
.vid-bar.indeterminate { animation: vidSlide 1.1s ease-in-out infinite; }
@keyframes vidSlide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ── Result ────────────────────────────────────────────────────────── */
.vid-result { display: none; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--border, #cdd1f0); }
.vid-preview { display: flex; justify-content: center; margin-bottom: 16px; }
.vid-preview-media { max-width: 100%; max-height: 360px; border-radius: 10px; background: #000; }
.vid-preview audio.vid-preview-media { background: transparent; width: 100%; }
.vid-result-meta { font-size: .85rem; color: var(--text-muted, #5a5f7a); margin-bottom: 12px; text-align: center; }
.vid-error {
  display: none; margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: #fdecec; color: #b02a2a; font-size: .9rem; font-weight: 600;
}

/* ── Privacy note ──────────────────────────────────────────────────── */
.vid-note {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 16px;
  font-size: .84rem; color: var(--text-muted, #5a5f7a); line-height: 1.5;
}
.vid-note svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--accent); margin-top: 1px; }

/* ── Hub grid ──────────────────────────────────────────────────────── */
.vid-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.vid-hub-card {
  display: block; background: var(--surface, #fff); border: 1px solid var(--border, #cdd1f0);
  border-radius: var(--radius-lg, 14px); padding: 20px; text-decoration: none;
  box-shadow: var(--shadow, 0 1px 3px rgba(20,21,46,.08)); transition: all .18s ease;
}
.vid-hub-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,21,46,.14); }
.vid-hub-card h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: var(--text-primary, #14152e); }
.vid-hub-card p { margin: 0; font-size: .85rem; color: var(--text-muted, #5a5f7a); line-height: 1.5; }
.vid-hub-group { margin-top: 34px; }
.vid-hub-group > h2 { font-size: 1.15rem; margin: 0 0 16px; color: var(--text-primary, #14152e); }

/* ── Sectioned nav + left rail (video, 2026-08-16) ───────────────────
   Sections >=680, rail >=900 (200px); hamburger below 680. Crawlable anchors. */
.nav-group { position: relative; display: none; align-items: center; }
.nav-group-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
  color: var(--text); background: transparent; cursor: pointer; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .1s;
}
.nav-group-btn .caret { font-size: .9em; transition: transform .18s; }
.nav-group-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.nav-group-btn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-group-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.nav-group.is-current .nav-group-btn { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.nav-group-menu {
  display: none; position: absolute; left: 0; top: calc(100% + 8px);
  flex-direction: column; gap: 2px; min-width: 210px; max-height: 76vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.14); z-index: 200;
}
.nav-group.open .nav-group-menu { display: flex; }
@media (hover: hover) { .nav-group:hover .nav-group-menu { display: flex; } }
.nav-group-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; text-decoration: none; }
.nav-group-menu a:hover { background: var(--accent); color: #fff; text-decoration: none; }
.nav-group-menu a.active { background: var(--accent); color: #fff; }

.calc-layout { display: block; }
.calc-rail { display: none; }
.calc-content { min-width: 0; }
.rail-title { font-family: 'Orbitron', sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 6px 10px 4px; }
.rail-group { margin-top: 8px; }
.rail-group-label { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.rail-link { display: block; padding: 8px 10px; border-radius: 8px; font-size: .86rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.rail-link:hover { background: var(--surface2); text-decoration: none; }
.rail-link.active { background: var(--accent); color: #fff; }

@media (min-width: 680px) { .site-header .site-nav .nav-group { display: inline-flex; } }
@media (min-width: 900px) {
  .calc-layout { display: flex; align-items: flex-start; }
  .calc-rail {
    display: block; position: sticky; top: 57px; align-self: flex-start;
    flex: 0 0 200px; width: 200px; height: calc(100vh - 57px); overflow-y: auto;
    background: var(--surface); padding: 16px 12px 32px;
  }
  .calc-rail::-webkit-scrollbar { width: 8px; }
  .calc-rail::-webkit-scrollbar-track { background: transparent; }
  .calc-rail::-webkit-scrollbar-thumb { background: rgba(51, 65, 85, 0.35); border-radius: 999px; }
  .calc-rail.no-scroll::after {
    content: ""; position: absolute; top: 48px; right: 0; height: calc((100vh - 129px) / 4);
    width: 8px; border-radius: 999px; background: rgba(51, 65, 85, 0.22); pointer-events: none;
  }
  .calc-content { flex: 1 1 auto; }
}
