/* 地図の検索窓 (js/map-search.js) */
.at-map-search{position:fixed;top:16px;right:16px;z-index:1300;width:320px;font-size:14px}
.at-map-search-open{display:none}
.at-map-search-box{display:flex;align-items:center;gap:8px;height:42px;padding:0 6px 0 12px;border:1px solid #cfcfca;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.at-map-search-box:focus-within{border-color:#222}
.at-map-search svg{flex:none;width:18px;height:18px;fill:none;stroke:#444;stroke-width:1.8;stroke-linecap:round}
.at-map-search input{flex:1;min-width:0;height:40px;border:0;background:none;color:#151515;font:inherit;font-size:16px;outline:none}
.at-map-search input::-webkit-search-cancel-button{display:none}
.at-map-search input::placeholder{color:#888;font-size:14px}
.at-map-search-clear{flex:none;width:32px;height:32px;border:0;background:none;color:#666;font-size:20px;line-height:1;cursor:pointer}
.at-map-search-list{max-height:min(62vh,520px);overflow:auto;margin:4px 0 0;padding:4px 0;list-style:none;border:1px solid #cfcfca;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.at-map-search-list li[role="option"]{display:flex;align-items:center;gap:10px;padding:7px 12px;cursor:pointer}
.at-map-search-list li[aria-selected="true"]{background:rgba(73,104,88,.12)}
.at-map-search-list img{flex:none;display:block;width:36px;height:36px;object-fit:cover;background:#e7e5df}
.at-map-search-badge{flex:none;display:grid;place-items:center;width:36px;height:36px;background:#efeee9;color:#496858;font-size:15px}
.at-map-search-list span{min-width:0}
.at-map-search-list strong{display:block;font-size:13px;font-weight:600;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.at-map-search-list small{display:block;font-size:11px;line-height:1.4;color:#666;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.at-map-search-group{padding:8px 12px 2px;font-size:11px;color:#888;letter-spacing:.02em}
.at-map-search-empty{padding:12px;color:#666;font-size:13px}
/* the map's full-screen views cover it */
.at-plan-open .at-map-search,.at-style-open .at-map-search,.at-countries-open .at-map-search{display:none}
/* phones: a search button beside the title; it opens a full-width box */
@media (max-width:768px){
  .at-map-search{top:10px;right:8px;width:auto}
  .at-map-search-open{display:grid;place-items:center;width:42px;height:42px;border:1px solid #cfcfca;background:rgba(255,255,255,.96);cursor:pointer}
  .at-map-search-box,.at-map-search-list{display:none}
  .at-map-search.is-open{left:calc(var(--at-rail,56px) + 8px)}
  .at-map-search.is-open .at-map-search-open{display:none}
  .at-map-search.is-open .at-map-search-box{display:flex}
  .at-map-search.is-open .at-map-search-list:not([hidden]){display:block}
  .at-recommend-open .at-map-search{display:none}
  /* a search is active (its buildings are ringed on the map): red dot on the button */
  .at-map-search-open{position:relative}
  .at-map-search.has-hit .at-map-search-open::after{content:"";position:absolute;top:7px;right:7px;width:8px;height:8px;border-radius:50%;background:#e8483b}
}
/* found buildings: a red ring for as long as the name is in the search box (blinks at first) */
#map-container .work-item.at-search-hit{z-index:40!important}
#map-container .work-item.at-search-hit .work-item-image-wrapper{outline:none;box-shadow:0 0 0 var(--marker-ring-accent,2px) #e8483b,0 0 0 var(--marker-ring-white,4px) rgba(232,72,59,.35)}
/* a selected photo has box-shadow:none!important in navigation.css; keep the ring on it too */
#map-container .work-item.selected.at-search-hit .work-item-image-wrapper{box-shadow:0 0 0 var(--marker-ring-accent,2px) #e8483b,0 0 0 var(--marker-ring-white,4px) rgba(232,72,59,.35)!important}
#map-container .work-item.at-search-new .work-item-image-wrapper{animation:at-search-pulse 1.1s ease-in-out 4}
@keyframes at-search-pulse{50%{box-shadow:0 0 0 var(--marker-ring-accent,2px) #e8483b,0 0 0 calc(var(--marker-ring-white,4px)*2.2) rgba(232,72,59,0)}}
@media (prefers-reduced-motion:reduce){#map-container .work-item.at-search-new .work-item-image-wrapper{animation:none}}
