/**
 * Tab List Block Styles
 * Frontend styles - Bootstrap is available
 */
:root {
    --sfm-tab-font-weight: 700;
}

.tab-list-block__inner {
    border-radius: 8px;
    overflow: hidden;
}

/* Tab buttons row */
.tab-list-block__tabs {
    display: flex;
}

.tab-list-block__tab-btn {
    flex: 1;
    padding: 16px 12px;
    background: #EBF1FF;
    border: 1px solid #B9BECB;
    color: #54575E;
    font-size: 20px;
    font-weight: var(--sfm-tab-font-weight, 700);
    line-height: 32px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tab-list-block__tab-btn:first-child {
    border-top-left-radius: 8px;
}

.tab-list-block__tab-btn:last-child {
    border-top-right-radius: 8px;
}

.tab-list-block__tab-btn + .tab-list-block__tab-btn {
    border-left: none;
}

.tab-list-block__tab-btn:hover {
    background: #F5F8FF;
    color: #54575E;
    border-top-color: #F5F8FF;
    border-right-color: #F5F8FF;
    border-left-color: #F5F8FF;
    box-shadow: none;
}

.tab-list-block__tab-btn:focus,
.tab-list-block__tab-btn:focus-visible {
    outline: 1px solid #3C5DAA !important;
    outline-offset: -1px;
    color: #54575E;
    background: #EBF1FF;
    box-shadow: none;
}

.tab-list-block__tab-btn.is-active {
    background: #D3DBEE;
    color: #3C5DAA;
    font-weight: var(--sfm-tab-font-weight, 700);
    border-bottom-color: #3C5DAA;
    box-shadow: 0 -3px 0 0 #3C5DAA inset;
}

.tab-list-block__tab-btn.is-active:hover {
    background: #F5F8FF;
    border-top-color: #B9BECB;
    border-right-color: #B9BECB;
    border-left-color: #B9BECB;
}


/* Tab panels */
.tab-list-block__panel {
    display:none;
    border: 1px solid #B9BECB;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
    padding-top: 30px;
    background-color: #F7F8FA;
}

.tab-list-block__panel.is-active {
    display:block;
}

/* Hidden attribute hides inactive panels — set/removed by script.js */
.tab-list-block__panel[hidden] {
    display: none;
}

/* List */
.tab-list-block__list {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.tab-list-block__item {
    border-bottom: 1px solid #CED2DC;
    padding: 0;
    margin: 0;
    min-height: 75px;
    display: flex;
    align-items: center;
}

.tab-list-block__item:nth-child(odd) {
    background-color: #F7F8FA;
}

.tab-list-block__item:nth-child(even) {
    background-color: #fff;
}

.tab-list-block__list.no-toggle-list .tab-list-block__item:last-child {
    border-bottom: none;
}

.tab-list-block__link {
    display: block;
    padding: 0 20px;
    color: #3C5DAA;
    text-decoration: none !important;
    font-size: 18px;
    line-height: 28px;
    flex: 1 0 0;
}

.tab-list-block__link:hover {
    text-decoration: underline !important;
    color: #094dd2;
}


body .site-main .tab-list-block a.tab-list-block__link {
    text-decoration: none !important;
}

body .site-main .tab-list-block a.tab-list-block__link:hover {
    text-decoration: underline !important;
}


/* Seamless join between visible and overflow lists */

/*
 * Stripe continuation for the overflow list.
 *
 * PHP sets --stripe-offset: 1 on the <ul> when the visible list ends on an
 * odd row (grey). nth-child(odd) in the overflow list would then also be
 * grey — wrong. The offset inverts it by explicitly overriding both parities
 * with !important to beat any inherited nth-child rules.
 *
 * --stripe-offset: 0  → no change needed (even visible count)
 * --stripe-offset: 1  → invert (odd visible count)
 */
.tab-list-block__overflow.is-offset .tab-list-block__item:nth-child(odd) {
    background-color: #fff !important;
}
.tab-list-block__overflow.is-offset .tab-list-block__item:nth-child(even) {
    background-color: #F7F8FA !important;
}

/* Show more / show less */
.tab-list-block__show-more-wrap {
    text-align: center;
    background: #fff;
}

/* The visible list's last <li> already has border-bottom, which visually
   separates it from the show-more button — no extra border needed on the wrap. */

.tab-list-block__show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #FFF;
    border: none;
    padding: 0 20px;
    color: #3C5DAA;
    font-size: 20px;
    line-height: 30px;
    font-weight: var(--sfm-tab-font-weight, 700);
    cursor: pointer;
    width: 100%;
    justify-content: center;
    text-decoration: none;
    min-height: 75px;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
}

.tab-list-block__show-more-btn:hover,
.tab-list-block__show-more-btn:active,
.tab-list-block__show-more-btn:focus {
    text-decoration: none;
    background: #FFF;
    color: #3C5DAA;
    box-shadow: none;
}

button.tab-list-block__show-more-btn:hover .show-more-label,
button.tab-list-block__show-more-btn:hover .show-less-label {
    text-decoration: underline;
    text-underline-offset: .25em;
}


.tab-list-block__show-more-btn:focus,
.tab-list-block__show-more-btn:focus-visible {
    outline: 1px solid #3C5DAA !important;
    outline-offset: -1px;
}

/* Chevron icon via CSS */
.tab-list-block__show-more-icon {
    display: flex;
    transition: transform 0.2s ease;
}

/* Show less label hidden by default */
.show-less-label {
    display: none;
}

/* Expanded state */
.tab-list-block__show-more-btn[aria-expanded="true"] .show-more-label {
    display: none;
}

.tab-list-block__show-more-btn[aria-expanded="true"] .show-less-label {
    display: inline;
}

.tab-list-block__show-more-btn[aria-expanded="true"] .tab-list-block__show-more-icon {
    transform: rotate(-180deg);
}

/* Admin empty state */
.tab-list-block__empty {
    padding: 1rem 1.25rem;
    color: var(--gray-500, #718096);
    font-style: italic;
    margin: 0;
}

/* Alignment support */
.tab-list-block.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.tab-list-block.alignfull {
    max-width: 100%;
}

/* Print */
@media print {
    .tab-list-block__tab-btn:not(.is-active) {
        display: none;
    }

    .tab-list-block__panel {
        display: block !important;
    }

    .tab-list-block__show-more-wrap {
        display: none;
    }

    .tab-list-item--hidden {
        display: block !important;
    }
}

/* High contrast */
@media (prefers-contrast: more) {
    .tab-list-block__tab-btn:focus-visible,
    .tab-list-block__show-more-btn:focus-visible {
        outline-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tab-list-block__show-more-icon {
        transition: none;
    }
}