/* Form Elements & Input Styles */

/* resetes */

.woocommerce form .form-row {
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}

/* === WOOCOMMERCE STYLES === */

/* --- WooCommerce Checkout Page --- */

/* General styling for all input, textarea, and select fields on the checkout page */
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select#billing_country,
.woocommerce-checkout .form-row select#billing_state {
    background: var(--osp-input-background);
    border: 1px solid var(--osp-input-border-color);
    border-radius: 5px;
    height: 55px;
    padding: 5px 20px;
    color: #ffffffcc;
    box-sizing: border-box;
    width: 100%;
}

/* Focus styling for billing form fields */
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus,
.woocommerce-checkout .form-row select#billing_country:focus,
.woocommerce-checkout .form-row select#billing_state:focus {
    border: 1px solid var(--osp-primary-color) !important;
    outline: none;
    box-shadow: none !important;
}

/* Billing form labels styling */
.woocommerce-checkout .form-row label {
    color: #ffffffb5;
    font-size: 15px;
    margin-bottom: 0px;
}

/* Required field asterisk styling */
.woocommerce form .form-row .required {
    color: #ffffffb5;
}

/* Form row margin styling */
.woocommerce .woocommerce-billing-fields .form-row {
    margin: 0 0 20px 0;
}

/* Placeholder text visibility for checkout inputs and textareas */
.woocommerce-checkout .form-row input.input-text::placeholder,
.woocommerce-checkout .form-row textarea::placeholder,
.woocommerce-checkout .form-row input[type="number"]::placeholder {
    color: #ffffff80 !important;
    opacity: 1 !important;
}

/* --- WooCommerce Select2 Enhanced Dropdowns --- */

/* Styling for Select2 dropdown panel */
.select2-dropdown {
    background-color: #19202e !important;
    border: 1px solid var(--osp-input-border-color) !important;
    border-radius: 5px !important;
    padding: 10px !important;
}

/* Padding adjustment for rendered selection in Select2 */
.select2-container .select2-selection--single .select2-selection__rendered {
    padding-top: 0 !important;
    color: #ffffffcc;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ffffff4a;
    background: #19202e;
    border-radius: 5px;
    color: white;
}

/* Height for Select2 selection box on checkout */
.woocommerce-checkout .select2-selection {
    height: 50px !important;
    background-color: var(--osp-input-background);
    border: 1px solid var(--osp-input-border-color);
    border-radius: 5px;
    padding-left: 10px;
}

/* Focus styling for Select2 dropdowns */
.woocommerce-checkout .select2-container--default .select2-selection--single:focus,
.woocommerce-checkout .select2-container--default.select2-container--focus .select2-selection--single {
    border: 1px solid var(--osp-primary-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Line height for rendered text in Select2 selection box on checkout */
.woocommerce-checkout .select2-selection__rendered {
    line-height: 50px !important;
}

.select2-results__option {
    color: #ffffffcf;
}

.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--default .select2-results__option[data-selected=true] {
    background-color: #000000;
}

/* --- WooCommerce Custom Spinner/Loader --- */

/* Hides the default WooCommerce spinner icon */
.woocommerce .blockUI.blockOverlay:before {
    display: none !important;
}

/* Styles the overlay for the custom spinner */
.woocommerce .blockUI.blockOverlay {
    background: rgb(5 13 28 / 63%) !important;
    opacity: 1 !important;
    position: relative;
}

/* Creates the custom spinner element */
.woocommerce .blockUI.blockOverlay:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: checkout-spinner 0.6s linear infinite;
}

/* Animation for the custom spinner */
@keyframes checkout-spinner {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* === BUTTON STYLES === */

/* Styling for buttons with aria-label="Open Form" on hover, focus, and active states */
button[aria-label="Open Form"]:active,
button[aria-label="Open Form"]:focus,
button[aria-label="Open Form"]:hover {
    background: #ffffff52 !important;
    border-radius: 12px !important;
}

/* Policy Checkboxes */
.policy-checkboxes-wrapper {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    margin: 20px 0 !important;
}

.policy-checkboxes-wrapper .form-row {
    margin-bottom: 12px !important;
}

.policy-checkboxes-wrapper input[type="checkbox"] {
    margin-right: 10px !important;
    accent-color: #66ccff !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.policy-checkboxes-wrapper input[type="checkbox"]:checked {
    background-color: #66ccff !important;
    border-color: #66ccff !important;
}

.policy-checkboxes-wrapper label {
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1.5 !important;
}

.policy-checkboxes-wrapper .woocommerce-form__label-text {
    color: #ffffffcc !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.policy-checkboxes-wrapper a {
    color: #62cbffc7 !important;
    text-decoration: underline !important;
}

.policy-checkboxes-wrapper .woocommerce-invalid .woocommerce-form__label-text,
.policy-checkboxes-wrapper .form-row.woocommerce-invalid .woocommerce-form__label-text {
    color: #ff4444 !important;
}

.policy-checkboxes-wrapper label:hover {
    opacity: 1 !important;
}

.policy-checkboxes-wrapper input[type="checkbox"]:hover {
    transform: scale(1.1) !important;
    transition: transform 0.2s ease !important;
}

.policy-checkboxes-wrapper .form-row.woocommerce-validated input[type="checkbox"] {
    accent-color: #66ccff !important;
    background-color: #66ccff !important;
}