/**
 * Desire Address Manager Styles - Minimal (inherits theme styling)
 */

.desire-address-manager {
    margin-bottom: 30px;
}

/* Address Options */
.desire-address-options {
    margin-bottom: 15px;
}

.desire-address-option {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
}

.desire-address-option input[type="radio"] {
    margin-right: 10px;
}

.desire-default-address-display {
    display: block;
    margin-top: 5px;
    opacity: 0.8;
}

/* New Address Wrapper */
.desire-new-address-wrapper {
    margin-top: 15px;
    padding-top: 15px;
}

/* Address Input - inherit WooCommerce input styling */
.desire-address-input-wrapper {
    margin-bottom: 15px;
}

.desire-address-autocomplete {
    width: 100%;
}

/* Google Maps container */
.desire-address-map {
    width: 100%;
    height: 250px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

/* Registration form specific - ensure proper stacking */
.desire-registration-address .desire-address-map {
    margin-bottom: 20px;
}

.desire-registration-address {
    margin-bottom: 20px;
}

/* Save Default Checkbox */
.desire-save-default {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.desire-save-default input[type="checkbox"] {
    margin-right: 10px;
}

/* Ensure Google dropdown appears above other elements */
.pac-container {
    z-index: 10000;
}

@media (max-width: 768px) {
    .desire-address-map {
        height: 200px;
    }
}

/* Hide WooCommerce address fields (filled by Google Maps) */
.desire-hidden-field,
#billing_country_field,
#shipping_country_field {
    display: none !important;
}

/* Account page specific */
.desire-account-address {
    margin-bottom: 20px;
}

.desire-current-default {
    padding: 10px;
    background: #f0f7fc;
    border-left: 3px solid #0073aa;
    margin-bottom: 15px;
}
/* Spacing between billing and shipping sections */
#desire-address-manager-billing {
    margin-bottom: 30px;
}

#desire-address-manager-shipping {
    margin-top: 20px;
}
/* Unit/Complex field */
.desire-unit-wrapper {
    margin: 15px 0;
}

.desire-unit-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.desire-unit-wrapper input {
    width: 100%;
}

/* Ensure form submit button is always accessible */
.desire-registration-form .desire-form-full-width {
    position: relative;
    z-index: 1;
}

.desire-registration-form p.submit,
.desire-registration-form .woocommerce-form-row.form-row:last-of-type {
    position: relative;
    z-index: 10;
}

/* ==========================================
   Registration Form Specific Fixes
   ========================================== */

/* Container for address manager in registration forms */
.desire-registration-form .desire-form-full-width {
    overflow: visible;
    position: relative;
}

/* Address manager container */
.desire-registration-form .desire-address-manager {
    width: 100%;
    overflow: hidden;
}

/* Map container - constrain within parent */
.desire-registration-form .desire-address-map {
    width: 100%;
    height: 200px;
    max-height: 200px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 4px;
}

/* Ensure shipping section doesn't cause overflow */
.desire-registration-form #desire-shipping-address-section {
    overflow: hidden;
}

/* Input wrapper */
.desire-registration-form .desire-address-input-wrapper {
    margin-bottom: 15px;
}

/* Unit wrapper */
.desire-registration-form .desire-unit-wrapper {
    margin-bottom: 15px;
}

/* Prefilled address box */
.desire-registration-form .desire-prefilled-address {
    margin-bottom: 15px;
}

/* Force the form grid to contain children properly */
.desire-registration-form .desire-form-fields {
    overflow: visible;
}

/* Submit button area - ensure it's always visible */
.desire-registration-form > p.woocommerce-form-row,
.desire-registration-form > p.submit {
    clear: both;
    position: relative;
    z-index: 100;
    margin-top: 30px;
}