.address-autocomplete {
    position: relative;
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.address-autocomplete label {
    color: #003366;
    font-weight: 700;
}

.address-widget {
    position: relative;
    min-height: 48px;
}

.address-search-control {
    position: relative;
    width: 100%;
}

.address-search-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
    padding: 11px 42px 11px 14px;
    color: #1f2937;
    background: #fff;
    border: 2px solid #0052cc;
    border-radius: 12px;
    font: inherit;
    outline: none;
    appearance: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.address-search-input:focus {
    border-color: #003d99;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, .14);
}

.address-search-input:disabled {
    color: #64748b;
    background: #f4f7fb;
    cursor: not-allowed;
}

.address-search-control::after {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    content: "";
    border: 2px solid #0052cc;
    border-radius: 50%;
    box-shadow: 6px 6px 0 -5px #0052cc;
    pointer-events: none;
}

.address-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: min(300px, 52vh);
    margin: 0;
    padding: 5px;
    overflow-y: auto;
    color: #1f2937;
    background: #fff;
    border: 1px solid #bfd3f2;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(11, 42, 91, .18);
    list-style: none;
}

.address-results[hidden] {
    display: none;
}

.address-result {
    padding: 11px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .94rem;
    line-height: 1.35;
}

.address-result:hover,
.address-result[aria-selected="true"] {
    color: #003d99;
    background: #f0f6ff;
}

.address-results-empty {
    padding: 12px;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.4;
}

.address-attribution {
    padding: 7px 10px 5px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    font-size: .78rem;
    font-weight: 400;
    letter-spacing: .01em;
    text-align: right;
    white-space: nowrap;
}

.address-status {
    color: #5f3700;
    font-size: .9rem;
    line-height: 1.35;
}

.address-autocomplete[data-address-state="loading"] .address-status {
    color: #0052cc;
}

.address-autocomplete[data-address-state="verified"] .address-status {
    color: #126b2f;
}

.address-autocomplete[data-address-state="invalid"] .address-status,
.address-autocomplete[data-address-state="error"] .address-status {
    color: #b00020;
}

@media (max-width: 520px) {
    .address-search-input {
        min-height: 48px;
        font-size: 16px;
    }

    .address-results {
        max-height: 44vh;
    }

    .address-result {
        min-height: 44px;
        padding: 12px;
    }
}
