/* EDIVA CONTENT LINK ACCENT BEGIN */
:root {
    --ediva-content-link: var(--eh-link, #087f73);
}
/* EDIVA CONTENT LINK ACCENT END */

/*
 * Ediva Content Tables
 * Shared responsive table standard for article and page content.
 *
 * Scope is deliberately limited to audited content containers.
 * No global bare table, th or td selectors are used.
 */

body .entry-content .wp-block-table,
body .post-content .wp-block-table,
body .wp-block-post-content .wp-block-table,
body .article-content .wp-block-table,
body .single-content .wp-block-table,
body .page-content .wp-block-table,
body .main-content .wp-block-table {
    max-width: 100%;
    margin: 1.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body .entry-content table,
body .post-content table,
body .wp-block-post-content table,
body .article-content table,
body .single-content table,
body .page-content table,
body .main-content table {
    --ediva-table-surface:
        var(
            --wp--preset--color--base,
            var(--color-surface, var(--surface-color, #ffffff))
        );
    --ediva-table-text:
        var(
            --wp--preset--color--contrast,
            var(--color-text, var(--text-color, #1f2937))
        );
    --ediva-table-accent:
        var(
            --wp--preset--color--contrast,
            var(
                --color-primary,
                var(--primary-color, var(--accent-color, #172033))
            )
        );
    --ediva-table-border:
        var(--color-border, var(--border-color, #dce2ea));
    --ediva-table-zebra: #f6f8fb;

    width: 100%;
    max-width: 100%;
    margin: 1.75rem 0;
    border: 1px solid var(--ediva-table-border);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--ediva-table-surface);
    color: var(--ediva-table-text);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    font-size: 0.96em;
    line-height: 1.5;
}

body .entry-content table caption,
body .post-content table caption,
body .wp-block-post-content table caption,
body .article-content table caption,
body .single-content table caption,
body .page-content table caption,
body .main-content table caption {
    padding: 0 0 0.75rem;
    color: inherit;
    font-size: 0.92em;
    font-weight: 600;
    text-align: left;
}

body .entry-content table th,
body .post-content table th,
body .wp-block-post-content table th,
body .article-content table th,
body .single-content table th,
body .page-content table th,
body .main-content table th,
body .entry-content table td,
body .post-content table td,
body .wp-block-post-content table td,
body .article-content table td,
body .single-content table td,
body .page-content table td,
body .main-content table td {
    padding: 0.85rem 1rem;
    border-right: 1px solid var(--ediva-table-border);
    border-bottom: 1px solid var(--ediva-table-border);
    vertical-align: top;
    text-align: left;
    overflow-wrap: anywhere;
}

body .entry-content table thead th,
body .post-content table thead th,
body .wp-block-post-content table thead th,
body .article-content table thead th,
body .single-content table thead th,
body .page-content table thead th,
body .main-content table thead th {
    background: var(--ediva-table-accent);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

body .entry-content table tbody th,
body .post-content table tbody th,
body .wp-block-post-content table tbody th,
body .article-content table tbody th,
body .single-content table tbody th,
body .page-content table tbody th,
body .main-content table tbody th {
    background: rgba(15, 23, 42, 0.045);
    font-weight: 700;
}

body .entry-content table tbody tr:nth-child(even),
body .post-content table tbody tr:nth-child(even),
body .wp-block-post-content table tbody tr:nth-child(even),
body .article-content table tbody tr:nth-child(even),
body .single-content table tbody tr:nth-child(even),
body .page-content table tbody tr:nth-child(even),
body .main-content table tbody tr:nth-child(even) {
    background: var(--ediva-table-zebra);
}

body .entry-content table tbody tr:hover,
body .post-content table tbody tr:hover,
body .wp-block-post-content table tbody tr:hover,
body .article-content table tbody tr:hover,
body .single-content table tbody tr:hover,
body .page-content table tbody tr:hover,
body .main-content table tbody tr:hover {
    background: rgba(37, 99, 235, 0.055);
}

body .entry-content table tbody tr:last-child th,
body .post-content table tbody tr:last-child th,
body .wp-block-post-content table tbody tr:last-child th,
body .article-content table tbody tr:last-child th,
body .single-content table tbody tr:last-child th,
body .page-content table tbody tr:last-child th,
body .main-content table tbody tr:last-child th,
body .entry-content table tbody tr:last-child td,
body .post-content table tbody tr:last-child td,
body .wp-block-post-content table tbody tr:last-child td,
body .article-content table tbody tr:last-child td,
body .single-content table tbody tr:last-child td,
body .page-content table tbody tr:last-child td,
body .main-content table tbody tr:last-child td {
    border-bottom: 0;
}

body .entry-content table tr > :last-child,
body .post-content table tr > :last-child,
body .wp-block-post-content table tr > :last-child,
body .article-content table tr > :last-child,
body .single-content table tr > :last-child,
body .page-content table tr > :last-child,
body .main-content table tr > :last-child {
    border-right: 0;
}

body .entry-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button),
body .post-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button),
body .wp-block-post-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button),
body .article-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button),
body .single-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button),
body .page-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button),
body .main-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button) {
    color:
        var(
            --ediva-content-link,
            var(
                --color-primary,
                var(
                    --primary-color,
                    var(--accent-color, #1d4ed8)
                )
            )
        );
    text-decoration-line: underline;
    text-decoration-thickness: 0.085em;
    text-decoration-style: solid;
    text-underline-offset: 0.17em;
    text-decoration-skip-ink: auto;
}

body .entry-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover,
body .post-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover,
body .wp-block-post-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover,
body .article-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover,
body .single-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover,
body .page-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover,
body .main-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):hover {
    text-decoration-thickness: 0.14em;
}

body .entry-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible,
body .post-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible,
body .wp-block-post-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible,
body .article-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible,
body .single-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible,
body .page-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible,
body .main-content :where(p, li, blockquote, figcaption, dd, dt, address, td, th) a[href]:not(.wp-element-button):not(.button):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

@supports (
    background:
        color-mix(in srgb, #000000 5%, #ffffff)
) {
    body .entry-content table tbody tr:nth-child(even),
body .post-content table tbody tr:nth-child(even),
body .wp-block-post-content table tbody tr:nth-child(even),
body .article-content table tbody tr:nth-child(even),
body .single-content table tbody tr:nth-child(even),
body .page-content table tbody tr:nth-child(even),
body .main-content table tbody tr:nth-child(even) {
        background:
            color-mix(
                in srgb,
                var(--ediva-table-text) 4%,
                var(--ediva-table-surface)
            );
    }

    body .entry-content table tbody tr:hover,
body .post-content table tbody tr:hover,
body .wp-block-post-content table tbody tr:hover,
body .article-content table tbody tr:hover,
body .single-content table tbody tr:hover,
body .page-content table tbody tr:hover,
body .main-content table tbody tr:hover {
        background:
            color-mix(
                in srgb,
                var(--ediva-table-accent) 7%,
                var(--ediva-table-surface)
            );
    }
}

@media (max-width: 760px) {
    body .entry-content .wp-block-table,
body .post-content .wp-block-table,
body .wp-block-post-content .wp-block-table,
body .article-content .wp-block-table,
body .single-content .wp-block-table,
body .page-content .wp-block-table,
body .main-content .wp-block-table {
        border-radius: 10px;
    }

    body .entry-content table,
body .post-content table,
body .wp-block-post-content table,
body .article-content table,
body .single-content table,
body .page-content table,
body .main-content table {
        display: block;
        width: 100%;
        min-width: 620px;
        overflow-x: auto;
        border-radius: 10px;
        font-size: 0.92em;
        -webkit-overflow-scrolling: touch;
    }

    body .entry-content table th,
body .post-content table th,
body .wp-block-post-content table th,
body .article-content table th,
body .single-content table th,
body .page-content table th,
body .main-content table th,
body .entry-content table td,
body .post-content table td,
body .wp-block-post-content table td,
body .article-content table td,
body .single-content table td,
body .page-content table td,
body .main-content table td {
        padding: 0.72rem 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body .entry-content table tbody tr,
body .post-content table tbody tr,
body .wp-block-post-content table tbody tr,
body .article-content table tbody tr,
body .single-content table tbody tr,
body .page-content table tbody tr,
body .main-content table tbody tr {
        transition: none;
    }
}

/* EDIVA MOBILE TABLE SCROLLER BEGIN */

body .entry-content .ediva-table-scroll,
body .post-content .ediva-table-scroll,
body .wp-block-post-content .ediva-table-scroll,
body .article-content .ediva-table-scroll,
body .single-content .ediva-table-scroll,
body .page-content .ediva-table-scroll,
body .main-content .ediva-table-scroll {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 1.75rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(71, 85, 105, 0.58) transparent;
}

body .entry-content .ediva-table-scroll > table,
body .post-content .ediva-table-scroll > table,
body .wp-block-post-content .ediva-table-scroll > table,
body .article-content .ediva-table-scroll > table,
body .single-content .ediva-table-scroll > table,
body .page-content .ediva-table-scroll > table,
body .main-content .ediva-table-scroll > table {
    margin: 0;
}

body .entry-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end),
body .post-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end),
body .wp-block-post-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end),
body .article-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end),
body .single-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end),
body .page-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end),
body .main-content .ediva-table-scroll--has-overflow:not(.ediva-table-scroll--at-end) {
    box-shadow:
        inset -18px 0 16px -18px rgba(15, 23, 42, 0.62);
}

