/* =============================================================================
   VerseFlow — Topic Single (TICKET-995)
   Context warning + Guidance cross-link + production empty states
   ============================================================================= */

/* .vf-topic-verse: no default block styles — child elements handle their own spacing */

/* ── Verse block ──────────────────────────────────────────────────────────── */
.vf-verse-block {
    background: var(--vf-ui-surface, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--vf-ui-bar-border, rgba(0, 0, 0, 0.08));
    border-radius: 10px;
    padding: 1.75rem 1.5rem 1.5rem;
    margin: 0 0 1.25rem;
    transition: border-color 0.2s;
}

.vf-verse-block__text {
    font-family: var(--font-primary, serif);
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    line-height: 1.75;
    color: var(--vf-ui-text, rgba(17, 17, 17, 0.88));
    margin: 0 0 1rem;
    transition: opacity 0.2s ease;
}

.vf-verse-block__text--loading {
    opacity: 0.3;
}

.vf-verse-block__ref {
    font-family: var(--font-primary, serif);
    font-size: 0.82rem;
    font-style: normal;
    color: var(--vf-ui-muted, rgba(17, 17, 17, 0.55));
    letter-spacing: 0.04em;
    display: block;
}

.vf-verse-block__trans {
    margin-left: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    opacity: 0.6;
}

/* ── Shared button style ─────────────────────────────────────────────────── */
.vf-seek-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    background: var(--vf-ui-btn-bg, rgba(17, 17, 17, 0.88));
    color: var(--vf-ui-btn-text, rgba(246, 239, 226, 0.96));
    border: none;
    border-radius: 20px;
    font-family: var(--font-primary, serif);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
    line-height: 1.3;
}

.vf-seek-button:hover {
    opacity: 0.85;
}

.vf-seek-button:focus-visible {
    outline: 2px solid var(--vf-ui-accent, var(--covenant-accent, #7a1e2c));
    outline-offset: 2px;
}

.vf-seek-button:disabled {
    opacity: 0.4;
    cursor: wait;
}

.vf-seek-button.small {
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
}

/* ── Action row ──────────────────────────────────────────────────────────── */
.vf-topic-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.vf-topic-save-btn {
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--vf-ui-bar-border, rgba(0, 0, 0, 0.16));
    border-radius: 20px;
    background: transparent;
    font-family: var(--font-primary, serif);
    font-size: 0.86rem;
    cursor: pointer;
    color: var(--vf-ui-text, rgba(17, 17, 17, 0.8));
    transition: background 0.12s, color 0.12s;
}

.vf-topic-save-btn[aria-pressed="true"] {
    background: var(--vf-ui-accent, var(--covenant-accent, #7a1e2c));
    color: #fff;
    border-color: transparent;
}

.vf-topic-save-btn:focus-visible {
    outline: 2px solid var(--vf-ui-accent, var(--covenant-accent, #7a1e2c));
    outline-offset: 2px;
}

/* ── Context warning (TICKET-960 Step 4) ────────────────────────────────── */
.vf-context-warning {
    background: var(--vf-ui-surface, rgba(17, 17, 17, 0.04));
    border: 1px solid var(--vf-ui-bar-border, rgba(0, 0, 0, 0.08));
    border-left: 3px solid var(--vf-ui-accent, var(--covenant-accent, #7a1e2c));
    border-radius: 6px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.vf-context-warning__text {
    font-family: var(--font-primary, serif);
    font-size: 0.84rem;
    color: var(--vf-ui-muted, rgba(17, 17, 17, 0.62));
    margin: 0;
    line-height: 1.5;
}

.vf-context-warning__actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.vf-read-chapter-btn {
    /* Overrides for .vf-seek-button inside context */
    font-size: 0.82rem;
    padding: 0.4rem 0.95rem;
}

/* Empty State Styling (TICKET-995) */
.vf-topic-empty-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ── Why this verse (optional details) ──────────────────────────────────── */
.vf-why-verse {
    margin: 0;
}

.vf-why-verse summary {
    font-family: var(--font-primary, serif);
    font-size: 0.78rem;
    color: var(--vf-ui-muted, rgba(17, 17, 17, 0.5));
    cursor: pointer;
    letter-spacing: 0.04em;
    list-style: none;
    /* hide default triangle in Firefox */
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.vf-why-verse summary::-webkit-details-marker {
    display: none;
}

.vf-why-verse summary::before {
    content: '▸';
    font-size: 0.65rem;
    transition: transform 0.15s;
    display: inline-block;
}

.vf-why-verse[open] summary::before {
    transform: rotate(90deg);
}

.vf-why-verse summary:focus-visible {
    outline: 2px solid var(--vf-ui-accent, var(--covenant-accent, #7a1e2c));
    outline-offset: 2px;
    border-radius: 2px;
}

.vf-why-body {
    font-family: var(--font-primary, serif);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--vf-ui-muted, rgba(17, 17, 17, 0.65));
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--vf-ui-bar-border, rgba(0, 0, 0, 0.1));
}

/* ── Guidance cross-link ─────────────────────────────────────────────────── */
.vf-topic-personal {
    background: var(--vf-ui-surface, rgba(17, 17, 17, 0.03));
    border: 1px solid var(--vf-ui-bar-border, rgba(0, 0, 0, 0.07));
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vf-topic-personal p {
    font-family: var(--font-primary, serif);
    font-size: 0.83rem;
    color: var(--vf-ui-muted, rgba(17, 17, 17, 0.58));
    margin: 0;
    flex: 1 1 200px;
    line-height: 1.5;
}

/* ── Divine anchor badge (optional) ─────────────────────────────────────── */
.vf-divine-anchor {
    display: inline-block;
    font-family: var(--font-primary, serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--vf-ui-accent, var(--covenant-accent, #7a1e2c));
    opacity: 0.75;
    margin-bottom: 0.65rem;
}

/* ── Night mode overrides ────────────────────────────────────────────────── */
body.atmosphere-night .vf-verse-block {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.07);
}

body.atmosphere-night .vf-context-warning {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
}

body.atmosphere-night .vf-topic-personal {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

body.atmosphere-night .vf-context-warning__text,
body.atmosphere-night .vf-topic-personal p {
    color: rgba(246, 239, 226, 0.5);
}

body.atmosphere-night .vf-why-body {
    color: rgba(246, 239, 226, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}


body.atmosphere-night .vf-verse-block__text {
    color: rgba(246, 239, 226, 0.9);
}

body.atmosphere-night .vf-verse-block__ref {
    color: rgba(246, 239, 226, 0.45);
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .vf-why-verse summary::before {
        transition: none;
    }

    .vf-verse-block__text,
    .vf-seek-button,
    .vf-read-chapter-btn {
        transition: none;
    }
}