/* Google Places Autocomplete Data API - Custom Dropdown Styling */

/* Dropdown container */
.places-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--brand-white);
    border: 1px solid var(--grey-300);
    border-top: none;
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    box-shadow: 0 4px 12px var(--black-border-medium);
    z-index: 10000;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Individual suggestion item */
.places-autocomplete-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 1rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid var(--grey-100);
    transition: background-color 0.15s ease;
}

.places-autocomplete-item:last-of-type {
    border-bottom: none;
}

/* Hover and active states */
.places-autocomplete-item:hover,
.places-autocomplete-item-active {
    background-color: var(--grey-100);
}

/* Main text (street address) */
.places-item-main {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.places-item-main strong {
    font-weight: 700;
}

/* Secondary text (city, state) */
.places-item-secondary {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Google attribution (required by TOS) */
.places-autocomplete-attribution {
    display: flex;
    justify-content: flex-end;
    padding: 0.6rem 1.2rem;
    border-top: 1px solid var(--grey-200);
    background-color: var(--grey-50);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}

.places-google-logo {
    height: 16px;
    width: auto;
    opacity: 0.7;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .places-autocomplete-dropdown {
        max-height: 250px;
    }

    .places-autocomplete-item {
        /* Larger touch targets on mobile */
        padding: 1.4rem 1.2rem;
    }

    .places-item-main {
        /* Prevent iOS zoom on focus by using 16px minimum */
        font-size: 16px;
    }

    .places-item-secondary {
        font-size: 1.4rem;
    }
}
