/**
 * BrandBees - RTL Overrides
 * Applied when WordPress is running in a right-to-left locale.
 */

/* Cutoff notice */
.brandbees-delivery-cutoff-notice {
    text-align: right !important;
}

.brandbees-delivery-cutoff-notice strong {
    margin-right: 0 !important;
    margin-left: 5px !important;
}

/* Radio field - flip margins */
.brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > input[type="radio"] {
    margin-right: 0;
    margin-left: 0.75em;
}

.brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > label.radio {
    margin: 0 0 0 2.5em;
}

.brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > label.radio:last-of-type {
    margin-left: 0;
}

/* Select dropdown arrow - flip to left side */
.brandbees-delivery-time-slot-field select {
    padding-right: 0.5em;
    padding-left: 3em;
    background-position: 0.5em 50%;
}

/* Spinner position */
.brandbees-delivery-spinner {
    margin-left: 0;
    margin-right: 10px;
}

/* Error icon position */
.brandbees-delivery-error[role="alert"] {
    padding-left: 0;
    padding-right: 1.2em;
}

.brandbees-delivery-error[role="alert"]::before {
    left: auto;
    right: 0;
}

/* Datepicker RTL - flip navigation */
.ui-datepicker-rtl .ui-datepicker-prev {
    right: auto;
    left: 2px;
}

.ui-datepicker-rtl .ui-datepicker-next {
    left: auto;
    right: 2px;
}

/* Mobile adjustments for RTL */
@media (max-width: 768px) {
    .brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > input[type="radio"] {
        margin-left: 0.5em;
        margin-right: 0;
    }

    .brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > label.radio {
        margin-left: 1.5em;
        margin-right: 0;
    }

    .brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > label.radio:last-of-type {
        margin-left: 0;
    }

    .brandbees-delivery-spinner {
        margin-right: 8px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > input[type="radio"] {
        margin-left: 0.4em;
        margin-right: 0;
    }

    .brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > label.radio {
        margin-left: 1em;
        margin-right: 0;
    }

    .brandbees-delivery-fulfillment-type-field .woocommerce-input-wrapper > label.radio:last-of-type {
        margin-left: 0;
    }
}
