/* GetAddress.io Address Autocomplete Styling */

.getaddress-autocomplete-wrapper {
    margin-bottom: 30px;
    padding: 0;
}

.getaddress-autocomplete-container {
    width: 100%;
}

.getaddress-autocomplete-fieldset {
    border: 2px solid #1979c3 !important;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.getaddress-autocomplete-fieldset .legend {
    font-size: 16px;
    font-weight: 600;
    color: #1979c3;
    margin-bottom: 15px;
    padding: 0;
    border: none;
    width: auto;
}
    position: relative;
    margin-bottom: 15px;
}

.autocomplete-search {
    width: 100%;
    padding: 10px;
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    font-size: 14px;
}

.autocomplete-search:focus {
    outline: none;
    border-color: #1979c3;
    box-shadow: 0 0 0 3px rgba(25, 121, 195, 0.1);
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 36px;
    padding: 5px 10px;
    background-color: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
}

.clear-search:hover {
    color: #333;
}

/* Loading Indicator */
.getaddress-loading {
    display: flex;
    align-items: center;
    padding: 10px;
    color: #666;
    font-size: 13px;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1979c3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Address Results Dropdown */
.getaddress-results {
    position: relative;
    background-color: white;
    border: 1px solid #d3d3d3;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.address-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.address-item {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #e8e8e8;
}

.address-item:last-child {
    border-bottom: none;
}

.address-link {
    display: block;
    padding: 12px;
    color: #1979c3;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.address-link:hover {
    background-color: #f0f0f0;
    color: #0d5aa9;
}

/* Selected Address Display */
.selected-address-box {
    background-color: #f9f9f9;
    border: 1px solid #dbdbdb;
    padding: 15px;
    margin-top: 10px;
    border-radius: 4px;
}

.selected-address,
.selected-postcode {
    display: block;
    padding: 8px 0;
    color: #333;
    font-weight: 500;
}

.selected-postcode {
    color: #666;
    font-size: 13px;
}

/* Field Label */
.field-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Error Message */
.message.error {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #fee;
    border: 1px solid #f00;
    color: #c00;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .getaddress-autocomplete-fieldset {
        padding: 15px;
    }

    .autocomplete-search {
        font-size: 16px;
        padding: 12px;
    }

    .clear-search {
        top: 38px;
    }

    .address-link {
        padding: 15px;
    }

    .getaddress-results {
        max-height: 250px;
    }
}

/* Debug Message */
.getaddress-debug-message {
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #856404;
    font-weight: 600;
}
