/* Algolia Search Tabs Styles */
.algolia-search .tabList {
    width: 100%;
    background-color: #4d4d4f !important;
    display: flex;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    position: relative;
}

/* Extend background to full browser width using pseudo-elements */
.algolia-search .tabList::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-color: #4d4d4f;
    z-index: 1;
}

.algolia-search .tabList__inner {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    width: 100%;
    max-width: 100%;
    padding: 0 20px; /* Add padding to prevent first/last elements from being cut off */
    box-sizing: border-box;
}

/* Hide scrollbar for webkit browsers */
.algolia-search .tabList__inner::-webkit-scrollbar {
    display: none;
}

.algolia-search .nav {
    justify-content: flex-start; /* Change from center to flex-start for proper scrolling */
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
    z-index: 2;
    border: 0;
    display: flex; /* Ensure flex display */
    min-width: max-content; /* Ensure nav doesn't shrink below content width */
}

.algolia-search .nav > li {
    margin: 0;
    display: block;
    flex-shrink: 0; /* Prevent tabs from shrinking */
}

.algolia-search .nav > li > a {
    padding: 15px 30px;
    display: block;
    color: white;
    text-decoration: none;
    border: none;
    font-size: 1.125rem;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: max-content; /* Ensure links don't shrink */
}

.algolia-search .nav-tabs > li > a:hover {
    background-color: #cf2027;
    color: white !important;
    text-decoration: none;
}

.algolia-search .nav-tabs > li > a.active {
    color: #4d4d4f !important;
    background: white;
    transform: scale(1.15);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.algolia-search .tab-content {
    padding: 20px 0;
}

.algolia-search .tab-pane {
    display: none;
}

.algolia-search .tab-pane.active {
    display: block;
    background-color: transparent;
}

/* Ensure proper spacing for search components */
.algolia-search .ais-search {
    min-height: 400px;
}

@media (min-width: 960px) {
    .algolia-search .nav {
        justify-content: center;
    }
}
