/* ═══════════════════════════════════════════
   VERSE PAGE — Spiritual Luxury Web App
   ═══════════════════════════════════════════ */

/* ── Page Shell ── */
.verse-page {
    /* No need to set background/fonts here, styles.css body does it */
    min-height: 100vh;
}

/* ── Main Content (The Centered Reading Spine) ── */
.verse-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 48px 24px 160px; /* Extra bottom padding for floating AI */
}

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 32px;
    font-weight: 500;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

.breadcrumb .sep {
    opacity: 0.5;
}

/* ── Page Title ── */
.verse-page h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 3.4rem); /* Larger, more deliberate */
    font-weight: 500;
    margin: 0 0 16px;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.verse-ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-badge);
    border: 1px solid var(--border-badge);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-badge);
    margin-bottom: 48px;
    font-family: var(--font-sans);
    letter-spacing: 0.05em; /* Touch of tracking for the small badge */
}

/* ── Verse Cards (Progressive Reading Flow) ── */
.verse-card {
    margin-bottom: 32px; /* Increased breathing room */
    position: relative;
    padding: 24px 24px 24px 32px; /* More padding on the left to accommodate the quote */
    background: transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* KJV Original (Archaic & Foundational) */
.card-kjv {
    background: var(--bg-kjv);
    border-left: 3px solid rgba(175, 175, 175, 0.4);
}

.card-kjv .card-label {
    color: var(--text-tertiary);
}

.card-kjv .card-text {
    position: relative;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.85; /* Luxurious reading line-height */
    color: var(--text-secondary);
}

/* Hanging quote for KJV */
.card-kjv .card-text::before {
    content: "“";
    position: absolute;
    left: -20px;
    top: -8px;
    font-family: inherit;
    font-size: 2.4rem;
    color: rgba(175, 175, 175, 0.3);
    line-height: 1;
}

/* Made Simple (The Core Focus) */
.card-simple {
    border-left: 3px solid var(--accent);
}

.card-simple .card-text {
    position: relative;
    font-family: var(--font-serif);
    font-size: 1.45rem; /* Larger hero text */
    line-height: 1.65;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Golden drop quote for Made Simple */
.card-simple .card-text::before {
    content: "“";
    position: absolute;
    left: -22px;
    top: -6px;
    font-family: inherit;
    font-size: 2.8rem;
    color: var(--accent-light);
    line-height: 1;
}

/* Bottom Line (The Takeaway) */
.card-bottom-line {
    background: rgba(74, 222, 128, 0.05); /* very soft green */
    border-left: 3px solid var(--success);
}

.card-bottom-line .card-label {
    color: var(--success);
}

.card-bottom-line .card-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.75;
    color: var(--text-primary);
}

/* Historical Context */
.card-historical-context {
    background: var(--accent-light);
    border-left: 3px solid var(--accent-light);
}

.card-historical-context .card-label {
    color: var(--accent);
}

.card-historical-context .card-text {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.7; /* Increased for readability */
    color: var(--text-secondary);
}

.card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.card-label .icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

.audio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 24px;
}

.audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.audio-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.audio-settings-wrapper {
    position: relative;
    display: inline-flex;
}

.audio-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.audio-settings-btn:hover, .audio-settings-btn.active {
    background: var(--bg-card);
    border-color: var(--border-input);
    color: var(--text-primary);
}

.audio-settings-popover {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 220px;
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all var(--transition-fast);
    z-index: 100;
}

.audio-settings-popover.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.luxury-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231A1918%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

.luxury-select:focus {
    border-color: var(--accent);
}

/* ── Content Sections (Context & Reflection) ── */
.section-block {
    margin: 48px 0;
}

.section-block h2 {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    margin: 0 0 16px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.section-block p {
    font-family: var(--font-serif);
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 0;
}

/* ── Related Verses ── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.related-link {
    display: block;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.related-link:hover {
    border-color: var(--border-input);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.related-link .ref {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── Share Strip removed to styles.css for global unification ── */

/* ── Glassmorphic AI Assistant (Floating) ── */
.ask-section {
    position: relative; /* Changed from fixed */
    margin: 48px auto; /* Centered with vertical space */
    width: 100%;
    max-width: 600px;
    background: var(--bg-glass);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}

[data-theme="dark"] .ask-section {
    border-color: rgba(255, 255, 255, 0.05);
}

.ask-section h2 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ask-section h2::before {
    content: '✨';
    font-size: 1.1rem;
}

.ask-section .ask-subtitle {
    font-family: var(--font-sans);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin: 0 0 16px;
    font-weight: 500;
}

.ask-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ask-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.ask-input:focus {
    border-color: var(--accent);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02), 0 0 0 3px var(--accent-glow);
}

.ask-submit {
    padding: 14px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-on-accent);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.ask-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--accent-glow);
}

.ask-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ask-answer {
    margin-top: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-card);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    display: none;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.ask-answer.visible {
    display: block;
    animation: slideUp 0.3s ease;
}

.ai-response-text {
    margin-bottom: 20px;
}

.ai-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ai-copy-btn:hover {
    background: var(--bg-suggestion-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.ai-copy-btn .icon {
    font-size: 1rem;
}

.ask-limit {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    margin-top: 12px;
    text-align: center;
}

/* ── CTA ── */
.cta-block {
    text-align: center;
    padding: 64px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    margin: 64px 0 0;
    box-shadow: var(--shadow-md);
}

.cta-block h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin: 0 0 12px;
    color: var(--text-primary);
}

.cta-block p {
    color: var(--text-secondary);
    margin: 0 0 32px;
    font-size: 1.05rem;
}

.cta-search-link {
    display: inline-block;
    padding: 14px 36px;
    background: var(--accent-gradient);
    color: var(--text-on-accent);
    text-decoration: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.cta-search-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* ── Footer ── */
.verse-footer {
    text-align: center;
    padding: 48px 24px;
    border-top: 1px solid var(--border-primary);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ── Not Found ── */
.not-processed-notice {
    padding: 24px 32px;
    background: var(--bg-bottomline);
    border: 1px solid var(--border-bottomline);
    border-radius: var(--radius-lg);
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.not-processed-notice a {
    color: var(--text-bottomline-label);
    text-decoration: underline;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ask-section {
        position: relative;
        width: 100%;
        padding: 24px;
        margin: 32px 0;
    }
}

@media (max-width: 640px) {
    .verse-content {
        padding: 32px 20px 64px;
    }

    .verse-page h1 {
        font-size: 2rem;
    }

    .verse-card {
        padding: 24px 20px;
        margin-bottom: 24px;
    }

    .card-kjv .card-text {
        font-size: 1.1rem;
    }

    .card-simple .card-text {
        font-size: 1.25rem;
    }

    .card-bottom-line .card-text {
        font-size: 1.15rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

/* Removed duplicate max-width rule for share-strip center */
}

/* ── Animations ── */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progressive Fade-In Clases assigned by JS or default delayed CSS */
.verse-card {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card-simple {
    animation-delay: 0.15s;
}

.card-bottom-line {
    animation-delay: 0.3s;
}

.section-block {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.4s;
}

/* ── Book & Chapter Grids ── */

.luxury-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 16px;
}

.grid-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.grid-card-link:hover {
    border-color: var(--accent);
    color: var(--text-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}