/**
 * Tabs Block Styles
 */

.block-tabs {
    position: relative;
}

/* Tab Navigation */
.tabs-nav {
    display: flex;
    width: 100%;
    gap: 0;
}

.tab-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    position: relative;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    flex: 1;
}

/* First tab - rounded left */
.tab-btn:first-child {
    border-top-left-radius: 0.5rem;
}

/* Last tab - rounded right */
.tab-btn:last-child {
    border-top-right-radius: 0.5rem;
}

/* Remove left border for all except first to avoid double borders */
.tab-btn:not(:first-child) {
    border-left-width: 0;
}

.tab-btn:hover {
    position: relative;
    z-index: 1;
}

.tab-btn:focus {
    outline: 2px solid currentColor;
    outline-offset: -2px;
    z-index: 2;
}

/* Active tab - higher z-index to overlap border, bottom border removed */
.tab-btn.tab-active {
    border-bottom-width: 0 !important;
    position: relative;
    z-index: 3;
    /* Add a little extra height to overlap the content border */
    margin-bottom: -2px;
    padding-bottom: calc(0.75rem + 2px);
}

/* Tab Content Wrapper */
.tabs-content-wrapper {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

/* Tab Panels */
.tab-panel {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Match Height */
.media-match-height {
    height: auto;
    min-height: 300px;
}

@media (min-width: 992px) {
    .media-match-height {
        /* Height will be set by JavaScript to match text content + 50px */
        height: 100%;
    }
}

/* Stats Animation */
.stat-value {
    display: inline-block;
    min-width: 1ch;
    text-align: left;
}

/* Mobile Optimization */
@media (max-width: 767px) {
    .tabs-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
        border-radius: 0;
        border-bottom-width: 0 !important;
        border-left-width: 2px !important;
    }
    
    .tab-btn:first-child {
        border-top-left-radius: 0.5rem;
        border-top-right-radius: 0.5rem;
    }
    
    .tab-btn:last-child {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-width: 0 !important;
    }
    
    .tab-btn.tab-active {
        margin-bottom: 0;
        padding-bottom: 0.75rem;
        border-right-width: 0 !important;
        margin-right: -2px;
        padding-right: calc(1rem + 2px);
    }
    
    .tabs-content-wrapper {
        border-left-width: 0 !important;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
}

/* Ensure hidden tabs are truly hidden */
.tab-panel.hidden {
    display: none !important;
}

/* Gradient circle animation */
.gradient-circle {
    animation: gradientFloat 8s ease-in-out infinite;
}

@keyframes gradientFloat {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

