/* ============================================
   PANEL TABS
   Tab navigation for right panel
   ============================================ */

.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    padding: 4px;
    gap: 4px;
}

.panel-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.panel-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.panel-tab.active {
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: bold;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Deck count badge */
.deck-count {
    margin-left: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
}

.extra-count-badge {
    margin-left: 4px;
    background: rgba(139, 92, 246, 0.3);
    /* Purple tint for distinction */
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: 600;
}

.panel-tab.active .deck-count {
    background: rgba(0, 0, 0, 0.2);
}

/* Warning badge */
.warning-badge {
    margin-right: 6px;
    font-size: 1.1em;
    cursor: help;
}

/* Invalid State for Deck Tab */
.panel-tab.invalid {
    border-color: rgba(255, 68, 68, 0.5);
    background: rgba(255, 68, 68, 0.1);
}

.panel-tab.invalid:hover {
    background: rgba(255, 68, 68, 0.15);
}

.panel-tab.invalid.active {
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.2) 0%, rgba(200, 50, 50, 0.3) 100%);
}

/* View Mode Toggles */
.deck-view-toggles {
    display: flex;
    gap: 4px;
}

/* Tab Panel Container (for CSS-based visibility) */
.tab-panel {
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}

.tab-panel.active {
    /* Ensure active panel takes full space */
    flex: 1;
}

/* Mobile: Enable scrolling on the tab panel itself */
@media (max-width: 768px) {
    .tab-panel {
        overflow: visible;
        /* Don't clip on mobile */
    }

    .tab-panel.active {
        overflow-y: auto !important;
        /* Enable scrolling */
        overflow-x: hidden;
    }
}