/*
 * 10 Table.
 * Load order: content-style.css -> css/05-header.css -> css/05-footer.css -> css/10-content-patterns.css -> css/10-table.css -> css/11-tabs-block.css -> css/15-woocommerce.css -> css/20-page-patterns.css -> css/20-support-pages.css -> style.css -> css/pages/50-page-*.css.
 * Purpose: Centralized, standard table block styles across all pages.
 * Aesthetic 1 (Default): Modern Minimalist (horizontal dividers, white cards).
 * Aesthetic 2 (Editorial): Subtle Data Grid (alternating stripes, full bounds).
 */

/* ── Modern Minimalist Tables (Site-Wide Defaults) ─────────────────── */

/* 1. Container Cards */
figure.wp-block-table,
div.wp-block-kadence-table,
.dmax-file-table-container,
.dmax-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(11, 31, 51, 0.08);
    box-shadow: 0 4px 12px rgba(11, 31, 51, 0.02);
    margin: 2rem 0;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

/* 2. Primary Tables */
figure.wp-block-table table,
div.wp-block-kadence-table table,
.entry-content table,
.dmax-file-table,
.dmax-payout-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
    font-size: 0.95rem;
    margin: 0 !important;
}

/* 3. Table Headers (Top Row/Column Headers Only) */
figure.wp-block-table table thead th,
figure.wp-block-table table tr:first-child th,
div.wp-block-kadence-table table thead th,
div.wp-block-kadence-table table tr:first-child th,
.entry-content table thead th,
.entry-content table tr:first-child th,
.dmax-file-table th,
.dmax-payout-table th {
    background: var(--global-palette6, #08263c);
    color: #fff;
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    border: none !important;
}

/* Force headings and anchors inside the top header row to be white */
figure.wp-block-table table thead th *,
figure.wp-block-table table tr:first-child th *,
div.wp-block-kadence-table table thead th *,
div.wp-block-kadence-table table tr:first-child th *,
.entry-content table thead th *,
.entry-content table tr:first-child th * {
    color: #ffffff;
}

/* 4. Table Cells & First-Column Row Headers */
figure.wp-block-table table td,
figure.wp-block-table table tbody th,
div.wp-block-kadence-table table td,
div.wp-block-kadence-table table tbody th,
.entry-content table td,
.entry-content table tbody th,
.dmax-file-table td,
.dmax-payout-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(11, 31, 51, 0.06);
    color: var(--global-palette5, #4a5568);
    vertical-align: middle;
}

figure.wp-block-table table tr:last-child td,
figure.wp-block-table table tr:last-child th,
div.wp-block-kadence-table table tr:last-child td,
div.wp-block-kadence-table table tr:last-child th,
.entry-content table tr:last-child td,
.entry-content table tr:last-child th,
.dmax-file-table tr:last-child td,
.dmax-payout-table tr:last-child td {
    border-bottom: none;
}

figure.wp-block-table table tbody th,
div.wp-block-kadence-table table tbody th {
    font-weight: 700;
    text-align: left;
    background: transparent;
}

/* 5. Row Striping & Interaction */
figure.wp-block-table table tbody tr:nth-child(even) td,
figure.wp-block-table table tbody tr:nth-child(even) th,
div.wp-block-kadence-table table tbody tr:nth-child(even) td,
div.wp-block-kadence-table table tbody tr:nth-child(even) th,
.entry-content table tbody tr:nth-child(even) td,
.entry-content table tbody tr:nth-child(even) th,
.dmax-payout-table tr:nth-child(even) td {
    background: rgba(11, 31, 51, 0.01);
}

figure.wp-block-table.is-interactive tbody tr,
div.wp-block-kadence-table.is-interactive tbody tr,
.dmax-file-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

figure.wp-block-table.is-interactive tbody tr:hover td,
div.wp-block-kadence-table.is-interactive tbody tr:hover td,
.dmax-file-table tbody tr:hover td {
    background: rgba(21, 84, 146, 0.03);
    /* Soft brand highlight hover */
}

/* Keyboard Focus indicator for interactive tables */
figure.wp-block-table.is-interactive tbody tr:focus-visible,
div.wp-block-kadence-table.is-interactive tbody tr:focus-visible,
.dmax-file-table tbody tr:focus-visible {
    outline: 2px solid var(--global-palette3, #3cbce6) !important;
    outline-offset: -2px;
}

figure.wp-block-table.is-interactive tbody tr:focus-visible td,
div.wp-block-kadence-table.is-interactive tbody tr:focus-visible td,
.dmax-file-table tbody tr:focus-visible td {
    background: rgba(21, 84, 146, 0.05) !important;
}



/* ── Editorial Data Grid Tables (Opt-in Guide Tables) ──────────────── */
.dmax-guide-table-wrap {
    overflow-x: auto;
    margin: 2rem 0 0;
    border-radius: 12px;
    border: 1px solid rgba(11, 31, 51, 0.08);
    box-shadow: 0 4px 12px rgba(11, 31, 51, 0.02);
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 1025px) {
    .page-id-17300 .dmax-guide-table-wrap {
        overflow: visible;
    }
}

.dmax-guide-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
    margin: 0;
}

.dmax-guide-table thead tr th,
.entry-content table.dmax-guide-table tbody tr th,
.dmax-guide-table tr th {
    background-color: var(--global-palette6, #08263c);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    text-align: center;
    /* border: none !important; */
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.dmax-guide-table td {
    padding: 1.25rem 1.5rem;
    border: none;
    /* border-bottom: 1px solid rgba(11, 31, 51, 0.06); */
    font-size: 0.9375rem;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
    color: var(--global-palette5, #4a5568);
}

.dmax-guide-table tr:last-child td {
    border-bottom: none;
}

.dmax-guide-table tbody tr:nth-child(even) td {
    background: var(--dmax-soft, #f4f7fb);
}

.dmax-guide-table td a {
    color: var(--global-palette1, #155492);
    font-weight: 600;
}

.dmax-guide-table td a:hover {
    color: var(--global-palette3, #3cbce6);
}

@media (max-width: 767px) {
    .dmax-guide-table {
        min-width: 480px;
    }

    .dmax-guide-table--wide {
        min-width: 760px;
    }

    .dmax-guide-table thead tr th,
    .dmax-guide-table td {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
}


/* ── Gutenberg Editor Parity: Override WordPress Admin UI Button Styles ── */
.editor-styles-wrapper table .button,
.editor-styles-wrapper table .kb-button {
    background: var(--global-palette-btn-bg, var(--global-palette1, #155492)) !important;
    color: var(--global-palette-btn-text, #ffffff) !important;
    border: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.editor-styles-wrapper table .button:hover,
.editor-styles-wrapper table .kb-button:hover {
    background: var(--global-palette-btn-bg-hover, var(--global-palette3, #0b1f33)) !important;
    color: var(--global-palette-btn-text-hover, #ffffff) !important;
}


/* ── BACKUP: Original Page-Specific Styles (Commented Reference) ── */
/*
.dmax-file-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(11, 31, 51, 0.08);
    box-shadow: 0 4px 12px rgba(11, 31, 51, 0.02);
    margin: 2.5rem 0;
}
.dmax-file-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
    font-size: 0.95rem;
}
.dmax-file-table th {
    background: var(--global-palette6);
    color: #ffffff;
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    border: none;
}
.dmax-file-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(11, 31, 51, 0.06);
    color: var(--global-palette5);
    vertical-align: middle;
}
.dmax-file-table tr:last-child td {
    border-bottom: none;
}
.dmax-file-table tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}
.dmax-file-table tbody tr:hover td {
    background: rgba(21, 84, 146, 0.03);
}

.dmax-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(11, 31, 51, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    margin: 2.5rem 0;
}
.dmax-payout-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: #ffffff;
    font-size: 0.95rem;
}
.dmax-payout-table th {
    background: var(--global-palette6);
    color: #ffffff;
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    border: none;
}
.dmax-payout-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(11, 31, 51, 0.06);
    color: var(--global-palette5);
    vertical-align: middle;
}
.dmax-payout-table tr:last-child td {
    border-bottom: none;
}
.dmax-payout-table tr:nth-child(even) td {
    background: rgba(11, 31, 51, 0.01);
}
*/