﻿/* Attribute error field */
.noValueOptionSelected {
    background-color: var(--AlertColor);
}

.productAttributeDropDownError,
.productAttributeTextFieldError,
.productAttributeRadioButtonError,
.productAttributeColorPickerError {
    color: var(--AlertColor);
    display: none;
}

.is-invalid .productAttributeDropDownError,
.is-invalid .productAttributeTextFieldError,
.is-invalid .productAttributeRadioButtonError,
.is-invalid .productAttributeColorPickerError {
    display: block;
}

.shopProductAttributeDropDownContainer.is-invalid .productAttribute {
    border-color: var(--AlertColor);
}

/* Product attributes */
.shopProductAttributes .shopProductAttributeContainer {
    margin-bottom: 15px;
}

    .shopProductAttributes .shopProductAttributeContainer:last-child {
        margin-bottom: 0;
    }

.shopProductAttributes .control-label {
    display: block;
    margin-bottom: 5px;
}

.shopProductAttributeTextFieldInfo {
    margin-bottom: 5px;
}

/* Attribute value preview */
.shopProductAttributeInputRow {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .shopProductAttributeInputRow .productAttribute {
        flex: 1 1 auto;
        min-width: 0;
    }

.shopProductAttributeValuePreview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.shopProductAttributeInputRow .shopProductAttributeValuePreview {
    flex: 0 0 auto;
    margin-top: 0;
}

.shopProductAttributeValuePreview:empty {
    display: none;
}

.shopProductAttributeValuePreview img {
    display: block;
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

/* Attribute color picker */
.colorPickerWrapper {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.colorPickerLabel {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 1px solid #EFEFEF;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.colorPickerWrapper:hover .colorPickerLabel {
    border-color: #888;
    transform: scale(1.08);
}

.productAttributeColorPicker:checked + .colorPickerLabel {
    border-color: #333;
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(40, 40, 40, 0.4);
}

/* Attribute color picker tooltip */
.colorPickerWrapper .tooltip {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.colorPickerWrapper:hover .tooltip {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}
