/**
 * Tab Hover & Animation Styles
 * - Smooth crossfade transitions
 * - Mobile scroll indicators
 */

/* ============================================
   Tab Panel Transitions
   ============================================ */

/* Base panel state - hidden */
.gb-tabs__item {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    will-change: opacity, transform;
}

/* Active panel - visible */
.gb-tabs__item.gb-tabs__item-open {
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateY(0);
}

/* Ensure content wrapper has relative positioning */
.gb-tabs__panel-wrapper {
    position: relative;
    min-height: 200px; /* Adjust based on your content */
}


/* ============================================
   Mobile Tab Menu Fix
   ============================================ */

.gb-tabs__menu {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    gap: 0.5rem;
}

/* Hide scrollbar Chrome/Safari */
.gb-tabs__menu::-webkit-scrollbar {
    display: none;
}

/* Prevent tab items from shrinking or wrapping */
.gb-tabs__menu-item {
    flex: 0 0 auto;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .gb-tabs__menu {
        padding: 0 1rem;
        margin: 0 -1rem; /* Bleed to edges */
        width: calc(100% + 2rem);
    }
    
    .gb-tabs__menu-item {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}


/* ============================================
   Mobile Scroll Indicators
   ============================================ */

/* Gradient fade indicators for scrollable menus */
.gb-tabs__menu.is-scrollable::before,
.gb-tabs__menu.is-scrollable::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s ease;
}
