﻿/* 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);
}


/* Shop product document audio preview */

.shopProductDocuments .productDocument {
    margin-bottom: 12px;
}

.shopProductDocuments .shopProductDocumentLink {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    overflow-wrap: anywhere;
}

    .shopProductDocuments .shopProductDocumentLink .fa-file-pdf {
        color: var(--LinkColor, #b42318);
    }

/* Audio block */
.shopProductAudioPlayer .beAudioPlayer {
    display: block;
    width: 100%;
    max-width: 700px;
}

.shopProductAudioPlayer .beAudioPlayerControls {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: min(440px, 100%);
    min-height: 52px;
    padding: 7px 13px;
    border: 1px solid var(--AudioPlayerBorderColor);
    border-radius: 8px;
    background-color: var(--AudioPlayerBackgroundColor);
    color: var(--AudioPlayerTextColor);
    font-family: inherit;
    font-size: 12px;
}

.shopProductAudioPlayer audio.beAudioEnhanced {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.shopProductAudioPlayer .beAudioPlayerControls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--AudioPlayerAccentColor);
    cursor: pointer;
}

    .shopProductAudioPlayer .beAudioPlayerControls button:hover {
        background-color: rgba(0, 0, 0, .06);
    }

    .shopProductAudioPlayer .beAudioPlayerControls button:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

.shopProductAudioPlayer .beAudioPlayerControls svg {
    display: block;
    width: 19px;
    height: 19px;
}

.shopProductAudioPlayer .beAudioPlayerControls .beAudioPlayPause {
    width: 36px;
    height: 36px;
}

    .shopProductAudioPlayer .beAudioPlayerControls .beAudioPlayPause svg {
        width: 23px;
        height: 23px;
    }

.shopProductAudioPlayer .beAudioPlayerControls .beAudioTime {
    flex: 0 0 auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.shopProductAudioPlayer .beAudioPlayerControls input[type="range"] {
    --audio-progress: 0%;
    display: block;
    flex: 1 1 auto;
    min-width: 28px;
    width: 100%;
    height: 16px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

    .shopProductAudioPlayer .beAudioPlayerControls input[type="range"]::-webkit-slider-runnable-track {
        height: 5px;
        border-radius: 5px;
        background: linear-gradient(to right, var(--AudioPlayerAccentColor) var(--audio-progress), var(--AudioPlayerProgressBackgroundColor) var(--audio-progress));
    }

    .shopProductAudioPlayer .beAudioPlayerControls input[type="range"]::-moz-range-track {
        height: 5px;
        border-radius: 5px;
        background: var(--AudioPlayerProgressBackgroundColor);
    }

    .shopProductAudioPlayer .beAudioPlayerControls input[type="range"]::-moz-range-progress {
        height: 5px;
        border-radius: 5px;
        background: var(--AudioPlayerAccentColor);
    }

    .shopProductAudioPlayer .beAudioPlayerControls input[type="range"]::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
        margin-top: -3.5px;
        border: 0;
        border-radius: 50%;
        background: var(--AudioPlayerAccentColor);
        appearance: none;
        -webkit-appearance: none;
    }

    .shopProductAudioPlayer .beAudioPlayerControls input[type="range"]::-moz-range-thumb {
        width: 12px;
        height: 12px;
        border: 0;
        border-radius: 50%;
        background: var(--AudioPlayerAccentColor);
    }

    .shopProductAudioPlayer .beAudioPlayerControls input[type="range"]:disabled {
        cursor: default;
        opacity: .5;
    }

.shopProductAudioPlayer .beAudioPlayerControls .beAudioVolume {
    flex: 0 0 65px;
    width: 65px;
}

.shopProductAudioPlayer .beAudioPlayerControls :is(button, input):focus-visible {
    outline: 2px solid var(--AudioPlayerFocusColor);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .shopProductAudioPlayer .beAudioPlayerControls {
        gap: 8px;
        padding: 7px 10px;
    }

        .shopProductAudioPlayer .beAudioPlayerControls .beAudioVolume {
            display: none;
        }
}


/* Audio player title inside the player surface */
.shopProductAudioPlayer .beAudioPlayerShell:has(.beAudioTitle) {
    box-sizing: border-box;
    width: min(440px, 100%);
    max-width: 100%;
    border: 1px solid var(--AudioPlayerBorderColor);
    border-radius: 8px;
    background-color: var(--AudioPlayerBackgroundColor);
    color: var(--AudioPlayerTextColor);
    overflow: hidden;
}

.shopProductAudioPlayer .beAudioPlayerShell .beAudioTitle {
    padding: 13px 13px 0;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.shopProductAudioPlayer .beAudioPlayerShell:has(.beAudioTitle) .beAudioPlayerControls {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
}
