/* ═══════════════════════════════════════════════════════════════
   V2-SHARED.CSS — Common navigation, body, loading styles
   Shared across preview_v2, path_v2, cast_v2, play_v2
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Body Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.v2-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }


/* ═══════════════════════════════════════════════════════════════
   NAV BAR — Common toolbar across all inner screens
   ═══════════════════════════════════════════════════════════════ */

.v2-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    height: 52px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.v2-nav-inner {
    width: 100%;
    max-width: var(--llos-content-max, 1440px);
    margin: 0 auto;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Back button */
.v2-back-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #475569;
    transition: all 0.2s;
    flex-shrink: 0;
}
.v2-back-btn:hover { background: #f1f5f9; color: #0f172a; }

/* Brand: [L] LLOS.ai */
.v2-brand { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.v2-logo-mark {
    width: 28px; height: 28px;
    background: #0f172a;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 900; font-size: 14px;
}
.v2-logo-text { font-size: 15px; font-weight: 800; color: #0f172a; }
.v2-accent { color: #3b82f6; }

/* Separator */
.v2-nav-sep {
    width: 1px; height: 18px;
    background: #e2e8f0;
    flex-shrink: 0;
}

/* Page title */
.v2-nav-title {
    font-size: 12px; font-weight: 600;
    color: #475569;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Flex spacer */
.v2-spacer { flex: 1; }

/* Step pill (Step 1 of 3) */
.v2-step-pill {
    font-size: 10px; font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #eff6ff;
    color: #3b82f6;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Workflow badge (EN → HI) */
.v2-badge {
    font-size: 10px; font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: #ecfdf5;
    color: #059669;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Icon button (settings, etc.) */
.v2-icon-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #64748b;
    transition: all 0.2s;
    flex-shrink: 0;
}
.v2-icon-btn:hover { background: #f1f5f9; color: #0f172a; }

/* Exit button */
.v2-exit-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
    color: #94a3b8;
    transition: all 0.2s; flex-shrink: 0;
}
.v2-exit-btn:hover { background: #fef2f2; color: #dc2626; }
.v2-exit-label { display: inline; }


/* ═══════════════════════════════════════════════════════════════
   LOADING OVERLAY — Shared spinner + message
   ═══════════════════════════════════════════════════════════════ */

.v2-loading {
    position: fixed; inset: 0;
    background: rgba(241,245,249,0.95);
    backdrop-filter: blur(6px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; z-index: 200;
    transition: opacity 0.3s;
}
.v2-loading.hidden { opacity: 0; pointer-events: none; visibility: hidden; }
.v2-loading p { font-size: 13px; font-weight: 500; color: #94a3b8; }

.v2-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: v2-spin 0.7s linear infinite;
}
@keyframes v2-spin { to { transform: rotate(360deg); } }


/* ═══════════════════════════════════════════════════════════════
   NAV TABS — Used in player page
   ═══════════════════════════════════════════════════════════════ */

.v2-tabs {
    display: flex;
    gap: 2px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
}
.v2-tab {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.v2-tab.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.v2-tab:hover:not(.active) { color: #0f172a; }


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Nav adjustments
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .v2-nav-sep { display: none; }
    .v2-exit-label { display: none; }
    .v2-nav-title { font-size: 11px; }
}

@media (max-width: 479px) {
    .v2-brand { display: none; }
    .v2-step-pill { font-size: 9px; padding: 2px 8px; }
    .v2-tabs { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
