.ifs-wpbt-table {
    --ifs-wpbt-table-width: 100%;
    --ifs-wpbt-border-color: #d4d8dd;
    --ifs-wpbt-head-background: #f4f5f6;
    --ifs-wpbt-body-background: #fff;
    --ifs-wpbt-cell-padding: 0.75rem 0.875rem;
    --ifs-wpbt-card-gap: 1rem;
    --ifs-wpbt-scroll-max-height: none;
    --ifs-wpbt-sticky-offset: 0px;
    width: 100%;
    max-width: 100%;
}

.ifs-wpbt-table.ifs-wpbt-width-auto {
    width: auto;
    max-width: 100%;
}

.ifs-wpbt-table.ifs-wpbt-width-custom {
    width: min(100%, var(--ifs-wpbt-table-width));
}

.ifs-wpbt-table__scroll {
    width: 100%;
    max-width: 100%;
    scrollbar-gutter: stable;
}

.ifs-wpbt-table__scroll:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.ifs-wpbt-table__element {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.ifs-wpbt-width-auto .ifs-wpbt-table__element {
    width: auto;
}

.ifs-wpbt-table__caption {
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: left;
}

.ifs-wpbt-table .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ifs-wpbt-table__cell {
    padding: var(--ifs-wpbt-cell-padding);
    border: 1px solid var(--ifs-wpbt-border-color);
    background: var(--ifs-wpbt-body-background);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.ifs-wpbt-table__head .ifs-wpbt-table__cell,
.ifs-wpbt-table__floating-head .ifs-wpbt-table__cell {
    background: var(--ifs-wpbt-head-background);
    text-align: left;
}

.ifs-wpbt-table__cell > :first-child {
    margin-top: 0;
}

.ifs-wpbt-table__cell > :last-child {
    margin-bottom: 0;
}

.ifs-wpbt-table col {
    width: var(--ifs-wpbt-col-lg);
    min-width: var(--ifs-wpbt-col-min, 0);
}

.ifs-wpbt-active-mode-scroll .ifs-wpbt-table__scroll {
    overflow: auto;
    max-height: var(--ifs-wpbt-scroll-max-height);
}

.ifs-wpbt-active-mode-scroll .ifs-wpbt-table__element {
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
}

.ifs-wpbt-active-mode-scroll.ifs-wpbt-sticky-header-container .ifs-wpbt-table__head .ifs-wpbt-table__cell {
    position: sticky;
    top: 0;
    z-index: 3;
}

.ifs-wpbt-active-mode-scroll.ifs-wpbt-has-sticky-first-column .ifs-wpbt-table__cell[data-ifs-wpbt-column-start="0"] {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--ifs-wpbt-body-background);
}

.ifs-wpbt-active-mode-scroll.ifs-wpbt-has-sticky-first-column .ifs-wpbt-table__head .ifs-wpbt-table__cell[data-ifs-wpbt-column-start="0"] {
    background: var(--ifs-wpbt-head-background);
}

.ifs-wpbt-active-mode-scroll.ifs-wpbt-sticky-header-container.ifs-wpbt-has-sticky-first-column .ifs-wpbt-table__head .ifs-wpbt-table__cell[data-ifs-wpbt-column-start="0"] {
    z-index: 4;
}

.ifs-wpbt-table__floating-head {
    position: fixed;
    z-index: 9999;
    overflow: hidden;
    max-width: 100vw;
    pointer-events: none;
    box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
}

.ifs-wpbt-table__floating-head[hidden] {
    display: none !important;
}

.ifs-wpbt-table__floating-head-inner {
    will-change: transform;
}

.ifs-wpbt-table__floating-head-table {
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__head,
.ifs-wpbt-active-mode-cards .ifs-wpbt-table__foot,
.ifs-wpbt-active-mode-cards colgroup {
    display: none;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__element,
.ifs-wpbt-active-mode-cards .ifs-wpbt-table__body,
.ifs-wpbt-active-mode-cards .ifs-wpbt-table__row,
.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell {
    display: block;
    width: 100%;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__row {
    margin-bottom: var(--ifs-wpbt-card-gap);
    border: 1px solid var(--ifs-wpbt-border-color);
    background: var(--ifs-wpbt-body-background);
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell {
    position: static;
    border: 0;
    border-bottom: 1px solid var(--ifs-wpbt-border-color);
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell:last-child {
    border-bottom: 0;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell--row-header {
    font-weight: 700;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell--row-header::before {
    display: none;
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell--card-hidden {
    display: none;
}

.ifs-wpbt-active-mode-cards.ifs-wpbt-cards-hide-empty .ifs-wpbt-table__cell--empty {
    display: none;
}

.ifs-wpbt-table__cell--generated-rowspan {
    opacity: 1;
}

@media (min-width: 1200px) {
    .ifs-wpbt-table col { width: var(--ifs-wpbt-col-lg); }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .ifs-wpbt-table col { width: var(--ifs-wpbt-col-md); }
}

@media (min-width: 768px) and (max-width: 991px) {
    .ifs-wpbt-table col { width: var(--ifs-wpbt-col-sm); }
}

@media (max-width: 767px) {
    .ifs-wpbt-table col { width: var(--ifs-wpbt-col-xs); }
}

@media (min-width: 1200px) {
    .ifs-wpbt-table__floating-head col { width: var(--ifs-wpbt-col-lg); }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .ifs-wpbt-table__floating-head col { width: var(--ifs-wpbt-col-md); }
}

@media (min-width: 768px) and (max-width: 991px) {
    .ifs-wpbt-table__floating-head col { width: var(--ifs-wpbt-col-sm); }
}

@media (max-width: 767px) {
    .ifs-wpbt-table__floating-head col { width: var(--ifs-wpbt-col-xs); }
}

/* Optional visual card title selected per column. Semantic row headers remain
 * independent and are still rendered as real <th scope="row"> cells. */
.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell--card-title {
    font-size: 1.4em;
    font-weight: 700;
    line-height: 1.4em;
    background: var(--ifs-wpbt-head-background);
}

.ifs-wpbt-active-mode-cards .ifs-wpbt-table__cell--card-title::before {
    display: none;
}