body .entry-content .ediva-table-scroll:focus-visible,
body .post-content .ediva-table-scroll:focus-visible,
body .wp-block-post-content .ediva-table-scroll:focus-visible,
body .article-content .ediva-table-scroll:focus-visible,
body .single-content .ediva-table-scroll:focus-visible,
body .page-content .ediva-table-scroll:focus-visible,
body .main-content .ediva-table-scroll:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 10px;
}

body .entry-content .ediva-table-scroll::-webkit-scrollbar,
body .post-content .ediva-table-scroll::-webkit-scrollbar,
body .wp-block-post-content .ediva-table-scroll::-webkit-scrollbar,
body .article-content .ediva-table-scroll::-webkit-scrollbar,
body .single-content .ediva-table-scroll::-webkit-scrollbar,
body .page-content .ediva-table-scroll::-webkit-scrollbar,
body .main-content .ediva-table-scroll::-webkit-scrollbar {
    height: 10px;
}

body .entry-content .ediva-table-scroll::-webkit-scrollbar-track,
body .post-content .ediva-table-scroll::-webkit-scrollbar-track,
body .wp-block-post-content .ediva-table-scroll::-webkit-scrollbar-track,
body .article-content .ediva-table-scroll::-webkit-scrollbar-track,
body .single-content .ediva-table-scroll::-webkit-scrollbar-track,
body .page-content .ediva-table-scroll::-webkit-scrollbar-track,
body .main-content .ediva-table-scroll::-webkit-scrollbar-track {
    background: transparent;
}

