/* ================================================================
   Material & Color Configurator — Frontend Styles
   ================================================================ */

.mcc-configurator-wrap {
    margin: 16px 0;
    padding: 0;
}

/* Material Dropdown */
.mcc-field {
    margin-bottom: 16px;
}

.mcc-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.mcc-material-field select {
    width: 100%;
    max-width: 320px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

/* Color Swatches */
.mcc-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mcc-swatch {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s, transform 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.mcc-swatch:hover {
    transform: scale(1.12);
    border-color: rgba(0, 0, 0, 0.25);
}

.mcc-swatch.selected {
    border-color: #333;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

/* Tooltip */
.mcc-swatch .mcc-swatch-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}

.mcc-swatch .mcc-swatch-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.mcc-swatch:hover .mcc-swatch-tooltip {
    opacity: 1;
}

/* Validation highlight */
.mcc-field.mcc-error select,
.mcc-field.mcc-error .mcc-color-swatches {
    outline: 2px solid #d63638;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selected color label */
.mcc-selected-label {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}

.mcc-selected-label strong {
    color: #222;
}
