/*
 * Spineboshara.com - procedure guide pages (/services/<procedure>/), EN/DE/AR
 * Builds on second-opinion.css (sections, key points, check lists, reviewer,
 * FAQ, emergency note). Logical properties so the same rules work in RTL.
 * Version: 1.0.0
 */

/* Byline under the H1: who wrote it, when it was last reviewed */
.proc-byline {
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
    font-size: var(--font-size-small);
}

.proc-byline a {
    color: inherit;
}

/* Short answer under the H1 (answer first, quotable on its own) */
.proc-answer {
    max-width: var(--measure);
    font-size: var(--font-size-large);
    line-height: 1.65;
    color: var(--text-primary);
}

/* On this page */
.proc-toc {
    max-width: var(--measure);
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-small);
}

.proc-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin: var(--spacing-xs) 0 0;
    padding: 0;
    list-style: none;
}

.proc-toc a {
    color: var(--secondary-color);
}

/* Data tables (alternatives, recovery) scroll inside themselves on phones */
.proc-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

.proc-table {
    width: 100%;
    min-width: 34rem;
    border-collapse: collapse;
    font-size: 0.9875rem;
    font-variant-numeric: tabular-nums;
}

.proc-table caption {
    text-align: start;
    font-weight: var(--font-weight-semibold);
    color: var(--text-ink);
    margin-bottom: var(--spacing-xs);
}

.proc-table th,
.proc-table td {
    padding: 0.7em 0.9em;
    text-align: start;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

.proc-table thead th {
    background-color: var(--background-tertiary);
    color: var(--text-ink);
    font-weight: var(--font-weight-semibold);
    border-bottom: 1.5px solid var(--border-dark);
}

.proc-table tbody th {
    font-weight: var(--font-weight-semibold);
    color: var(--text-ink);
}

.proc-note {
    max-width: var(--measure);
    color: var(--text-secondary);
    font-size: var(--font-size-small);
}

/* Numbered questions to ask */
.proc-questions {
    max-width: var(--measure);
    padding-inline-start: 1.4rem;
}

.proc-questions li {
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

/* Second-opinion box inside the guide */
.proc-offer {
    max-width: var(--measure);
    margin-top: var(--spacing-lg);
    padding: clamp(1.25rem, 1rem + 1vw, 2rem);
    background-color: var(--background-primary);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius-lg);
}

.proc-offer h3 {
    margin-bottom: var(--spacing-sm);
}

.proc-offer .so-actions {
    margin-top: var(--spacing-md);
}

/* Related reading and sources */
.proc-links,
.proc-sources {
    max-width: var(--measure);
    padding-inline-start: 1.2rem;
}

.proc-links li,
.proc-sources li {
    margin-bottom: 0.55rem;
    line-height: 1.55;
}

.proc-sources {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.so-section h3 {
    margin-top: var(--spacing-lg);
}

/* Hero: one readable column (title, short answer, byline, contents) */
.proc-hero .page-title {
    max-width: 22ch;
}

.proc-hero .proc-answer {
    margin-top: var(--spacing-md);
}

/* Neutral bullet list (risks, doubtful cases, types): no tick marks */
.proc-list {
    max-width: var(--measure);
    padding-inline-start: 1.2rem;
    list-style: disc;
}

.proc-list li {
    margin-bottom: 0.8rem;
    line-height: 1.65;
}

/* Phones: each table row becomes a small card, labels come from data-label */
@media (max-width: 40rem) {
    .proc-table {
        min-width: 0;
    }

    .proc-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .proc-table tr,
    .proc-table th,
    .proc-table td {
        display: block;
    }

    .proc-table tr {
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--border-color);
    }

    .proc-table th,
    .proc-table td {
        padding: 0.2rem 0;
        border: 0;
    }

    .proc-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: var(--font-weight-semibold);
        color: var(--text-secondary);
    }
}
