/* ============================================
   Test dei Colori - Custom Styles
   Extends test-style.css with color-specific layout
   ============================================ */

/* Color options grid layout (override default vertical stack) */
#test-dei-colori-wrapper .color-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-left: 0;
    margin-top: 16px;
}

/* Color option card */
#test-dei-colori-wrapper .color-option {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    text-align: center;
    gap: 8px;
    min-height: 90px;
}

/* Hide the radio button visually */
#test-dei-colori-wrapper .color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Color swatch circle */
#test-dei-colori-wrapper .color-swatch {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* White swatch needs visible border */
#test-dei-colori-wrapper .color-option .color-swatch[style*="#FFFFFF"] {
    border-color: #cbd5e1;
}

/* Color label text */
#test-dei-colori-wrapper .color-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Selected state for color option */
#test-dei-colori-wrapper .color-option.selected {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

#test-dei-colori-wrapper .color-option.selected .color-swatch {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#test-dei-colori-wrapper .color-option.selected .color-label {
    color: var(--color-primary-dark);
    font-weight: 600;
}

/* Hover state */
#test-dei-colori-wrapper .color-option:hover .color-swatch {
    transform: scale(1.1);
}

/* Result: large color display */
#test-dei-colori-wrapper .result-color-display {
    text-align: center;
    margin-bottom: 24px;
}

#test-dei-colori-wrapper .result-color-swatch {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#test-dei-colori-wrapper .result-color-name {
    font-size: 1.3rem;
    color: var(--color-text);
    margin: 0;
}

#test-dei-colori-wrapper .result-color-name strong {
    font-size: 1.5rem;
}

/* Responsive: 3 columns on tablet+, 3 on mobile too (smaller swatches) */
@media (max-width: 600px) {
    #test-dei-colori-wrapper .color-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    #test-dei-colori-wrapper .color-option {
        padding: 10px 6px;
        min-height: 80px;
    }

    #test-dei-colori-wrapper .color-swatch {
        width: 40px;
        height: 40px;
    }

    #test-dei-colori-wrapper .color-label {
        font-size: 0.7rem;
    }

    #test-dei-colori-wrapper .result-color-swatch {
        width: 90px;
        height: 90px;
    }
}
