/**
 * Frvoya TaxSwitch Module - Styles  */

/* Container principal */
.frvoya-taxswitch-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 15px;
    padding: 0px 12px;
    border-radius: 4px;
}

.taxswitch-label {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    margin: 0;
}

.taxswitch-wrapper {
    display: inline-block;
}

.taxswitch-form {
    margin: 0;
}

/* Select Dropdown */
.taxswitch-select {
    padding: 5px 30px 5px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    min-width: 120px;
}

.taxswitch-select:hover {
    border-color: #bbb;
}

.taxswitch-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Radio Buttons */
.taxswitch-radios {
    display: flex;
    gap: 15px;
    align-items: center;
}

.taxswitch-radios input[type="radio"] {
    margin: 0;
    margin-right: 5px;
    cursor: pointer;
}

.taxswitch-radio-label {
    font-size: 14px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.taxswitch-radio-label:hover {
    color: #007bff;
}

/* Toggle Switch - Style */
.taxswitch-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 0px 10px;
    border-radius: 20px;
}

.taxswitch-toggle-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-weight: 500;
    padding: 2px 0;
}

.taxswitch-toggle-label:hover {
    color: rgba(255, 255, 255, 0.9);
}

.taxswitch-toggle-label.active {
    color: #fff;
    font-weight: 600;
}

.taxswitch-toggle-button {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 22px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.taxswitch-toggle-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.taxswitch-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.taxswitch-toggle-slider.off {
    transform: translateX(22px);
}

/* Responsive */
@media (max-width: 768px) {
    .frvoya-taxswitch-container {
        flex-direction: row;
        gap: 6px;
        margin: 5px;
        padding: 3px 8px;
    }
    
    .taxswitch-label {
        font-size: 12px;
    }
    
    .taxswitch-select {
        font-size: 13px;
        min-width: 100px;
    }
    
    .taxswitch-radios {
        gap: 10px;
        font-size: 13px;
    }
    
    .taxswitch-toggle-wrapper {
        gap: 6px;
        padding: 3px 8px;
    }
    
    .taxswitch-toggle-label {
        font-size: 12px;
    }

    .taxswitch-toggle-button {
        width: 40px;
        height: 20px;
    }

    .taxswitch-toggle-slider {
        width: 16px;
        height: 16px;
    }

    .taxswitch-toggle-slider.off {
        transform: translateX(20px);
    }
}

/* Animation pour le changement */
@keyframes taxswitch-change {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.taxswitch-form.changing {
    animation: taxswitch-change 0.3s ease;
}

/* Suffix TTC/HT aprÃ¨s les prix */
.tax-suffix {
    font-size: 0.75em;
    font-weight: 500;
    color: #666;
    margin-left: 3px;
    text-transform: uppercase;
}

.price-box .tax-suffix {
    font-size: 0.7em;
    vertical-align: super;
}

.product-item-details .tax-suffix {
    font-size: 0.65em;
    color: #888;
}

/* Style pour le header gris comme Bricozor */
.header.panel .frvoya-taxswitch-container {
    background: transparent;
    padding: 0;
}

.header.panel .taxswitch-label {
    color: #fff;
    font-weight: 400;
}

.header.panel .taxswitch-toggle-wrapper {
    background: rgba(255, 255, 255, 0.2);
}

.header.panel .taxswitch-toggle-button {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Hide suffix on eco-participation / WEEE / fixed taxes */
span.weee[data-price-type="weee"] .tax-suffix {  /* Uniquement LE span.weee de l'éco-part */
    display: none;
}