/*
 * Address Lookup field styling — the visible <input> (both v3 classic and v4
 * atomic) plus the places-autocomplete.js dropdown panel it opens.
 *
 * The input itself stays inside the Elementor tree and is styled by Elementor's
 * own Design tab / atomic base styles directly (no bridging needed — unlike the
 * previous Select2-based implementation, where Select2 hid the original <select>
 * and built separate sibling elements that needed those classes mirrored onto them).
 *
 * The dropdown panel is appended to <body> by places-autocomplete.js (deliberately,
 * to avoid table/transform/overflow-hidden ancestor quirks), so it sits outside the
 * Elementor tree and isn't reachable by per-widget Design-tab controls — its look is
 * owned here as plain, site-wide CSS instead.
 */

.places-autocomplete-panel {
    position: fixed;
    z-index: var(--z-dropdown);
    margin: 0;
    display: none;
    background: #fff;
    border: 1px solid #D6D5D5;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-size: 0.9em;
}
.places-autocomplete-panel.is-open {
    display: block;
}

.places-autocomplete-list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
}

.places-autocomplete-option {
    padding: 8px 10px;
    cursor: pointer;
    line-height: 1.3;
}
.places-autocomplete-option.is-active,
.places-autocomplete-option:hover {
    background: #f0f0f0;
}

.places-autocomplete-recent-tag {
    color: #888;
    font-size: 0.85em;
}

.places-autocomplete-clear-row {
    display: none;
    border-top: 1px solid #e5e5e5;
    text-align: right;
    padding: 4px 6px;
}
.places-autocomplete-clear-row.is-visible {
    display: block;
}

.places-autocomplete-clear-button {
    background: none;
    border: 0;
    padding: 2px 4px;
    margin: 0;
    font-size: 0.85em;
    color: #555;
    text-decoration: underline;
    cursor: pointer;
}
.places-autocomplete-clear-button:hover {
    color: #027BFF;
}

/* Icon overlay — mirrors the pattern in rideguide.css */
.rg-select-field {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
}
.rg-field-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    pointer-events: none;
    opacity: 0.5;
    z-index: var(--z-base);
}
.rg-field-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.rg-select-field.rg-icon-before .rg-field-icon { left: 0.65em; }
.rg-select-field.rg-icon-after  .rg-field-icon { right: 0.65em; }
.rg-select-field.rg-icon-before .places-autocomplete-input { padding-left: 2.2em; }
.rg-select-field.rg-icon-after  .places-autocomplete-input { padding-right: 2.2em; }
