.map-search {
    position: absolute;
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100vw - 48px));
    z-index: 45;
    color: #f5f3f5;
    font-family: inherit;
}

.map-search[hidden], .map-search [hidden] { display: none !important; }
.map-search-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 14px 0 17px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(12, 12, 16, 0.78);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.map-search-field:focus-within {
    border-color: color-mix(in srgb, var(--accent-primary) 60%, #b0a9ae);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 12%, transparent);
}
.map-search-icon { width: 20px; height: 20px; flex: none; color: #b2aab0; }
#mapSearchInput {
    appearance: none;
    min-width: 0;
    width: 100%;
    padding: 14px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
}
#mapSearchInput::placeholder { color: #a9a3ac; opacity: 1; }
#mapSearchInput::-webkit-search-cancel-button { display: none; }
.map-search-shortcut {
    padding: 1px 7px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #99939b;
    font: 12px/20px 'Roboto Mono', monospace;
}
.map-search-clear {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: -6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c6c0c8;
    flex: none;
    cursor: pointer;
}
.map-search-clear:hover { background: rgba(255, 255, 255, 0.08); }
.map-search-clear:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.map-search-clear svg { width: 18px; height: 18px; }
.map-search.has-query .map-search-shortcut { display: none; }
.map-search-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(370px, var(--search-available-height, 48vh));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: #111115;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}
.map-search-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 17px 9px;
    flex: none;
    color: #aba4ae;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.035em;
}
#mapSearchCount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.map-search-results { list-style: none; padding: 0 7px 7px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #514951 transparent; }
.map-search-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
}
.map-search-option[aria-selected="true"] {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.075);
}
.map-search-option img { width: 52px; height: 36px; object-fit: cover; border-radius: 5px; flex: none; background: #252027; }
.map-search-option-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.map-search-option-mark { width: 15px; height: 15px; color: #e8ce91; flex: none; }
.map-search-option-go { width: 16px; height: 16px; color: #aaa2ad; flex: none; }
.map-search-empty { margin: 3px 17px 19px; color: #b7aebb; font-size: 13px; line-height: 1.6; }
.map-search-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
    .map-search { top: 68px; width: calc(100vw - 40px); }
    #mapSearchInput { font-size: 16px; }
    .map-search-shortcut { display: none; }
    .map-search-clear { width: 38px; height: 40px; }
}
@media (hover: none) { .map-search-shortcut { display: none; } }
@media (prefers-reduced-motion: reduce) { .map-search-field { transition: none; } }
