/*
Theme Name: Motors Child
Theme URI: [albaniabymoto.com](https://albaniabymoto.com)
Description: Child theme for the Motors WordPress theme, used for customizations on Albania By Moto.
Author: Albania By Moto
Author URI: [albaniabymoto.com](https://albaniabymoto.com)
Template: motors
Version: 1.0
License: GNU General Public License v2 or later
License URI: [gnu.org](https://www.gnu.org/licenses/gpl-2.0.html)
Text Domain: motors-child
*/

/* ----------------------------------------------------
   Add your custom CSS below
---------------------------------------------------- */

/* Example: Center the driver license upload fields on checkout */
#driver_license_fields select {
    max-width: 300px;
    height: 40px;
    border-radius: 4px;
}

#driver_license_fields input[type="file"] {
    display: block;
    margin-top: 5px;
    padding: 5px 0;
}

#driver_license_fields {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
/* === Block Checkout: fix floating label overlap on selects === */

/* Push placeholder text down so it doesn't collide with the floating label */
.wc-block-components-form .wc-block-components-combobox .components-combobox-control__suggestions-container input,
.wc-block-components-form select.wc-block-components-select__select,
.wc-block-checkout select {
    padding-top: 18px !important;
    padding-bottom: 6px !important;
    height: auto !important;
    min-height: 50px;
}

/* Custom additional fields — make sure the label floats correctly */
.wc-block-components-form .wc-block-components-select {
    position: relative;
}

.wc-block-components-form .wc-block-components-select label,
.wc-block-components-form .wc-block-components-text-input label {
    pointer-events: none;
}

/* Force native selects to behave like the rest of the form */
#albaniabymoto-rider-age,
#albaniabymoto-license-category,
select[name="albaniabymoto/rider-age"],
select[name="albaniabymoto/license-category"] {
    padding: 18px 12px 6px !important;
    height: 50px !important;
    line-height: 1.4 !important;
    font-size: 14px !important;
}

/* === Make additional fields full-width instead of side-by-side === */
/* The two dropdowns are too cramped at 50% width with their long labels */
.wc-block-components-address-form .wc-block-components-address-form__albaniabymoto-rider-age,
.wc-block-components-address-form .wc-block-components-address-form__albaniabymoto-license-category {
    flex-basis: 100% !important;
    max-width: 100% !important;
}

/* === Driver License Upload panel: tidy spacing === */
.albaniabymoto-license-block {
    margin: 24px 0 !important;
}

.albaniabymoto-license-block input[type="file"] {
    cursor: pointer;
}


/* === Block Checkout: hide Select2 widget if it leaks in, force native render === */

/* Hide any Select2 dropdown that the Motors plugin may inject onto the country field */
.wc-block-checkout .select2-container,
.wc-blocks-components-select .select2-container,
.wp-block-woocommerce-checkout .select2-container {
    display: none !important;
}

/* Make sure the underlying native select stays visible if Select2 was hiding it */
.wc-block-checkout select.country_select,
.wc-block-checkout select.state_select,
.wc-block-checkout select[name*="country"],
.wc-block-checkout select[name*="state"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
}

/* Tidy up native selects on the Block Checkout to match the rest of the form */
.wc-block-checkout select,
.wp-block-woocommerce-checkout select {
    height: 50px;
    padding: 18px 12px 6px;
    line-height: 1.4;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    appearance: auto;
}