/*
 * EpiDoc XSLT Output Overrides
 *
 * Styles for class names and IDs generated by the EpiDoc XSLT stylesheets.
 * Loaded after base.css. To override, use project.css.
 */

/* ── Metadata definition lists (dl.iospe) ── */

.document [id="stone"] dl.iospe,
.document [id="text-field"] dl.iospe,
.document #bibliography dl.iospe {
    display: grid;
    grid-template-columns: minmax(140px, auto) 1fr;
    gap: 0.5rem 1.25rem;
    margin: 0;
    font-size: 0.9rem;
}

.document [id="stone"] dl.iospe dt,
.document [id="text-field"] dl.iospe dt,
.document #bibliography dl.iospe dt {
    font-weight: 600;
    color: var(--slate);
    font-size: 0.85rem;
}

.document [id="stone"] dl.iospe dd,
.document [id="text-field"] dl.iospe dd,
.document #bibliography dl.iospe dd {
    margin: 0;
    color: var(--ink);
}

.document [id="stone"] dl.iospe dd b,
.document [id="text-field"] dl.iospe dd b,
.document #bibliography dl.iospe dd b {
    color: var(--ink);
    font-weight: 600;
}

/* Prevent stray dl.iospe wrapping major sections */
.document dl.iospe:has(> #translation),
.document dl.iospe:has(> #bibliography),
.document dl.iospe:has(> #commentary),
.document dl.iospe:has(> #footnotes) {
    display: block;
}

/* ── Section styling ── */

#source-description {
    background: none;
    padding: 0 0 0 1.25rem;
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent);
}

#edition-text h3, #translation h3, #commentary h3, #images h3 {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border-color);
}

.textpart {
    background: #fff;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    margin: 0.25rem 0;
}

.textpart[lang="grc"] {
    font-family: var(--font-greek);
    font-size: 0.9rem;
}

.ab { display: block; }

#translation {
    background: none;
    padding: 0 0 0 1.25rem;
    margin: 2.5rem 0;
    border: none;
    border-left: 3px solid var(--accent);
}

#commentary {
    background: none;
    padding: 0 0 0 1.25rem;
    margin: 2rem 0;
    border: none;
    border-left: 3px solid var(--border-color);
}

/* ── Images (dl.box) ── */

#images {
    background: var(--bg-base);
    padding: 1.5rem;
    margin: 2.5rem 0;
    border: 1px solid var(--border-color);
}

#images h4.iospe {
    margin-bottom: 1rem;
}

dl.box {
    display: inline-block;
    margin: 0.75rem 1.25rem 0.75rem 0;
    text-align: center;
    vertical-align: top;
}

dl.box dd {
    margin: 0 0 0.375rem;
}

dl.box img {
    max-width: 280px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

dl.box img:hover {
    box-shadow: var(--shadow-md);
}

dl.box dt {
    font-size: 0.8rem;
    color: var(--slate);
    font-style: italic;
    margin-top: 0.375rem;
}

/* ── Links ── */

.document a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.document a:hover { border-bottom-color: var(--accent); }
