/* Page-bounded Places navigation; shared primitives own controls and fields. */
.cs-place-switcher [hidden] { display: none !important; }
.cs-place-switcher__trigger { white-space: nowrap; }
.cs-place-switcher__trigger .fa-chevron-down { font-size: .625rem; }
body.cs-place-switcher-open { overflow: hidden; }
.cs-place-switcher__dialog {
    position: fixed;
    inset: var(--cs-place-picker-top, 16px) auto auto var(--cs-place-picker-left, 16px);
    width: min(400px, calc(100vw - 32px));
    max-width: none;
    max-height: min(640px, calc(100dvh - var(--cs-place-picker-top, 16px) - 16px));
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 1px solid var(--cs-color-border);
    border-radius: var(--cs-radius-medium);
    background: var(--cs-color-surface);
    color: var(--cs-color-text-body);
    box-shadow: var(--cs-shadow-large);
    font-family: var(--cs-font-family-ui);
    font-size: var(--cs-font-size-control);
    line-height: 1.5;
    overflow: hidden;
}
.cs-place-switcher__dialog[open] { display: flex; flex-direction: column; }
.cs-place-switcher__dialog::backdrop { background: transparent; }
.cs-place-switcher__header { display: flex; align-items: center; justify-content: space-between; gap: var(--cs-space-3); padding: var(--cs-space-2) var(--cs-space-3) var(--cs-space-1) var(--cs-space-6); }
.cs-place-switcher__header h2 { margin: 0; font-size: 1rem; font-weight: var(--cs-font-weight-medium); line-height: 1.3; color: var(--cs-color-text-strong); }
.cs-place-switcher__header [data-place-switcher-close] { margin-inline-end: calc(-1 * var(--cs-space-3)); }
.cs-place-switcher__search { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--cs-space-3); flex-shrink: 0; margin: 0 var(--cs-space-6) var(--cs-space-3); border-block-end: 1px solid var(--cs-color-control-border); }
.cs-place-switcher__search > i { color: var(--cs-color-text-muted); }
.cs-place-switcher__search:focus-within::after { content: ''; position: absolute; inset: auto 0 -1px; height: var(--cs-focus-width); background: var(--cs-color-focus); pointer-events: none; }
.cs-place-switcher__search .cs-place-switcher__input { box-sizing: border-box; min-width: 0; width: 100%; min-height: var(--cs-control-height); margin: 0; padding: var(--cs-space-3) 0; border: 0; border-radius: 0; background: transparent; color: var(--cs-color-text-body); font: inherit; outline: 0; box-shadow: none; appearance: none; }
.cs-place-switcher__input::placeholder { color: var(--cs-color-text-muted); opacity: 1; }
.cs-place-switcher__results { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 var(--cs-space-4) var(--cs-space-4); }
.cs-place-switcher__results ul { list-style: none; margin: 0; padding: 0; }
.cs-place-switcher__results li { margin: 0; padding: 0; }
.cs-place-switcher__results h3 { margin: var(--cs-space-2) 0; font-size: .75rem; font-weight: var(--cs-font-weight-strong); color: var(--cs-color-text-muted); }
.cs-place-switcher__region + .cs-place-switcher__region { margin-block-start: var(--cs-space-2); }
.cs-place-switcher__region summary { display: flex; align-items: center; justify-content: space-between; gap: var(--cs-space-3); min-height: var(--cs-control-height); padding-inline: var(--cs-space-2); list-style: none; cursor: pointer; font-size: .75rem; font-weight: var(--cs-font-weight-medium); color: var(--cs-color-text-muted); }
.cs-place-switcher__region summary::-webkit-details-marker { display: none; }
.cs-place-switcher__region summary i { font-size: .75rem; }
.cs-place-switcher__trigger[aria-expanded="true"] .fa-chevron-down,
.cs-place-switcher__region[open] summary i { transform: rotate(180deg); }
.cs-place-switcher__place { display: flex; align-items: center; gap: var(--cs-space-3); min-height: var(--cs-control-height); box-sizing: border-box; padding: var(--cs-space-2); border-radius: var(--cs-radius-small); color: var(--cs-color-text-body); text-decoration: none; overflow-wrap: anywhere; }
.cs-place-switcher__place img { width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; border-radius: var(--cs-radius-small); }
.cs-place-switcher__place img:is([src*="/flags/us-states/"], [src*="/images/place-flags/"]) { object-fit: cover; border-radius: 0; }
.cs-place-switcher__place-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; color: var(--cs-color-text-muted); }
.cs-place-switcher__place[aria-current] { font-weight: var(--cs-font-weight-medium); color: var(--cs-color-text-strong); }
.cs-place-switcher__current { margin-inline-start: auto; color: var(--cs-color-text-muted); font-size: .75rem; font-weight: 400; }
.cs-place-switcher__place .fa-check { color: var(--cs-color-action); font-size: .75rem; }
.cs-place-switcher__place:hover { background: var(--cs-color-surface-muted); color: var(--cs-color-action); }
.cs-place-switcher__all { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--cs-space-3); min-height: var(--cs-control-height); padding: var(--cs-space-3) var(--cs-space-6); border-block-start: 1px solid var(--cs-color-border); color: var(--cs-color-action); font-size: .8125rem; font-weight: var(--cs-font-weight-medium); text-decoration: none; }
.cs-place-switcher__empty { margin: var(--cs-space-4) 0; color: var(--cs-color-text-muted); text-wrap: pretty; }
.cs-place-switcher__dialog :is(a, summary):focus-visible { outline: var(--cs-focus-width) solid var(--cs-color-focus); outline-offset: calc(-1 * var(--cs-focus-width)); }
@media (max-width: 767px) {
    .cs-place-switcher__dialog { inset: var(--cs-place-picker-top, 0px) 0 0 auto; width: min(100%, 420px); height: calc(100dvh - var(--cs-place-picker-top, 0px)); max-height: none; border-radius: 0; }
    .cs-place-switcher__dialog::backdrop { background: color-mix(in srgb, var(--cs-color-text-strong) 35%, transparent); }
    .cs-place-switcher__results { flex: 1; }
}
