/* ============================================
   WOO LOCATION SELECTOR - CHECKOUT PAGE STYLES
   ============================================ */

/* Location Selector Container */
#woo-location-selector {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

#woo-location-selector h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
}

/* Invalid state styling */
#woo-location-selector.woocommerce-invalid {
    border-color: #e2401c;
    background: #fff3f3;
}

#woo-location-selector.woocommerce-invalid::after {
    content: 'Please select your location on the map';
    display: block;
    color: #e2401c;
    font-size: 0.9em;
    margin-top: 10px;
    font-weight: 500;
}

/* Controls container */
.woo-location-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Search input */
#woo-location-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#woo-location-input:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 1px #28a745;
}

/* Get location button - Green Brand Color */
#woo-get-location {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

#woo-get-location:hover {
    background: #218838;
}

#woo-get-location:active {
    background: #1e7e34;
}

#woo-get-location:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Map container */
#woo-map {
    width: 100%;
    height: 350px;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

/* Selected address display - Green Theme */
#woo-selected-address {
    background: #f0f9f4;
    padding: 12px 15px;
    border-radius: 5px;
    border-left: 4px solid #28a745;
    margin-top: 10px;
    line-height: 1.6;
}

#woo-selected-address strong {
    color: #28a745;
    display: block;
    margin-bottom: 5px;
}

#woo-address-display {
    color: #333;
    font-size: 14px;
}

/* Google Maps autocomplete dropdown styling */
.pac-container {
    border-radius: 5px;
    border-top: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    margin-top: 2px;
    font-family: inherit;
    z-index: 9999;
}

.pac-item {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
}

.pac-item:hover {
    background-color: #f5f5f5;
}

.pac-icon {
    margin-right: 10px;
}

/* Responsive styles for tablets */
@media (max-width: 768px) {
    .woo-location-controls {
        flex-direction: column;
    }
    
    #woo-location-input {
        min-width: 100%;
    }
    
    #woo-get-location {
        width: 100%;
    }
    
    #woo-map {
        height: 300px;
    }
}

/* Responsive styles for mobile */
@media (max-width: 480px) {
    #woo-location-selector {
        padding: 15px;
    }
    
    #woo-map {
        height: 250px;
    }
    
    #woo-location-selector h3 {
        font-size: 1.1em;
    }
}