/* LifeVed Devotional — Premium Reader Component
   Font controls, dark mode, language tabs, video, premium gate */

/* === READER TOOLBAR === */
.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 8px;
    z-index: 50;
}
.reader-toolbar-group { display: flex; align-items: center; gap: 8px; }

/* Font size controls */
.font-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 4px;
}
.font-ctrl button {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.font-ctrl button:hover { background: var(--accent); color: #fff; }
.font-ctrl .fc-label { font-size: 0.7rem; color: var(--text-muted); padding: 0 4px; }

/* Theme toggle */
.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.theme-toggle:hover { background: var(--accent-glow); }

/* === LANGUAGE TABS === */
.lang-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 4px;
}
.lang-tab {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.lang-tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(230,81,0,0.25); }

/* === READER CONTENT === */
.reader-content {
    transition: font-size 0.2s;
}
.reader-verse-block {
    padding: 24px 20px;
    background: linear-gradient(160deg, #fffcf6, #fef8ee);
    border: 1px solid rgba(198,153,62,0.15);
    border-radius: var(--radius-lg);
    position: relative;
    margin-bottom: 16px;
}
.reader-verse-block::before, .reader-verse-block::after {
    content: '॥';
    position: absolute;
    font-size: 1.3rem;
    color: var(--temple-gold);
    opacity: 0.35;
}
.reader-verse-block::before { top: 8px; left: 14px; }
.reader-verse-block::after { bottom: 8px; right: 14px; }

.reader-line {
    padding: 8px 0;
    line-height: 2;
    color: var(--text-hindi);
    border-bottom: 1px dotted rgba(198,153,62,0.12);
}
.reader-line:last-child { border-bottom: none; }
.reader-content.translit .reader-line { font-style: italic; color: var(--text-secondary); }

/* Verse with meaning */
.verse-meaning-pair { margin-bottom: 20px; }
.verse-meaning-pair .vm-verse {
    padding: 16px 20px;
    background: linear-gradient(160deg, #fffcf6, #fef8ee);
    border: 1px solid rgba(198,153,62,0.15);
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 600;
    color: var(--text-hindi);
    line-height: 1.9;
}
.verse-meaning-pair .vm-meaning {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid rgba(198,153,62,0.12);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}
.vm-meaning .vm-hi { font-size: 0.9rem; color: var(--text-primary); margin-bottom: 6px; }
.vm-meaning .vm-en { font-size: 0.85rem; color: var(--text-secondary); font-style: italic; }
.vm-meaning .vm-label { font-size: 0.7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }

/* === DARK MODE (reader scoped) === */
.reader-dark {
    background: #1a1510 !important;
    border-radius: var(--radius-lg);
    padding: 16px;
}
.reader-dark .reader-verse-block,
.reader-dark .vm-verse {
    background: #221c14 !important;
    border-color: rgba(255,210,122,0.15) !important;
}
.reader-dark .reader-line,
.reader-dark .vm-verse { color: #fde8c8 !important; }
.reader-dark .vm-meaning { background: #161109 !important; }
.reader-dark .vm-meaning .vm-hi { color: #f0e0c8 !important; }
.reader-dark .reader-verse-block::before,
.reader-dark .reader-verse-block::after { color: #ffd27a; }

/* === VIDEO SECTION === */
.video-section { margin: 24px 0; }
.video-section h3 { font-size: 1rem; margin-bottom: 12px; }
.video-frame {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Video coming soon placeholder */
.video-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff5e6, #fef0db);
    border: 2px dashed rgba(230,81,0,0.25);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-muted);
}
.video-coming-soon .vcs-icon { font-size: 2.5rem; margin-bottom: 8px; opacity: 0.6; }
.video-coming-soon .vcs-title { font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.video-coming-soon .vcs-sub { font-size: 0.8rem; }

/* === PREMIUM GATE === */
.premium-gate-card {
    text-align: center;
    padding: 40px 24px;
    background: linear-gradient(160deg, #fffaf2, #fef3e2);
    border: 2px solid rgba(230,81,0,0.2);
    border-radius: var(--radius-xl);
    margin: 24px 0;
}
.premium-gate-icon { font-size: 3rem; margin-bottom: 12px; }
.premium-gate-title { font-size: 1.3rem; margin-bottom: 8px; color: var(--text-primary); }
.premium-gate-text { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; max-width: 420px; margin: 0 auto 20px; }
.premium-gate-btn { margin-bottom: 12px; }
.premium-gate-login { font-size: 0.85rem; color: var(--text-muted); }
.premium-gate-note { margin-top: 12px; font-size: 0.75rem; color: var(--text-muted); }

/* === ACCESS BADGES === */
.access-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}
.access-free { background: rgba(46,125,50,0.1); color: #2e7d32; border: 1px solid rgba(46,125,50,0.2); }
.access-premium { background: linear-gradient(135deg, rgba(230,81,0,0.1), rgba(198,153,62,0.1)); color: var(--accent); border: 1px solid rgba(230,81,0,0.2); }

/* Lock overlay on listing items */
.content-item.locked { position: relative; opacity: 0.85; }
.content-item.locked .lock-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1rem;
}

/* === AUTO-SCROLL === */
.autoscroll-active { scroll-behavior: smooth; }
.autoscroll-btn.active { background: var(--accent); color: #fff; }

/* Mobile reader optimizations */
@media (max-width: 640px) {
    .reader-toolbar { padding: 10px 12px; gap: 8px; }
    .lang-tab { padding: 8px 12px; font-size: 0.8rem; }
    .reader-line { line-height: 2.1; }
    .reader-verse-block { padding: 20px 16px; }
}

/* === DEITY HERO BANNER (premium detail header) === */
.reader-hero {
    position: relative;
    border-radius: var(--radius-xl, 22px);
    overflow: hidden;
    background-size: cover;
    background-position: center 22%;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    margin: 8px 0 18px;
    box-shadow: 0 10px 34px rgba(80,40,0,0.18);
}
.reader-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120px 120px at 88% 18%, rgba(255,210,122,0.28), transparent 70%);
    pointer-events: none;
}
.reader-hero-inner {
    position: relative;
    z-index: 1;
    padding: 18px 20px 20px;
    width: 100%;
    color: #fff;
}
.reader-hero-om {
    display: inline-block;
    font-size: 1.6rem;
    color: #ffd27a;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 4px;
}
.reader-hero-title {
    font-family: Georgia, 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 8px;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.6);
}
.reader-hero-deity {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}
@media (max-width: 640px) {
    .reader-hero { min-height: 168px; }
    .reader-hero-title { font-size: 1.25rem; }
}

/* === Refined verse ornament (top lamp) === */
.reader-verse-block {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}
.reader-verse-block .reader-line:first-child {
    font-weight: 600;
}

/* First-letter drop accent for transliteration readability is skipped to keep Devanagari clean */

/* === SCRIPTURE READER === */
.scr-progress { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin: 10px 0 14px; }
.scr-verse {
    position: relative;
    padding: 18px 18px 16px;
    background: linear-gradient(160deg, #fffcf6, #fef8ee);
    border: 1px solid rgba(198,153,62,0.18);
    border-radius: var(--radius, 16px);
    margin-bottom: 14px;
}
.scr-shloka { line-height: 2; color: var(--text-hindi, #2d1b0e); font-weight: 500; }
.scr-meaning { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(198,153,62,0.3); }
.scr-meaning .vm-hi { font-size: 0.92rem; color: var(--text-primary); margin-bottom: 6px; line-height: 1.7; }
.scr-meaning .vm-en { font-size: 0.88rem; color: var(--text-secondary); font-style: italic; line-height: 1.6; }
.scr-meaning .vm-label { font-size: 0.7rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }

.scr-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0; }
.scr-pg { background: var(--accent); color: #fff; padding: 11px 18px; border-radius: 50px; font-weight: 600; font-size: 0.85rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.scr-pg.disabled { background: var(--bg-secondary); color: var(--text-muted); pointer-events: none; }
.scr-pg-info { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }

.scr-chapter-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.scr-chap-btn { flex: 1; min-width: 140px; text-align: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 0.82rem; font-weight: 600; color: var(--text-primary); text-decoration: none; transition: all 0.2s; }
.scr-chap-btn:hover { border-color: var(--accent); background: var(--accent-glow); }

/* === ENHANCED SCRIPTURE VERSE CARDS === */
.scr-verse {
    position: relative;
    padding: 20px 18px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration);
}
.scr-verse:hover { box-shadow: var(--shadow-md); border-left-color: var(--temple-gold); }
.scr-shloka {
    font-size: 1.15rem;
    line-height: 2.1;
    color: var(--text-hindi);
    font-weight: 500;
    padding-bottom: 4px;
}
.scr-translit {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    padding: 10px 0;
    border-top: 1px dashed var(--border);
    margin-top: 10px;
}
.scr-meaning {
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}
.scr-meaning .vm-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 4px;
}
.scr-meaning .vm-hi {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.scr-meaning .vm-en {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
}
.scr-explanation summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    padding: 6px 0;
}
.scr-explanation[open] summary { margin-bottom: 8px; }
.scr-explanation p {
    font-size: 0.88rem;
    line-height: 1.7;
}

/* Progress bar at top */
.scr-progress {
    text-align: center;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-md);
}

/* Enhanced pager */
.scr-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: var(--space-md) 0;
}
.scr-pg {
    padding: 12px 22px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    transition: all var(--duration);
}
.scr-pg:not(.disabled) { background: var(--accent-gradient); color: #fff; box-shadow: var(--shadow-glow); }
.scr-pg:not(.disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,82,10,0.25); }
.scr-pg.disabled { background: var(--bg-secondary); color: var(--text-muted); pointer-events: none; }

/* Chapter navigation */
.scr-chapter-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: var(--space-md) 0;
}
.scr-chap-btn {
    text-align: center;
    padding: 14px 12px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--duration);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scr-chap-btn:hover { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }
