/*---*\
Homepage Logo Tabs V2
Trust logos with category tabs and optional logo carousel.

KEY FEATURES:
- Pill tab switcher (max 3 tabs)
- Mobile: horizontally scrollable tabs with fade + chevron hint
- Logo row grayscale; carousel arrows when more than 5 logos
- White section background; section-padding for vertical rhythm

IMPLEMENTATION NOTES:
- Tokens from custom-properties.css
- Nav arrow asset shared with cards-icon-v2
\*---*/

.logo-tabs-v2 {
    background-color: var(--white);
    overflow: hidden;
}

.logo-tabs-v2__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

.logo-tabs-v2__heading {
    margin: 0;
    padding: 0;
    width: 100%;
    color: var(--text-heading);
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-heading);
    text-align: center;
}

.logo-tabs-v2__tabs-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 6px;
    border-radius: 30px;
    background-color: var(--grey-100);
    overflow: hidden;
}

.logo-tabs-v2__tabs-wrap.has-next-nav {
    padding-right: 38px;
}

.logo-tabs-v2__tabs-wrap.has-prev-nav {
    padding-left: 38px;
}

.logo-tabs-v2__tabs-wrap.is-tabs-fit {
    padding-left: 10px;
    padding-right: 10px;
}

.logo-tabs-v2__tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-inline: 12px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.logo-tabs-v2__tabs::-webkit-scrollbar {
    display: none;
}

.logo-tabs-v2__tab {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    color: var(--text-heading);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    line-height: var(--lh-heading);
    white-space: nowrap;
    scroll-snap-align: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.logo-tabs-v2__tab:hover:not(.is-active) {
    background-color: rgba(26, 70, 134, 0.12);
    color: var(--indigo);
}

.logo-tabs-v2__tab.is-active {
    background-color: var(--indigo);
    color: var(--text-inverse);
}

.logo-tabs-v2__tab:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
}

.logo-tabs-v2__tab.is-active:focus-visible {
    outline: none;
}

.logo-tabs-v2__tabs-fade {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 72px;
    height: 100%;
    border-radius: 0 30px 30px 0;
    background: linear-gradient(270deg, var(--grey-100) 33%, rgba(243, 244, 246, 0) 100%);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.logo-tabs-v2__tabs-fade--start {
    right: auto;
    left: 0;
    border-radius: 30px 0 0 30px;
    background: linear-gradient(90deg, var(--grey-100) 33%, rgba(243, 244, 246, 0) 100%);
}

.logo-tabs-v2__tabs-wrap.has-end-fade .logo-tabs-v2__tabs-fade:not(.logo-tabs-v2__tabs-fade--start),
.logo-tabs-v2__tabs-wrap.has-start-fade .logo-tabs-v2__tabs-fade--start {
    opacity: 1;
    visibility: visible;
}

.logo-tabs-v2__tabs-chevron {
    position: absolute;
    top: 50%;
    right: 2px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    opacity: 1;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.logo-tabs-v2__tabs-chevron:hover {
    background-color: rgba(26, 70, 134, 0.12);
}

.logo-tabs-v2__tabs-chevron--prev {
    right: auto;
    left: 2px;
}

.logo-tabs-v2__tabs-chevron:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
}

.logo-tabs-v2__tabs-chevron img {
    display: block;
    width: 21px;
    height: 21px;
}

.logo-tabs-v2__tabs-chevron--prev img {
    transform: scaleX(-1);
}

.logo-tabs-v2__tabs-wrap.is-tabs-fit .logo-tabs-v2__tabs-fade,
.logo-tabs-v2__tabs-wrap.is-tabs-fit .logo-tabs-v2__tabs-chevron,
.logo-tabs-v2__tabs-chevron[hidden] {
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.logo-tabs-v2__panels {
    width: 100%;
}

.logo-tabs-v2__panel {
    display: none;
    width: 100%;
}

.logo-tabs-v2__panel.is-active {
    display: block;
}

.logo-tabs-v2__logos-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    overflow: hidden;
}

.logo-tabs-v2__logos {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: var(--content-gap);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.logo-tabs-v2__logos::-webkit-scrollbar {
    display: none;
}

.logo-tabs-v2__logo {
    flex: 0 0 150px;
    width: 150px;
    height: 64px;
    scroll-snap-align: start;
}

.logo-tabs-v2__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1);
}

.logo-tabs-v2__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-tabs-v2__nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--orange);
    border-radius: 44px;
    background: var(--white);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: opacity 0.25s ease, background-color 0.25s ease;
}

.logo-tabs-v2__nav-btn:hover,
.logo-tabs-v2__nav-btn:focus-visible {
    background: rgba(242, 103, 39, 0.12);
    outline: none;
}

.logo-tabs-v2__nav-btn:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.logo-tabs-v2__nav-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.logo-tabs-v2__nav-btn[hidden] {
    display: none;
}

.logo-tabs-v2__nav-btn img {
    display: block;
    width: 21px;
    height: 21px;
}

.logo-tabs-v2__nav-btn.js-logo-tabs-v2-prev img {
    transform: scaleX(-1);
}

@media (min-width: 768px) {
    .logo-tabs-v2__inner {
        padding-left: 40px;
        padding-right: 40px;
    }

    .logo-tabs-v2__tabs-wrap {
        max-width: fit-content;
        padding: 8px;
    }
    
    .logo-tabs-v2__tabs-wrap.has-next-nav {
        padding-right: 44px;
    }

    .logo-tabs-v2__tabs-wrap.has-prev-nav {
        padding-left: 44px;
    }

    .logo-tabs-v2__tabs {
        gap: 16px;
        scroll-padding-inline: 16px;
    }

    .logo-tabs-v2__tab {
        padding: 10px 18px;
        font-size: 18px;
    }

    .logo-tabs-v2__tabs-fade {
        width: 92px;
    }

    .logo-tabs-v2__tabs-chevron {
        right: 4px;
        width: 40px;
        height: 40px;
    }

    .logo-tabs-v2__tabs-chevron--prev {
        right: auto;
        left: 4px;
    }
}

@media (min-width: 1200px) {
    .logo-tabs-v2__tabs-wrap {
        width: auto;
        max-width: none;
        padding-left: 10px;
        padding-right: 10px;
        overflow: visible;
    }

    .logo-tabs-v2__tabs {
        gap: 0;
        justify-content: space-between;
        width: 773px;
        overflow: visible;
        scroll-padding-inline: 0;
        scroll-snap-type: none;
    }

    .logo-tabs-v2__tab {
        padding: 11px 20px;
        font-size: 20px;
        scroll-snap-align: none;
    }

    .logo-tabs-v2__tabs-fade,
    .logo-tabs-v2__tabs-chevron {
        display: none;
    }

    .logo-tabs-v2__logos {
        justify-content: center;
        overflow: visible;
        scroll-snap-type: none;
    }

    .logo-tabs-v2__logos--carousel {
        justify-content: center;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .logo-tabs-v2__logos--carousel.is-overflowing {
        justify-content: flex-start;
    }
}
