/*
 * 4.2.3 category bar presentation, isolated from later 4.3.x polish rules.
 */
.sbs-booking-main,
body.sbs-booking-immersive .sbs-booking-main,
.sbs-form-step.sbs-step-1,
body.sbs-booking-immersive .sbs-form-step.sbs-step-1 {
    overflow: visible !important;
}

.sbs-step-1 { position: relative !important; }

.sbs-category-tabs-wrap,
body.sbs-booking-immersive .sbs-category-tabs-wrap {
    position: relative !important;
    overflow: visible !important;
}

.sbs-category-tabs,
body.sbs-booking-immersive .sbs-category-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    max-width: 100% !important;
    overflow: visible !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
}

.sbs-cat-tab,
body.sbs-booking-immersive .sbs-cat-tab {
    flex: 0 0 auto !important;
    min-height: 36px !important;
    max-width: none !important;
    padding: 8px 14px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

/* Match the selected pill while hovering any visible category tab. */
.sbs-category-tabs .sbs-cat-tab[data-cat]:hover,
.sbs-category-tabs .sbs-cat-tab[data-cat]:focus-visible,
.sbs-category-tabs .sbs-cat-tab[data-cat].is-hover,
body.sbs-booking-immersive .sbs-category-tabs .sbs-cat-tab[data-cat]:hover,
body.sbs-booking-immersive .sbs-category-tabs .sbs-cat-tab[data-cat]:focus-visible,
body.sbs-booking-immersive .sbs-category-tabs .sbs-cat-tab[data-cat].is-hover,
.sbs-category-tabs .sbs-cat-tab[data-cat].active,
body.sbs-booking-immersive .sbs-category-tabs .sbs-cat-tab[data-cat].active {
    border-color: #111827 !important;
    background: #111827 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(17,24,39,.16) !important;
}

.sbs-cat-overflow,
body.sbs-booking-immersive .sbs-cat-overflow {
    display: none !important;
}

#sbs-cat-more-btn,
body.sbs-booking-immersive #sbs-cat-more-btn {
    min-width: 58px !important;
    max-width: none !important;
    padding: 8px 12px !important;
}

#sbs-cat-more-btn.sbs-more-needed,
body.sbs-booking-immersive #sbs-cat-more-btn.sbs-more-needed {
    display: inline-flex !important;
}

#sbs-cat-more-btn.has-active,
body.sbs-booking-immersive #sbs-cat-more-btn.has-active {
    border-color: #111827 !important;
    background: #111827 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(17,24,39,.16) !important;
}

.sbs-cat-more-dropdown,
body.sbs-booking-immersive .sbs-cat-more-dropdown {
    display: none;
    position: absolute !important;
    z-index: 999999 !important;
    min-width: 180px !important;
    max-width: min(240px, calc(100vw - 24px)) !important;
    max-height: min(55vh, 360px) !important;
    overflow-y: auto !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.18) !important;
}

.sbs-cat-more-dropdown.open {
    display: block !important;
}

.sbs-cat-dropdown-item,
body.sbs-booking-immersive .sbs-cat-dropdown-item {
    display: block !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 13px 18px !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid #f2f2f2 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #1a1a1a !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

.sbs-cat-dropdown-item:last-child { border-bottom: 0 !important; }
.sbs-cat-dropdown-item:hover,
.sbs-cat-dropdown-item:focus-visible,
.sbs-cat-dropdown-item.is-hover,
.sbs-cat-dropdown-item:active,
.sbs-cat-dropdown-item.active,
body.sbs-booking-immersive .sbs-cat-dropdown-item:hover,
body.sbs-booking-immersive .sbs-cat-dropdown-item:focus-visible,
body.sbs-booking-immersive .sbs-cat-dropdown-item.is-hover,
body.sbs-booking-immersive .sbs-cat-dropdown-item:active,
body.sbs-booking-immersive .sbs-cat-dropdown-item.active {
    border-color: #111827 !important;
    background: #111827 !important;
    color: #fff !important;
    font-weight: 700 !important;
}

@media (max-width: 768px) {
    .sbs-category-tabs,
    body.sbs-booking-immersive .sbs-category-tabs {
        gap: 6px !important;
    }
    .sbs-cat-tab,
    body.sbs-booking-immersive .sbs-cat-tab {
        min-height: 38px !important;
        padding: 8px 10px !important;
        font-size: 11px !important;
    }
    #sbs-cat-more-btn,
    body.sbs-booking-immersive #sbs-cat-more-btn {
        min-width: 56px !important;
        padding-inline: 9px !important;
    }
}
