/* ===================================================================
   styles.css — scripture project-specific styles
   =================================================================== */

/* ---------- Toolbar ---------- */

/* Override shared-base.css which starts .sim-toolbar at opacity:0
   (designed for intro-screen reveal). Scripture has no intro screen. */
#toolbar {
    opacity: 1;
    pointer-events: auto;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.toolbar-right {
    gap: 4px;
}

.toolbar-sep {
    width: 1px;
    height: 24px;
    background: var(--border);
    flex-shrink: 0;
}

.nav-dropdowns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdowns .sim-select {
    width: 140px;
}

/* ---------- App Layout ---------- */

#app-layout {
    display: flex;
    margin-top: var(--toolbar-h);
    min-height: calc(100vh - var(--toolbar-h));
    transition: margin-right 0.55s var(--ease-out);
}

@media (min-width: 901px) {
    body:has(> .sim-panel.open) > #app-layout {
        margin-right: calc(var(--panel-w) + 24px);
    }
}

#reading-pane {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    outline: none;
}

/* ---------- Notes Sidebar (shared sim-panel) ---------- */

#notes-sidebar {
    padding: 1rem;
}

#notes-content {
    flex: 1;
    overflow-y: auto;
}

.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.notes-header h2 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

/* ---------- Note Cards ---------- */

.note-card {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    background-color: var(--bg-elevated);
    transition: background-color 0.15s;
}

/* ---------- Verses ---------- */

.verse-row {
    margin-bottom: 0.35em;
}

.verse {
    display: inline;
    font-family: var(--font-body-serif);
    font-size: 1.25rem;
    line-height: 2;
    color: var(--text);
}

.verse-num {
    font-family: var(--font-mono);
    font-size: 0.7em;
    vertical-align: super;
    color: var(--accent);
    margin-right: 0.15em;
    user-select: none;
    cursor: pointer;
    transition: color 0.15s;
}

.verse-num:hover,
.verse-num:focus-visible {
    color: var(--text);
}

.verse-highlight {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    border-radius: var(--radius-sm, 2px);
}

/* ---------- Chapter Header ---------- */

#chapter-header {
    text-align: center;
    margin-bottom: 2rem;
}

#chapter-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 0.25rem;
}

#chapter-subtitle {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

#chapter-intro {
    font-family: var(--font-body-serif);
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* ---------- Section Headings ---------- */

.section-heading {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ext-slate, var(--text-muted));
    margin: 1.5rem 0 0.5rem;
}

/* ---------- Chapter Navigation ---------- */

#chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
}

/* ---------- Empty State ---------- */

.empty-state {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem 0;
}

/* ---------- Overlays ---------- */

.overlay-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    flex-shrink: 0;
}

.overlay-header h2 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
}

.overlay-header input {
    flex: 1;
}

.overlay-header .tool-btn {
    flex-shrink: 0;
}

/* ---------- Search Filters ---------- */

.search-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.2rem 0.75rem;
    flex-shrink: 0;
}

.search-filters select {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
}

/* ---------- Search Results ---------- */

.search-work-group {
    margin-bottom: 1.25rem;
}

.search-work-group h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}

.search-result {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    cursor: pointer;
}

.search-result:hover {
    color: var(--text);
}

.search-ref-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.search-result mark {
    background: var(--ext-yellow);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

/* ---------- Responsive: <= 900px ---------- */

@media (max-width: 900px) {
    .nav-dropdowns {
        overflow-x: auto;
    }
}

/* ---------- Responsive: <= 600px ---------- */

@media (max-width: 600px) {
    #chapter-title {
        font-size: 1.5rem;
    }

    .verse {
        font-size: 1rem;
        line-height: 1.8;
    }

    #reading-pane {
        padding: 1.25rem 1rem 3rem;
    }
}

/* ---------- User Note Cards ---------- */

.note-verse-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.note-verse-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

.note-textarea {
    flex: 1;
    min-width: 0;
    min-height: 1.6em;
    padding: 0.35rem 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body-serif);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
    overflow: hidden;
}

.note-textarea:focus {
    outline: none;
}

.note-textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}
