/* ===============================================
   TABS.CSS - Tabbed Navigation Styling
   IDENTICAL visual styling to Operator app
   =============================================== */

/* ===================================
   TAB NAVIGATION
   =================================== */

.tabbed-container {
    display: flex;
    flex-direction: column;
    height: 100%;  /* Fill main-content height - keeps tabs visible */
}

.tab-navigation {
    display: flex;
    background: transparent;
    border: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 0;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 8px var(--space-md);
    background: rgba(135, 134, 127, 0.08);
    border: none;
    cursor: pointer;
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-body);
    opacity: 0.7;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover:not(.active) {
    background: rgba(135, 134, 127, 0.12);
    opacity: 1;
}

.tab-button.active {
    background: var(--bg-workspace);
    color: var(--text-primary);
    opacity: 1;
    border: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 0;
    padding-bottom: 10px;
    position: relative;
    z-index: 1;
    box-shadow: 
        0 -2px 4px rgba(0, 0, 0, 0.1),
        -2px 0 4px rgba(0, 0, 0, 0.1),
        2px 0 4px rgba(0, 0, 0, 0.1);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bg-workspace);
}

.tab-icon {
    font-size: var(--text-base);
}

.tab-label {
    font-size: var(--text-sm);
}

.tab-badge {
    background: var(--color-primary);
    color: var(--bg-white);
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: var(--space-xs);
    min-width: 18px;
    text-align: center;
}

.tab-content-container {
    flex: 1;  /* Take remaining space after tab-navigation */
    display: flex;
    flex-direction: column;
    gap: 0;  /* Sections handle their own spacing */
    min-height: 0;
    padding: var(--space-lg);  /* 16px padding when main-content has tabs (no padding) */
    overflow-y: auto;  /* Scroll when content is long, stretch when short */
    /* Background inherited from .main-content */
    box-sizing: border-box;
    margin: 0;
    border: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        -2px 0 4px rgba(0, 0, 0, 0.1),
        2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Hide inactive tabs */
.tab-content-container.hidden {
    display: none;
}

/* Ensure sections within tabs follow high-density spacing */
.tab-content-container .dashboard-section {
    margin-bottom: var(--space-lg);  /* 16px between sections */
}

.tab-content-container .dashboard-section:last-child {
    margin-bottom: 0;  /* No margin on last section */
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .tab-button {
        padding: 8px var(--space-sm);
        font-size: var(--text-sm);
    }
    
    .tab-label {
        font-size: var(--text-xs);
    }
    
    .tab-icon {
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1 1 45%;
    }
}

