/* ============================================================
   Search Location – "Nearby" panel & Airbnb-inspired dropdown
   ============================================================ */

/* ── Nearby "Use My Location" panel ─────────────────────── */
.wprentals-nearby-panel {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #dddddd;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    margin-top: 7px;
    font-family: "Roboto", sans-serif;
}

.wprentals-nearby-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background .15s ease;
    font-family: "Roboto", sans-serif;
}
.wprentals-nearby-item:hover {
    background: #f7f7f7;
}

.wprentals-nearby-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #222222;
    font-size: 14px;
}

.wprentals-nearby-texts {
    flex: 1;
    min-width: 0;
    font-family: "Roboto", sans-serif;
}

.wprentals-nearby-title {
    font-size: 14px;
    font-weight: 600;
    color: #222222;
    line-height: 1.3;
    font-family: "Roboto", sans-serif;
}
.wprentals-nearby-sub {
    font-size: 12px;
    color: #717171;
    margin-top: 2px;
    line-height: 1.3;
    font-family: "Roboto", sans-serif;
}


/* ── jQuery UI autocomplete – Airbnb-style overrides ─────── */
.ui-autocomplete {
    background: #fff !important;
    border: 1px solid #dddddd !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12) !important;
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0 !important;
    z-index: 9998 !important;
    list-style: none !important;
}
/* Hide default jQuery UI border/bg on the outer list */
.ui-widget.ui-autocomplete {
    font-family: "Roboto", sans-serif !important;
    font-size: 14px !important;
}

/* Each item row */
.ui-autocomplete .ui-menu-item {
    padding: 0 !important;
    margin: 0 !important;
}
.ui-autocomplete .ui-menu-item-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    color: #222222 !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-family: "Roboto", sans-serif !important;
}

/* Map-pin icon badge before each suggestion */
.ui-autocomplete .ui-menu-item-wrapper::before {
    content: '\f041';
    font-family: 'FontAwesome', 'Font Awesome 5 Free';
    font-weight: 900;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #555555;
    flex-shrink: 0;
}

/* Hover / active state */
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete .ui-menu-item-wrapper:hover {
    background: #f7f7f7 !important;
    color: #222222 !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    cursor: pointer;
}

/* "No results" item – no icon */
.ui-autocomplete .ui-menu-item.no-results .ui-menu-item-wrapper::before {
    display: none;
}

/* Thin divider between items */
.ui-autocomplete .ui-menu-item + .ui-menu-item {
    border-top: 1px solid #f5f5f5;
}

/* "Suggested destinations" label (category heading, future use) */
.wprentals-autocomplete-category {
    padding: 10px 18px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #717171;
    border-bottom: 1px solid #f0f0f0;
}


/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 767px) {
    .wprentals-nearby-panel,
    .ui-autocomplete {
        border-radius: 8px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14) !important;
    }
    .wprentals-nearby-item,
    .ui-autocomplete .ui-menu-item-wrapper {
        padding: 12px 14px !important;
    }
    .wprentals-nearby-icon,
    .ui-autocomplete .ui-menu-item-wrapper::before {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 12px;
    }
}


/* ============================================================
   City / Area Location Picker
   ============================================================ */

/* ── Picker container ─────────────────────────────────────── */
.wprentals-location-picker {
    position: relative;
    width: 100%;
}

/* ── Trigger button (shows selected text) ─────────────────── */
.wprentals-picker-trigger.form-control {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative;
    padding: 0px 13px 0px 45px;
    cursor: pointer;
    margin: 0;
}

/* Match margin-bottom of .form-control inside search wrappers */
#adv-search-1 .wprentals-picker-trigger.form-control,
.adv-search-2 .wprentals-picker-trigger.form-control,
.adv-search-4 .wprentals-picker-trigger.form-control,
#adv-search-3 .wprentals-picker-trigger.form-control {
    margin-bottom: 0px;
}
.wprentals-picker-trigger.form-control:hover,
.wprentals-picker-trigger.form-control:focus,
.wprentals-picker-trigger.form-control:active {
    border-color: #e7e9ef;
    color: #484848;
    box-shadow: none;
}
.wprentals-picker-trigger-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.wprentals-picker-trigger-text.wprentals-picker-placeholder {
    color: #484848;
}
.wprentals-picker-trigger-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #717171;
    flex-shrink: 0;
    margin-left: 10px;
    align-self: center;
}

/* ── Dropdown panel ───────────────────────────────────────── */
.wprentals-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    margin-top: 6px;
    overflow: hidden;
    font-family: "Roboto", sans-serif;
    min-width: 300px;
}

/* ── Nearby button inside picker ──────────────────────────── */
.wprentals-picker-nearby {
    border-bottom: 1px solid #f0f0f0;
}

/* ── City / Area row ──────────────────────────────────────── */
.wprentals-picker-row {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
}
.wprentals-picker-field {
    flex: 1;
    min-width: 0;
}
.wprentals-picker-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #717171;
    margin-bottom: 6px;
}
.wprentals-picker-field .wprentals-area-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    color: #222;
    background: #fff;
    min-height: 38px;
    margin-bottom: 6px;
    box-sizing: border-box;
}
.wprentals-picker-field .wprentals-area-search:focus {
    outline: none;
    border-color: #222;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

/* ── Submit / Edit listing: Area search input ─────────────── */
.wprentals-submit-area-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    margin-bottom: 4px;
}
.wprentals-submit-area-search:focus {
    outline: none;
    border-color: #222;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}
.wprentals-submit-area-select[size] {
    width: 100%;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #222;
    padding: 4px 0;
    box-sizing: border-box;
}
.wprentals-picker-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: "Roboto", sans-serif;
    color: #222;
    background: #fff;
    appearance: auto;
    cursor: pointer;
    min-height: 38px;
}
.wprentals-picker-field select[size] {
    height: auto;
    max-height: 160px;
    overflow-y: auto;
}
.wprentals-picker-field select:focus {
    outline: none;
    border-color: #222;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

/* ── Clear / Apply actions ────────────────────────────────── */
.wprentals-picker-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-top: 1px solid #f0f0f0;
}
.wprentals-picker-clear {
    background: none !important;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #717171;
    cursor: pointer;
    padding: 6px 0;
    text-decoration: underline;
    font-family: "Roboto", sans-serif;
}
.wprentals-picker-clear:hover {
    color: #222;
}
.wprentals-picker-apply {
    background: #222;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: "Roboto", sans-serif;
    transition: background .15s ease;
}
.wprentals-picker-apply:hover {
    background: #000;
}

/* ── Hide duplicate City/Area filters in the sorting bar ── */
.listing_filters_head .city_taxonmy_filter,
.listing_filters_head .area_taxonomy_filter {
    display: none !important;
}
/* Expand remaining filter columns to fill the freed space */
.listing_filters_head .action_taxonomy_filter,
.listing_filters_head .main_taxonomy_filter {
    width: 25%;
}
.listing_filters_head .order_filter {
    width: 18%;
}

/* ── Responsive: stack on mobile ──────────────────────────── */
@media (max-width: 767px) {
    .wprentals-picker-dropdown {
        min-width: auto;
        border-radius: 8px;
    }
    .wprentals-picker-row {
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
    }
    .wprentals-picker-actions {
        padding: 10px 14px;
    }
    .listing_filters_head .action_taxonomy_filter,
    .listing_filters_head .main_taxonomy_filter,
    .listing_filters_head .order_filter {
        width: 100%;
    }
}
