/* Hand-authored blog post content: FAQ headings + a responsive data table, pasted directly into a post body by an editor. Moved here from the ACF Options "Custom CSS" field. */

.blog-faqs h2 {
    margin-bottom: 20px;
}

.blog-faqs h3 {
    font-size: 1.3rem;
}

.blog-table-wrap {
    --blog-table-header-fg: var(--bs-white);
    --blog-table-border: #d7dbe0;
    --blog-table-divider: #e5e8ec;

    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    font-family: var(--font-primary);
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.4;
}

.blog-table caption {
    text-align: left;
    font-size: 14px;
    color: var(--bs-text-muted);
    margin-bottom: 8px;
}

.blog-table thead th {
    background-color: var(--bs-main-500);
    color: var(--blog-table-header-fg);
    text-align: left;
    padding: 12px 16px;
    font-weight: 700;
}

.blog-table tbody td {
    padding: 14px 16px;
    border: 1px solid var(--blog-table-border);
    vertical-align: top;
}

/* Add data-label="X" to any column that reads better unwrapped, e.g. a statute citation. */
.blog-table td[data-label="Statute"] {
    white-space: nowrap;
}

/* Stack as cards below 640px, using each td's data-label as its row label once the header row is hidden. */
@media (max-width: 640px) {
    .blog-table thead {
        display: none;
    }

    .blog-table,
    .blog-table tbody,
    .blog-table tr,
    .blog-table td {
        display: block;
        width: 100%;
    }

    .blog-table tr {
        margin-bottom: 16px;
        border: 1px solid var(--blog-table-border);
        border-radius: 6px;
        overflow: hidden;
    }

    .blog-table td {
        border: none;
        border-bottom: 1px solid var(--blog-table-divider);
        padding: 10px 14px;
    }

    .blog-table td:last-child {
        border-bottom: none;
    }

    /* Fixed: originally referenced an undefined --blog-table-header-bg. */
    .blog-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--bs-text-muted);
        margin-bottom: 4px;
    }
}
