/**
 * Vietnam Shipping Neo - Frontend Styles
 */

/* Hide postcode and address_2 fields */
.woocommerce-billing-fields .hidden,
.woocommerce-shipping-fields .hidden,
.woocommerce-billing-fields__field-wrapper .hidden,
.woocommerce-shipping-fields__field-wrapper .hidden {
    display: none !important;
}

/* Form row spacing for Province/Ward side-by-side */
.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
    width: 48%;
}

.woocommerce form .form-row-first {
    float: left;
    clear: both;
}

.woocommerce form .form-row-last {
    float: right;
}

.woocommerce form .form-row-wide {
    clear: both;
    width: 100%;
}

/* Select2 container styling */
.woocommerce-checkout .select2-container,
.woocommerce-checkout select {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: auto !important;
    min-height: 42px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 12px !important;
    color: #333 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999 !important;
}

/* Select2 dropdown styling */
.select2-dropdown {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.select2-search--dropdown {
    padding: 8px !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
}

.select2-results__option {
    padding: 10px 12px !important;
    font-size: 14px !important;
}

.select2-results__option--highlighted {
    background-color: #0073aa !important;
    color: #fff !important;
}

/* Loading state for selects */
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.select2-container--disabled .select2-selection {
    background-color: #f5f5f5 !important;
    cursor: not-allowed !important;
}

/* My Account address fields */
.woocommerce-address-fields select {
    width: 100%;
    max-width: 100%;
}

.woocommerce-address-fields .form-row-first,
.woocommerce-address-fields .form-row-last {
    width: 48.5%;
}

/* Cart page - hide address details */
.woocommerce-shipping-calculator .hidden {
    display: none !important;
}

/* Focus states */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #0073aa !important;
    outline: none !important;
    box-shadow: 0 0 0 1px #0073aa !important;
}

/* Clear floats */
.woocommerce form .form-row::after {
    content: "";
    display: table;
    clear: both;
}

/* Spacing between form rows */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row {
    margin-bottom: 15px;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        width: 100%;
        float: none;
    }
    
    .select2-container .select2-selection--single {
        min-height: 44px !important;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 42px !important;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 42px !important;
    }
}

