/* @group custom-table
------------------------------------ */


.custom-table :where(figure) {
    margin: 0;
}

.custom-table :is(td, th, thead) {
    border-color: var(--dorado);
    border-width: 1px !important;
}

.custom-table :is(td, th):not(:first-of-type, :last-of-type) {
    border-inline: double;
    outline-offset: 1px;
    border-inline-width: 4px !important;
    border-inline-color: var(--dorado);
}

.custom-table :is(th, #important) {
    padding: 2.2rem;
    font-family: var(--font-pragmatica);
    font-weight: var(--font-pragmatica-weight-book);
    font-size: var(--wp--preset--font-size--xs);
    line-height: 1.5em;
    letter-spacing: .05em;
}

.custom-table :is(td) {
    font-family: var(--font-petrona);
    letter-spacing: normal;
    padding: 1.2rem;
    font-size: 1.6rem;
    line-height: 1.5em;
}

.custom-table table {
    margin-bottom: 2rem;
}

/* ===== Scrollbar CSS ===== */
/* Firefox */
.custom-table table {
    scrollbar-width: thin;
    scrollbar-color: var(--dorado) var(--crema-claro);
}

/* Chrome, Edge, and Safari */
.custom-table table::-webkit-scrollbar {
    width: 16px;
}

.custom-table table::-webkit-scrollbar-track {
    background: var(--crema-claro);
}

.custom-table table::-webkit-scrollbar-thumb {
    background-color: var(--dorado);
    border-radius: 10px;
    border: 3px solid var(--crema-claro);
}

@media only screen and (min-width : 961px) {
    .custom-table .wp-block-buttons {
        gap: 2px;
    }
    .custom-table .wp-block-buttons::before {
        content: '';
        display: block;
        text-transform: uppercase;
        opacity: 0;
        pointer-events: none;
        flex-basis: var(--_bttn-width);
    }
    .custom-table .wp-block-button {
        flex-basis: var(--_bttn-width);
    }

    .custom-table .wp-block-buttons :is(.wp-element-button.wp-block-button__link, #important) {
        font-size: 1.2rem !important;
        width: 100%;
    }
    .custom-table :is(th, thead) {
        text-transform: uppercase;
    }

    .custom-table .header {
        padding-bottom: 4rem;
    }
}


@media only screen and (min-width : 0) and (max-width : 960px) {
    
    .custom-table {
        margin-inline: auto;
        overflow: scroll;
        overflow-y: hidden;
        width: calc(100vw - 6rem);
    }

    .custom-table .row-table {
        position: relative;
    }
    .custom-table .row-table::after {
        content: '';
        inset: 0;
        position: absolute;
        pointer-events: none;
        border-right: solid 1px var(--dorado);
        bottom: 2rem;
    }
    .custom-table .header {
        padding-bottom: 2.9rem;
    }

    /* .custom-table table {
        overflow-y: visible;
        overflow-x: scroll;
    } */

    .custom-table img {
        width: 2.4rem;
        height: 2.4rem;
    }

    .custom-table .wp-block-buttons {
        width: 198vw;
        flex-wrap: nowrap;
        justify-content: flex-start !important;
        gap: 2px;
    }
    
    .custom-table .wp-block-table {
        overflow: visible;
    }


    .custom-table .row {
        overflow: visible;
    }

    .custom-table :is(td, th) {
        width: 32.5vw;
        min-height: 4.5rem;

    }
    .custom-table .scroll-wrapper {
        width: 100%;
        overflow: scroll;
    }

    .custom-table :is(td, th):first-of-type {
        border: none !important;
        position: sticky;
        left: 0;
        background-color: var(--fondo);

    }

    .custom-table :is(td, th):first-of-type::before {
        content: '';
        position: absolute;
        inset: 0;
        border-top: solid 1px var(--dorado);
        border-inline: solid 1px var(--dorado);
        border-bottom: none;
        right: 2px;
    }

    .custom-table:not(.small) tr:last-of-type td:first-of-type::before {
        border-bottom: solid 1px var(--dorado);
    }

    .custom-table tr:first-of-type td:first-of-type::before {
        border-top: none;
    }


    .custom-table :is(td, th):nth-of-type(2) {
        border-left: solid 1px var(--dorado) !important;
    }


    .custom-table tr:not(:last-of-type) :is(.clone, #important),
    .custom-table :is(th.clone, #important) {
        border-bottom: none !important;
    }
}

/* @end */

/* @group custom-table .small
------------------------------------ */

.custom-table.small .wp-block-heading {
    text-transform: uppercase;
}

.custom-table.small :is(td, th, #important):first-of-type {
    font-family: var(--font-pragmatica);
    text-transform: uppercase;
    border: none;

}

.custom-table.small :is(thead) {
    border: none;
}

/* .custom-table.small :is(td, th):nth-of-type(3) {
    border-left: solid 1px var(--dorado) !important;
} */

.custom-table.small :is(th, td):nth-of-type(2) {
    border-left: 1px solid var(--dorado) !important;
}

@media only screen and (min-width : 961px) {
    .custom-table.small .header {
        padding-bottom: 5.6rem;
        align-items: end !important;
    }

    .custom-table.small .header .wp-block-heading {
        text-transform: uppercase;

    }

}

@media only screen and (min-width : 0) and (max-width : 960px) {

    .custom-table.small {
        overflow: hidden;
    }

    

    .custom-table.small .wp-block-table {
        overflow: scroll;
    }


    .custom-table.small :is(th, td):first-of-type::before {
        border: none;
        outline: 1px solid var(--fondo);
        border-right: 1px solid var(--dorado) !important;
        right: 0;
    }

    .custom-table.small .header {
        padding-bottom: 3.4rem;
    }

    .custom-table.small .header .wp-block-heading:last-of-type {
        margin-bottom: 1.7rem;
    }

    .custom-table.small :is(td, th):nth-of-type(2) {
        border-left: solid 1px var(--dorado) !important;
    }

}

/* @end */