/*
 * address-autocomplete.css — shared styling for the reusable address
 * autocomplete (common/address-autocomplete.js): the suggestions dropdown
 * and the "use my current location" button. Used by the account address
 * form, the location modal address form, and the cart delivery modal.
 */

.addr-ac { position: relative; }

.addr-ac__list {
    list-style: none;
    margin: 4px 0 0;
    padding: 4px;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 30;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-2, 0 8px 24px rgba(0, 0, 0, 0.12));
}

.addr-ac__item {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.addr-ac__item::before {
    content: "";
    flex: 0 0 16px;
    height: 16px;
    background: currentColor;
    opacity: 0.45;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.addr-ac__item:hover,
.addr-ac__item:focus { background: var(--color-surface-2, #f5f6f8); }

/* "Use my current location" inline button. */
.addr-ac__loc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px dashed var(--color-primary);
    border-radius: 10px;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.addr-ac__loc:hover { background: var(--color-primary-soft, rgba(229, 37, 42, 0.06)); }
.addr-ac__loc svg { flex: 0 0 auto; }
