/* ========================================
   EVENT ICON GRID
   Replaces the old puzzle carousel.
   Uses @cubing/icons for puzzle icons.
   Compact — fits all 13 events on one row on desktop.
   ======================================== */

.event-icon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.1rem;
    max-width: 100%;
    margin: 0 auto;
}

.event-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: clamp(52px, 7.5vw, 72px);
    min-height: clamp(56px, 8vw, 74px);
    padding: 0.3rem 0.2rem 0.25rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
    background: transparent;
    border: 2px solid transparent;
    gap: 0.2rem;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.event-icon-item:hover {
    background: rgba(77, 163, 255, 0.07);
    transform: translateY(-1px);
}

.event-icon-item.selected {
    background: linear-gradient(135deg, rgba(77, 163, 255, 0.12), rgba(10, 88, 202, 0.06));
    border-color: var(--primary-color, #4da3ff);
    box-shadow: 0 3px 12px rgba(77, 163, 255, 0.2);
    transform: translateY(-1px);
}

.event-icon-item .cubing-icon {
    font-size: clamp(1.35rem, 2.8vw, 1.7rem);
    color: var(--text-color, #333);
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.event-icon-item.selected .cubing-icon {
    color: var(--primary-color, #4da3ff);
    transform: scale(1.1);
}

.event-icon-item:hover .cubing-icon {
    color: var(--primary-color, #4da3ff);
}

.event-icon-label {
    font-size: clamp(0.55rem, 1.3vw, 0.7rem);
    font-weight: 600;
    color: var(--text-color, #333);
    text-align: center;
    line-height: 1.1;
    transition: color 0.2s ease;
    max-width: 100%;
    word-break: break-word;
}

.event-icon-item.selected .event-icon-label {
    color: var(--primary-color, #4da3ff);
    font-weight: 700;
}

/* Dark mode overrides */
[data-theme="dark"] .event-icon-item .cubing-icon {
    color: #c8c8d8;
}

[data-theme="dark"] .event-icon-item:hover {
    background: rgba(77, 163, 255, 0.10);
}

[data-theme="dark"] .event-icon-item.selected {
    background: linear-gradient(135deg, rgba(77, 163, 255, 0.15), rgba(10, 88, 202, 0.08));
    border-color: var(--primary-light, #6bb5ff);
    box-shadow: 0 3px 16px rgba(77, 163, 255, 0.25);
}

[data-theme="dark"] .event-icon-item.selected .cubing-icon {
    color: var(--primary-light, #6bb5ff);
}

[data-theme="dark"] .event-icon-item.selected .event-icon-label {
    color: var(--primary-light, #6bb5ff);
}

[data-theme="dark"] .event-icon-item .event-icon-label {
    color: #b8b8ce;
}

/* Responsive: tighter on very small screens */
@media (max-width: 480px) {
    .event-icon-grid {
        gap: 0.15rem;
        padding: 0.15rem 0.05rem;
    }

    .event-icon-item {
        width: clamp(42px, 12vw, 52px);
        min-height: clamp(44px, 13vw, 54px);
        padding: 0.2rem 0.1rem 0.15rem;
        border-radius: 6px;
    }

    .event-icon-item .cubing-icon {
        font-size: clamp(1.1rem, 4vw, 1.35rem);
    }

    .event-icon-label {
        font-size: clamp(0.45rem, 1.8vw, 0.55rem);
    }
}