body .entry-content .ediva-table-scroll::-webkit-scrollbar-thumb,
body .post-content .ediva-table-scroll::-webkit-scrollbar-thumb,
body .wp-block-post-content .ediva-table-scroll::-webkit-scrollbar-thumb,
body .article-content .ediva-table-scroll::-webkit-scrollbar-thumb,
body .single-content .ediva-table-scroll::-webkit-scrollbar-thumb,
body .page-content .ediva-table-scroll::-webkit-scrollbar-thumb,
body .main-content .ediva-table-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(71, 85, 105, 0.58);
    background-clip: padding-box;
}

@media (max-width: 760px) {
    body .entry-content table,
body .post-content table,
body .wp-block-post-content table,
body .article-content table,
body .single-content table,
body .page-content table,
body .main-content table {
        display: table;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    body .entry-content .ediva-table-scroll > table,
body .post-content .ediva-table-scroll > table,
body .wp-block-post-content .ediva-table-scroll > table,
body .article-content .ediva-table-scroll > table,
body .single-content .ediva-table-scroll > table,
body .page-content .ediva-table-scroll > table,
body .main-content .ediva-table-scroll > table {
        width: 100%;
        min-width: 620px;
        margin: 0;
    }
}

/* EDIVA MOBILE TABLE SCROLLER END */
