/**
 * Wizard Battles - Stat Chip Components
 * FASE 4: Stat selector chips for combat
 */

/* Stat Chip - Base */
.wb-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-paper-light);
    border: 2px solid var(--color-ink-secondary);
    box-shadow: 0 2px 8px rgba(42, 35, 40, 0.15);
    cursor: pointer;
    transition: all 200ms ease;
    position: relative;
    overflow: hidden;
}

.wb-stat-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
}

/* Stat Icon */
.wb-stat-chip-icon {
    width: 24px;
    height: 24px;
    font-size: 1.25rem;
    line-height: 1;
}

/* Stat Value */
.wb-stat-chip-value {
    font-family: var(--font-numeric);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--color-ink-primary);
    margin-top: 2px;
}

/* Stat Label (for accessibility) */
.wb-stat-chip-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* States */
.wb-stat-chip:hover {
    border-color: var(--color-accent-gold);
    transform: scale(1.1);
    box-shadow:
        0 4px 12px rgba(212, 175, 55, 0.25),
        0 0 0 2px rgba(212, 175, 55, 0.15);
}

.wb-stat-chip:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px var(--color-accent-gold),
        0 4px 12px rgba(212, 175, 55, 0.3);
}

.wb-stat-chip:active {
    transform: scale(0.95);
}

.wb-stat-chip.is-selected {
    background: linear-gradient(135deg, #D4AF37 0%, #C5A028 100%);
    border-color: var(--color-ink-primary);
    box-shadow:
        0 0 0 3px rgba(212, 175, 55, 0.4),
        0 4px 16px rgba(212, 175, 55, 0.35);
}

.wb-stat-chip.is-selected .wb-stat-chip-value {
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.wb-stat-chip.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Stat Types - Color variations */
.wb-stat-chip[data-stat="magic"] {
    --stat-color: #8E8DBE;
}

.wb-stat-chip[data-stat="skill"] {
    --stat-color: #88B08B;
}

.wb-stat-chip[data-stat="valor"] {
    --stat-color: #D97E7E;
}

.wb-stat-chip[data-stat="cunning"] {
    --stat-color: #D4AF37;
}

.wb-stat-chip[data-stat="intel"] {
    --stat-color: #6BA3D6;
}

/* Stat Selector Container */
.wb-stat-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px;
    flex-wrap: wrap;
}

/* Large variant for desktop */
@media (min-width: 768px) {
    .wb-stat-chip {
        width: 64px;
        height: 64px;
    }

    .wb-stat-chip-icon {
        width: 28px;
        height: 28px;
        font-size: 1.5rem;
    }

    .wb-stat-chip-value {
        font-size: 0.875rem;
    }

    .wb-stat-selector {
        gap: 16px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wb-stat-chip {
        transition: none;
    }

    .wb-stat-chip:hover,
    .wb-stat-chip:active {
        transform: none;
    }
}
