/* Header country dropdown — stacks above page + mobile nav drawer (see main.css .header-actions z-index) */
.header-location-wrap {
    position: relative;
    z-index: 1;
}

.location-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: max(100%, 220px);
    max-width: min(320px, calc(100vw - 16px - env(safe-area-inset-right, 0px) - env(safe-area-inset-left, 0px)));
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    /* Above siblings inside .header-actions; global stacking comes from .header */
    z-index: 2;
    padding: 0;
}

.location-dropdown[hidden] {
    display: none !important;
}

.location-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.location-dropdown-list li {
    margin: 0;
    border-bottom: 1px solid rgba(51, 178, 73, 0.2);
}

.location-dropdown-list li:last-child {
    border-bottom: none;
}

.location-dropdown-item {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: none;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color, #33b249);
    cursor: pointer;
    transition: background 0.15s ease;
}

.location-dropdown-item:hover,
.location-dropdown-item:focus-visible {
    background: rgba(51, 178, 73, 0.08);
    outline: none;
}

/* Narrow phones: keep panel in viewport; align flush to the right edge of the control group */
@media (max-width: 420px) {
    .header-location-wrap .location-dropdown {
        left: auto;
        right: 0;
        min-width: min(280px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
    }
}
