/* ============================================================
   INTERLINEAR — BLB-style table layout
   Clean table: English | Strong's | Original/Root/Translit | Parsing
   ============================================================ */

/* Toggle button */
.interlinear-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border: 1px solid var(--border,#e5dfc8);
    border-radius: 6px; background: var(--white,#fff);
    color: var(--muted,#8a7f6e); font-size: .82rem;
    font-family: var(--ui,sans-serif); cursor: pointer;
    transition: all .2s; margin-bottom: 8px;
}
.interlinear-toggle:hover, .interlinear-toggle.active {
    background: var(--gold-dk,#9a7530); color: #fff;
    border-color: var(--gold-dk,#9a7530);
}

.interlinear-block { display: none; margin-top: .75rem; }

/* ── Main wrapper ── */
.il-blb-wrap {
    font-family: var(--ui, system-ui, sans-serif);
    border: 1px solid var(--border, #e5dfc8);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    margin: .5rem 0 1.25rem;
}

/* Full verse original text line at top */
.il-verse-line {
    background: var(--parch-lt, #faf7f0);
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border, #e5dfc8);
    line-height: 1.8;
}
.il-verse-orig-full {
    font-family: 'SBL Greek', 'Gentium Plus', 'Noto Serif', Georgia, serif;
    font-size: 1.05rem;
    color: var(--ink, #1a1510);
    letter-spacing: .02em;
}

/* ── Table ── */
.il-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

/* Headers */
.il-table thead tr {
    background: var(--ink, #1a1510);
}
.il-table thead th {
    padding: .55rem 1rem;
    font-family: var(--ui, sans-serif);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: rgba(255,255,255,.65);
    text-align: left;
    border: none;
    white-space: nowrap;
}
.il-th-strongs { width: 80px; }
.il-th-parse   { width: 140px; }

/* Rows */
.il-row {
    border-bottom: 1px solid var(--border, #e5dfc8);
    transition: background .1s;
}
.il-row:last-child { border-bottom: none; }
.il-row:hover { background: var(--parch-lt, #faf7f0); }
.il-row:hover .il-td-eng { color: var(--gold-dk, #9a7530); }

/* Cells */
.il-table td {
    padding: .6rem 1rem;
    vertical-align: middle;
    border: none;
}

/* English */
.il-td-eng {
    font-family: var(--ui, sans-serif);
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink, #1a1510);
    min-width: 90px;
}

/* Strong's */
.il-td-strongs { text-align: center; }
.il-strongs-link {
    display: inline-block;
    font-family: monospace;
    font-size: .82rem;
    font-weight: 700;
    color: var(--gold-dk, #9a7530);
    text-decoration: none;
    padding: .1rem .35rem;
    border: 1px solid rgba(154,117,48,.3);
    border-radius: 4px;
    transition: all .15s;
}
.il-strongs-link:hover {
    background: var(--gold-dk, #9a7530);
    color: #fff;
    border-color: var(--gold-dk, #9a7530);
}

/* Original / Root / Transliteration */
.il-td-orig { min-width: 180px; }
.il-orig-word {
    display: block;
    font-family: 'SBL Greek', 'Gentium Plus', 'Noto Serif', Georgia, serif;
    font-size: 1.1rem;
    color: var(--ink, #1a1510);
    line-height: 1.4;
    letter-spacing: .01em;
}
.il-orig-root {
    display: block;
    font-family: 'SBL Greek', 'Gentium Plus', 'Noto Serif', Georgia, serif;
    font-size: .82rem;
    color: var(--muted, #8a7f6e);
    margin-top: .1rem;
}
.il-orig-translit {
    display: block;
    font-family: var(--ui, sans-serif);
    font-size: .78rem;
    font-style: italic;
    color: var(--muted, #8a7f6e);
    margin-top: .08rem;
}

/* Parsing badge */
.il-td-parse { min-width: 120px; }
.il-parse-badge {
    display: inline-block;
    padding: .22rem .6rem;
    border-radius: 20px;
    border: 1px solid;
    font-family: var(--ui, sans-serif);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: help;
    white-space: nowrap;
}

/* Word study slide-in panel trigger */
.il-row[data-strongs]:hover .il-td-eng::after {
    content: ' →';
    font-weight: 400;
    opacity: .5;
    font-size: .78rem;
}

/* Active/highlighted row */
.il-row.il-active {
    background: rgba(154,117,48,.08);
}
.il-row.il-active .il-td-eng {
    color: var(--gold-dk, #9a7530);
    font-weight: 700;
}
.il-row.il-active .il-strongs-link {
    background: var(--gold-dk, #9a7530);
    color: #fff;
}

/* Responsive: stack on mobile */
@media (max-width: 600px) {
    .il-table thead { display: none; }
    .il-table, .il-table tbody, .il-row, .il-table td { display: block; width: 100%; }
    .il-row { padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
    .il-table td { padding: .15rem .75rem; border: none; }
    .il-td-eng { font-size: .9rem; padding-top: .5rem; }
    .il-td-strongs { text-align: left; }
    .il-orig-word { font-size: 1.05rem; }
}
