/* ====================================
   DECK DISPLAY - TABBED CARD SYSTEM
   For showing all cards in deck by guild
   ==================================== */

/* --- Section Container --- */
.whats-in-deck {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.whats-in-deck .section-content {
    width: 100%;
}

.whats-in-deck h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* --- Tab Navigation --- */
.deck-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-red) var(--bg-card);
    padding-bottom: 0.5rem;
}

.deck-tabs::-webkit-scrollbar {
    height: 6px;
}

.deck-tabs::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 3px;
}

.deck-tabs::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 3px;
}

/* --- Individual Tab Buttons --- */
.deck-tab {
    flex: 0 0 auto;
    background: var(--bg-card);
    border: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly */
}

.deck-tab:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.deck-tab.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #ffffff;
}

/* --- Show/Hide Tab Text Based on Screen Size --- */
.deck-tab .tab-short {
    display: none;
}

.deck-tab .tab-full {
    display: inline;
}

/* --- Card Container --- */
.deck-cards-container {
    position: relative;
    min-height: 400px;
}

/* --- Card Grid --- */
.deck-cards {
    display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.deck-cards.active {
    display: grid;
}

/* --- Individual Card Item --- */
.card-item {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 2.5 / 3.5; /* Playing card ratio */
}

.card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(255, 0, 85, 0.3);
}

/* --- Fade In Animation --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Breakpoints --- */

/* Tablet (4 cards per row) */
@media (max-width: 1024px) {
    .deck-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

/* Mobile (2 cards per row + short tab names) */
@media (max-width: 768px) {
    .whats-in-deck {
        padding: 0 1rem;
    }
    
    .whats-in-deck h2 {
        font-size: 2rem;
    }
    
    /* Show short tab names on mobile */
    .deck-tab .tab-short {
        display: inline;
    }
    
    .deck-tab .tab-full {
        display: none;
    }
    
    .deck-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .deck-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .card-item:hover {
        transform: translateY(-4px);
    }
}

/* Small phones (extra narrow) */
@media (max-width: 480px) {
    .deck-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* --- Loading State (Optional) --- */
.deck-cards.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Empty State (if needed) --- */
.deck-cards:empty::after {
    content: "No cards to display";
    display: block;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}
