/* Stable, compact location tree for country-to-neighborhood navigation. */
.gm-sidebar .gm-filter-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px 14px;
    border-radius: 8px;
    max-height: none !important;
    overflow: visible !important;
}

@media (min-width: 768px) {
    .gm-content-layout {
        align-items: stretch;
    }

    .gm-content-layout > .gm-sidebar {
        align-self: stretch;
        display: flex;
    }

    .gm-content-layout > .gm-sidebar .gm-filter-panel {
        min-height: 500px;
        width: 100%;
    }
}

.gm-sidebar .gm-location-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--gm-border);
}

.gm-sidebar .gm-location-panel-kicker {
    margin: 0 0 2px;
    color: var(--gm-primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1.2;
}

.gm-sidebar .gm-location-panel-heading h2,
.gm-sidebar .gm-sidebar-categories h2 {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--gm-dark);
    font-size: 16px;
    line-height: 1.25;
}

.gm-sidebar .gm-location-panel-heading h2::before,
.gm-sidebar .gm-sidebar-categories h2::before {
    content: none;
}

.gm-sidebar .gm-location-total {
    flex: 0 0 auto;
    margin-top: 4px;
    padding: 4px 7px;
    border: 1px solid #ddd8ff;
    border-radius: 4px;
    background: #f4f2ff;
    color: #4b3bd1;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.gm-sidebar .gm-location-search-wrap {
    position: relative;
}

.gm-sidebar .gm-location-search-wrap input {
    width: 100%;
    margin: 0;
    padding: 11px 34px 11px 12px;
    border: 1px solid var(--gm-border);
    border-radius: 5px;
    background: #f8f9fc;
    font-size: 12px;
}

.gm-sidebar [data-gm-location-reset] {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--gm-muted);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

.gm-sidebar [data-gm-location-reset]:hover {
    background: #ece9ff;
    color: var(--gm-primary);
}

.gm-sidebar [data-gm-location-tree] {
    display: grid;
    flex: 0 0 auto !important;
    gap: 3px;
    min-height: 315px;
    max-height: none;
    overflow: visible !important;
    padding: 1px 2px 2px;
    scrollbar-width: thin;
    scrollbar-color: #c9c4ed transparent;
}

.gm-sidebar .gm-location-row {
    display: grid;
    grid-template-columns: 14px 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 38px;
    padding: 7px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--gm-dark);
    cursor: pointer;
    text-align: left;
}

.gm-sidebar .gm-location-row::before {
    content: none;
}

.gm-sidebar .gm-location-row:hover,
.gm-sidebar .gm-location-row.is-selected {
    border-color: #ddd8ff;
    background: #f4f2ff;
}

.gm-sidebar .gm-location-row .gm-location-disclosure {
    display: grid;
    place-items: center;
    width: 14px;
    min-height: 20px;
    color: var(--gm-primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.gm-sidebar .gm-location-row .gm-location-disclosure.is-leaf::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c7cada;
}

.gm-sidebar .gm-location-row .gm-flag {
    display: block;
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(18, 21, 42, .09);
}

.gm-sidebar .gm-location-row .gm-location-flag {
    display: grid;
    place-items: center;
    width: 22px;
    min-width: 22px;
    height: 18px;
}

.gm-sidebar .gm-location-row .gm-flag-fallback {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #ebe9ff;
    color: #4b3bd1;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.gm-sidebar .gm-location-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.gm-sidebar .gm-location-row small {
    justify-self: end;
    min-width: 28px;
    padding: 2px 5px;
    border: 1px solid #ebeaf2;
    border-radius: 4px;
    background: #fafbfe;
    color: var(--gm-muted);
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    text-align: center;
}

.gm-sidebar .gm-location-children {
    display: grid;
    gap: 3px;
    margin: 2px 0 2px 10px;
    padding: 2px 0 2px 9px;
    border-left: 1px solid #dedaff;
    border-radius: 0;
    background: transparent;
}

.gm-sidebar .gm-location-children[hidden] {
    display: none;
}

.gm-sidebar .gm-sidebar-categories {
    display: grid;
    flex: 0 0 auto;
    gap: 2px;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 12px 4px 0;
    border-top: 1px solid var(--gm-border);
}

.gm-sidebar .gm-sidebar-categories h2 {
    margin-bottom: 5px;
}

.gm-sidebar .gm-filter-link {
    min-height: 29px;
    padding: 5px 0;
    border-bottom: 0;
    color: var(--gm-text);
    font-size: 12px;
    font-weight: 700;
}

.gm-sidebar .gm-filter-link:hover {
    color: var(--gm-primary);
}

@media (max-width: 767px) {
    .gm-sidebar .gm-filter-panel {
        max-height: 100dvh;
        overflow-y: auto;
        padding: 18px 14px;
        border-radius: 0;
    }

    .gm-sidebar [data-gm-location-tree] {
        min-height: 260px;
    }

    .gm-sidebar .gm-sidebar-categories {
        max-height: 200px;
        overflow: visible;
    }
}
