/* AirlyGo D4166R2.4.11 — hotel card + map gallery/safe-gap polish.
   UI/state only; supplier/search/PREBOOK/payment/FX authority remains frozen. */
:root{--ag-map-navy:#0b1f38;--ag-map-orange:#ef6c22;--ag-map-cream:#faf3e8;--ag-map-white:#fff;--ag-map-border:#d7dee3;--ag-map-muted:#657386;--ag-map-soft:#f4f6f7}

/* Keep customer navigation visible and spaced in map mode. */
.nav-links .ag4166-guest-nav{display:flex;align-items:center;gap:20px}.nav-links .ag4166-guest-nav>a{font-weight:750;color:inherit;text-decoration:none;white-space:nowrap}
body.hotel-search-page.ag4166-map-active .nav,body.hotel-search-page.ag4166-map-active #nav{z-index:10020!important;overflow:visible!important}
body.hotel-search-page.ag4166-map-active .nav-inner,body.hotel-search-page.ag4166-map-active .nav-links,body.hotel-search-page.ag4166-map-active .nav-links ul{overflow:visible!important}
body.hotel-search-page.ag4166-map-active #langBtn,body.hotel-search-page.ag4166-map-active #currencyBtn{display:inline-flex!important;visibility:visible!important;opacity:1!important}

/* Search-results map preview: compact visual tile. */
.ag4166-map-card{position:relative;height:142px;margin:0 0 18px;padding:0!important;border:1px solid var(--ag-map-border)!important;border-radius:17px!important;background:#eaf2f6!important;overflow:hidden;box-shadow:0 5px 18px rgba(11,31,56,.08)}
.ag4166-map-preview{position:absolute;inset:0;background:linear-gradient(145deg,#edf5f8 0%,#f8f3ea 100%)}
.ag4166-map-preview svg{display:block;width:100%;height:100%}.ag4166-map-road{fill:none;stroke:#9fb4c3;stroke-width:3;stroke-linecap:round;stroke-dasharray:5 5;opacity:.8}.ag4166-map-road.major{stroke:#8ea6b7;stroke-width:7;stroke-dasharray:none;opacity:.55}.ag4166-map-water{fill:#dceef2}.ag4166-map-dot{fill:var(--ag-map-orange);stroke:#fff;stroke-width:3}.ag4166-map-dot.alt{fill:#2f76bf}
.ag4166-map-card-count{position:absolute;top:10px;right:10px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.96);color:var(--ag-map-navy);font-size:11px;font-weight:850;box-shadow:0 3px 12px rgba(11,31,56,.11)}
.ag4166-map-open{position:absolute!important;left:50%;bottom:13px;transform:translateX(-50%);width:auto!important;min-width:158px;min-height:42px!important;padding:0 17px!important;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0!important;border-radius:11px!important;background:var(--ag-map-orange)!important;color:#fff!important;font-weight:850!important;box-shadow:0 8px 20px rgba(239,108,34,.23);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}.ag4166-map-open:hover{filter:brightness(.98);transform:translateX(-50%) translateY(-1px);box-shadow:0 10px 23px rgba(239,108,34,.28)}.ag4166-map-pin-icon{font-size:18px;line-height:1}
.hotel-card .ag415-map-link{appearance:none!important;-webkit-appearance:none!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;margin-left:8px!important;color:var(--ag-map-navy)!important;font:inherit!important;font-size:13px!important;font-weight:750!important;text-decoration:none!important;cursor:pointer!important;transition:color .16s ease!important}.hotel-card .ag415-map-link:hover{color:var(--ag-map-orange)!important;text-decoration:none!important}.hotel-card .ag415-map-link:focus-visible{outline:2px solid var(--ag-map-orange)!important;outline-offset:3px;border-radius:3px}.hotel-card a{text-decoration:none}

/* Map mode: preserve main header only. Search shell / hero are hidden under fixed map shell. */
.ag4166-map-shell{display:none}html.ag4166-map-active-root,body.ag4166-map-active{overflow:hidden!important}
body.hotel-search-page.ag4166-map-active .search-dock,body.hotel-search-page.ag4166-map-active .results-hero,body.hotel-search-page.ag4166-map-active .results-toolbar{visibility:hidden!important;pointer-events:none!important}
body.hotel-search-page.ag4166-map-active .ag4166-map-shell{display:block!important;position:fixed!important;z-index:10000!important;top:var(--ag4166-map-top,154px)!important;left:0!important;right:0!important;bottom:0!important;background:#eef2f4!important;overflow:hidden!important}
body.hotel-search-page.ag4166-map-active #results{visibility:visible!important;pointer-events:auto!important}body.hotel-search-page.ag4166-map-active .results-layout{display:block!important}
.ag4166-map-workspace{position:absolute;inset:0;min-height:0;overflow:hidden}.ag4166-map-stage{position:absolute;inset:0;background:#e8edef}.ag4166-map-canvas{position:absolute;inset:0;width:100%;height:100%}

/* Floating controls, aligned like a mature OTA rather than screen-edge flush. */
.ag4166-map-floating-controls{position:absolute;z-index:9;top:20px;left:28px;display:flex;gap:10px;align-items:center;max-width:calc(100vw - 250px);pointer-events:none}.ag4166-map-floating-controls>*{pointer-events:auto}
.ag4166-map-chip,.ag4166-map-close{min-height:42px;border-radius:10px;padding:0 15px;font:inherit;font-size:13px;font-weight:800;cursor:pointer;background:#fff;color:var(--ag-map-navy);border:1px solid rgba(11,31,56,.08);box-shadow:0 5px 18px rgba(11,31,56,.14)}.ag4166-map-chip{display:inline-flex;align-items:center;gap:7px}.ag4166-map-chip:hover,.ag4166-map-close:hover{border-color:#aeb9c3;background:#fff}.ag4166-map-chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}.ag4166-map-close{position:absolute;z-index:9;top:20px;right:28px;display:inline-flex;align-items:center;gap:8px}.ag4166-map-close span{font-size:20px;line-height:1;font-weight:500}

/* Floating hotel rail, narrower and inset. */
.ag4166-map-rail{position:absolute;z-index:7;top:72px;left:28px;bottom:18px;width:min(520px,calc(100vw - 140px));display:flex;flex-direction:column;background:#fff;border:1px solid rgba(11,31,56,.10);border-radius:17px;overflow:hidden;box-shadow:0 16px 38px rgba(11,31,56,.20);transition:transform .20s ease,opacity .20s ease}.ag4166-map-rail.is-collapsed{transform:translateX(calc(-100% - 48px));opacity:0;pointer-events:none}
.ag4166-map-rail-head{display:none}.ag4166-map-rail-list{flex:1;min-height:0;overflow:auto;padding:10px 10px 8px;background:#fff;scrollbar-width:thin;scrollbar-color:#c8d1d8 transparent}.ag4166-map-rail-list::-webkit-scrollbar{width:8px}.ag4166-map-rail-list::-webkit-scrollbar-thumb{background:#c8d1d8;border-radius:999px}.ag4166-map-rail-list::-webkit-scrollbar-track{background:transparent}
.ag4166-rail-toggle{position:absolute;z-index:10;top:50%;left:548px;transform:translateY(-50%);width:38px;height:48px;border:1px solid rgba(11,31,56,.10);border-radius:0 10px 10px 0;background:#fff;color:var(--ag-map-navy);font-size:30px;line-height:1;box-shadow:0 5px 16px rgba(11,31,56,.15);cursor:pointer;transition:left .20s ease,transform .20s ease}.ag4166-rail-toggle.is-collapsed{left:28px;border-radius:10px;transform:translateY(-50%)}

/* Compact horizontal hotel cards + image carousel. */
.ag4166-rail-card{display:grid;grid-template-columns:218px minmax(0,1fr);min-height:212px;margin:0 0 10px;border:1px solid transparent;border-radius:13px;background:#fff;overflow:hidden;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}.ag4166-rail-card:hover,.ag4166-rail-card.is-active{border-color:var(--ag-map-orange);box-shadow:0 7px 20px rgba(11,31,56,.11);transform:translateY(-1px)}.ag4166-rail-card:focus-visible{outline:3px solid rgba(239,108,34,.45);outline-offset:1px}
.ag4166-rail-media{position:relative;height:100%;min-height:212px;background:#edf1f3;overflow:hidden;border-radius:11px}.ag4166-rail-media img{width:100%;height:100%;object-fit:cover;display:block}.ag4166-rail-noimg{height:100%;display:grid;place-items:center;color:#94a0aa;font-weight:800}.ag4166-rail-media button{font:inherit}
.ag4166-rail-heart{position:absolute;z-index:2;top:10px;right:10px;width:38px;height:38px;border-radius:999px;border:0;background:rgba(255,255,255,.88);color:var(--ag-map-navy);font-size:21px;display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 10px rgba(11,31,56,.12)}.ag4166-rail-heart[aria-pressed="true"]{color:var(--ag-map-orange)}
.ag4166-rail-arrow{position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:999px;background:rgba(255,255,255,.92);color:var(--ag-map-navy);font-size:25px;display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 9px rgba(11,31,56,.15)}.ag4166-rail-arrow.prev{left:8px}.ag4166-rail-arrow.next{right:8px}.ag4166-rail-arrow[hidden]{display:none!important}.ag4166-rail-dots{position:absolute;left:0;right:0;bottom:9px;display:flex;justify-content:center;gap:6px;pointer-events:none}.ag4166-rail-dot{width:7px;height:7px;border-radius:999px;background:rgba(255,255,255,.55);box-shadow:0 1px 2px rgba(0,0,0,.18)}.ag4166-rail-dot.is-active{background:#fff}
.ag4166-rail-body{min-width:0;padding:12px 12px 11px 16px;display:flex;flex-direction:column}.ag4166-rail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ag4166-rail-top h3{margin:0;color:var(--ag-map-navy);font-size:16px;line-height:1.32}.ag4166-rail-rating{flex:0 0 auto;padding:5px 7px;border-radius:8px;background:var(--ag-map-navy);color:#fff;font-size:12px;font-weight:850}.ag4166-rail-stars{margin-top:5px;color:#f6a700;font-size:13px;letter-spacing:.03em}.ag4166-rail-location,.ag4166-rail-rate{margin:5px 0 0;color:var(--ag-map-muted);font-size:12px;line-height:1.35}.ag4166-rail-rate{color:#49596b}.ag4166-rail-perks{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.ag4166-rail-perks span{padding:3px 6px;border-radius:999px;background:#edf8f1;color:#14753b;font-size:10px;font-weight:750}.ag4166-rail-price{margin-top:auto;padding-top:8px;text-align:right}.ag4166-rail-price strong{display:block;font-size:20px;color:var(--ag-map-navy)}.ag4166-rail-price span{display:block;margin-top:2px;font-size:10px;color:var(--ag-map-muted);white-space:nowrap}.ag4166-rail-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:8px}.ag4166-rail-actions a{min-height:34px;padding:0 11px;border-radius:9px;font:inherit;font-size:11px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;background:var(--ag-map-orange);color:#fff}.ag4166-rail-empty{margin:18px;color:var(--ag-map-muted);font-size:13px}

/* Reuse original filter panel; chips jump to existing sections rather than inventing a new filter engine. */
body.hotel-search-page.ag4166-map-active.ag4166-map-filters-open #filters{display:block!important;position:fixed!important;z-index:10024!important;left:28px!important;top:calc(var(--ag4166-map-top,154px) + 72px)!important;bottom:18px!important;width:min(390px,calc(100vw - 56px))!important;max-height:none!important;overflow:auto!important;margin:0!important;border:1px solid var(--ag-map-border)!important;border-radius:17px!important;background:#fff!important;box-shadow:0 18px 50px rgba(11,31,56,.24)!important;padding:18px!important}.ag4166-map-filter-backdrop{display:none;position:fixed;inset:0;z-index:10022;border:0;background:rgba(11,31,56,.32)}body.ag4166-map-filters-open .ag4166-map-filter-backdrop:not([hidden]){display:block}body.hotel-search-page.ag4166-map-active.ag4166-map-filters-open #filterClose{display:inline-flex!important;align-items:center;justify-content:center}

/* AirlyGo total-stay price pins. */
.ag4166-price-pin{white-space:nowrap;border:2px solid var(--ag-map-navy)!important;border-radius:999px!important;background:#fff!important;color:#135cc5!important;padding:5px 9px!important;font-size:11px!important;font-weight:850!important;box-shadow:0 4px 12px rgba(11,31,56,.18)!important;cursor:pointer;user-select:none;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease}.ag4166-price-pin[hidden]{display:none!important}.ag4166-price-pin:hover,.ag4166-price-pin.is-hover,.ag4166-price-pin.is-active,.ag4166-price-pin.is-selected{background:var(--ag-map-orange)!important;border-color:var(--ag-map-orange)!important;color:#fff!important;z-index:6;box-shadow:0 7px 20px rgba(239,108,34,.28)!important}.ag4166-price-pin.is-saved::after{content:"♥";margin-left:5px;color:inherit}

/* Popup card. */
.maplibregl-popup{z-index:8!important}.maplibregl-popup-content{width:350px;max-width:calc(100vw - 28px);border:1px solid rgba(11,31,56,.10)!important;border-radius:17px!important;padding:11px!important;background:#fff!important;box-shadow:0 16px 38px rgba(11,31,56,.22)!important}.maplibregl-popup-close-button{top:7px!important;right:7px!important;min-width:32px;min-height:32px;border-radius:999px!important;background:rgba(255,255,255,.96)!important;color:var(--ag-map-navy)!important;font-size:21px!important;box-shadow:0 2px 10px rgba(11,31,56,.12)}
.ag4166-info{max-width:328px;color:var(--ag-map-navy);font-family:inherit}.ag4166-info img{width:100%;aspect-ratio:16/9;height:auto;max-height:168px;object-fit:cover;border-radius:11px;margin-bottom:9px;background:#eef2f4}.ag4166-info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ag4166-info h3{margin:0;font-size:18px;line-height:1.22;color:var(--ag-map-navy)}.ag4166-info-rating{flex:0 0 auto;padding:5px 7px;border-radius:8px;background:var(--ag-map-navy);color:#fff;font-size:12px;font-weight:850}.ag4166-info p{margin:4px 0;color:var(--ag-map-muted);font-size:12px;line-height:1.35}.ag4166-info-rate{color:#435365!important}.ag4166-info-perks{display:flex;gap:5px;flex-wrap:wrap;margin:7px 0}.ag4166-info-perks span{padding:3px 6px;border-radius:999px;background:#edf8f1;color:#14753b;font-size:10px;font-weight:750}.ag4166-info-price{display:flex;align-items:flex-end;justify-content:space-between;gap:8px;margin:7px 0 9px}.ag4166-info-price strong{font-size:19px;color:var(--ag-map-navy)}.ag4166-info-price span{font-size:11px;color:var(--ag-map-muted)}.ag4166-info-actions{display:grid!important;grid-template-columns:auto auto minmax(102px,1fr);gap:7px;align-items:center;margin-top:8px}.ag4166-info-save,.ag4166-info-directions,.ag4166-info a{display:inline-flex;align-items:center;justify-content:center;min-height:35px;border-radius:9px;padding:0 10px;font:inherit;font-size:11px;font-weight:850;text-decoration:none;white-space:nowrap;transition:transform .18s ease,box-shadow .18s ease,background-color .18s ease,border-color .18s ease,color .18s ease}.ag4166-info-save{border:1px solid var(--ag-map-border);background:#fff;color:var(--ag-map-navy);cursor:pointer}.ag4166-info-directions{border:0;background:var(--ag-map-navy)!important;color:#fff!important;cursor:pointer}.ag4166-info a{background:var(--ag-map-orange)!important;color:#fff!important}.ag4166-info-save:hover,.ag4166-info-directions:hover,.ag4166-info a:hover{transform:translateY(-1px);box-shadow:0 5px 12px rgba(11,31,56,.16)}
.maplibregl-ctrl-group{border-radius:11px!important;overflow:hidden}.maplibregl-ctrl-attrib{font-size:10px!important}.ag4166-map-filter-btn:focus-visible,.ag4166-map-chip:focus-visible,.ag4166-map-close:focus-visible,.ag4166-map-open:focus-visible,.ag4166-rail-toggle:focus-visible,.ag4166-price-pin:focus-visible,.ag4166-info-actions>*:focus-visible,.ag4166-rail-actions>*:focus-visible,.ag4166-rail-heart:focus-visible,.ag4166-rail-arrow:focus-visible{outline:3px solid rgba(239,108,34,.45)!important;outline-offset:2px}
body.ag4166-map-active .ag4166-map-unavailable{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:32px;color:var(--ag-map-muted);background:#eef2f4}body.ag4166-map-active .ag4166-map-unavailable strong{color:var(--ag-map-navy);font-size:20px}

/* Hotel-details location: minimal, not a large faux map reserve. */
.hotel-details-page #location.ag58-panel{padding:16px 18px!important}.hotel-details-page #location.ag58-panel>h2{margin-bottom:10px!important;font-size:18px!important}.hotel-details-page #location .ag58-map,.hotel-details-page #location .ag60-location-fallback{min-height:0!important;padding:0!important;border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:16px!important}.hotel-details-page #location .ag58-map>div:first-child,.hotel-details-page #location .ag60-location-fallback>div:first-child{min-width:0}.hotel-details-page #location .ag58-map strong,.hotel-details-page #location .ag60-location-fallback strong{display:block;color:var(--ag-map-navy);font-size:13px}.hotel-details-page #location .ag58-map p,.hotel-details-page #location .ag60-location-fallback p{margin:4px 0 0!important;color:var(--ag-map-muted)!important;font-size:12px!important;line-height:1.45!important}.hotel-details-page #location .ag4166-directions-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important}.hotel-details-page #location .ag4166-directions{min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--ag-map-navy)!important;box-shadow:none!important;font-weight:800!important;text-decoration:none!important}.hotel-details-page #location .ag4166-directions:hover{color:var(--ag-map-orange)!important}.hotel-details-page #location .ag4166-directions-other>summary{padding:0!important;color:var(--ag-map-navy)!important;text-decoration:none!important}.hotel-details-page #location .ag4166-directions-other>summary:hover{color:var(--ag-map-orange)!important}.hotel-details-page #location .ag60-location-fallback>.ag4166-directions{align-self:center!important}

@media(max-width:1180px){.ag4166-map-rail{width:min(470px,calc(100vw - 120px))}.ag4166-rail-toggle{left:498px}.ag4166-rail-card{grid-template-columns:190px minmax(0,1fr)}.ag4166-rail-media{min-height:205px}.ag4166-map-floating-controls{gap:8px}.ag4166-map-chip{padding:0 12px}}
@media(max-width:900px){body.hotel-search-page.ag4166-map-active .search-dock,body.hotel-search-page.ag4166-map-active .results-hero,body.hotel-search-page.ag4166-map-active .results-toolbar{display:none!important}.ag4166-map-card{display:none!important}.ag4166-map-floating-controls{top:12px;left:12px;right:72px;max-width:none;overflow-x:auto;padding-bottom:4px}.ag4166-map-chip{min-height:38px;padding:0 11px;font-size:12px;white-space:nowrap}.ag4166-map-close{top:12px;right:12px;min-height:38px;padding:0 10px;font-size:0}.ag4166-map-close span{font-size:22px}.ag4166-map-rail,.ag4166-rail-toggle{display:none!important}body.hotel-search-page.ag4166-map-active.ag4166-map-filters-open #filters{left:10px!important;right:10px!important;top:calc(var(--ag4166-map-top,150px) + 58px)!important;bottom:10px!important;width:auto!important;padding:15px!important}}
@media(max-width:700px){body.ag4166-map-active .maplibregl-popup{position:fixed!important;left:10px!important;right:10px!important;bottom:10px!important;top:auto!important;width:auto!important;max-width:none!important;transform:none!important}body.ag4166-map-active .maplibregl-popup-tip{display:none!important}body.ag4166-map-active .maplibregl-popup-content{width:100%!important;min-width:0!important;max-width:none!important}.ag4166-info{max-width:none}.ag4166-info img{max-height:145px}.ag4166-info-actions{grid-template-columns:1fr 1fr 1.2fr}.hotel-details-page #location .ag58-map,.hotel-details-page #location .ag60-location-fallback{flex-direction:column!important}.hotel-details-page #location .ag4166-directions-actions{justify-content:flex-start!important}}
@media(prefers-reduced-motion:reduce){.ag4166-map-open,.ag4166-price-pin,.ag4166-rail-card,.ag4166-map-rail,.ag4166-rail-toggle,.ag4166-info-save,.ag4166-info-directions,.ag4166-info a,.hotel-card .ag415-map-link{transition:none!important}.ag4166-map-open:hover,.ag4166-rail-card:hover,.ag4166-rail-card.is-active,.ag4166-info-save:hover,.ag4166-info-directions:hover,.ag4166-info a:hover{transform:none!important}}
.ag4166-map-card-place{position:absolute;left:16px;top:48%;transform:translateY(-50%);max-width:68%;color:var(--ag-map-navy);font-size:18px;line-height:1.15;font-weight:850;text-shadow:0 1px 0 rgba(255,255,255,.85)}
body.hotel-search-page.ag4166-map-active #filters .ag4166-map-card{display:none!important}
.ag4166-price-pin{color:var(--ag-map-navy)!important}
/* Rail disclosure control sits beside the top of the list, matching established OTA map ergonomics. */
.ag4166-rail-toggle{top:92px!important;transform:none!important}.ag4166-rail-toggle.is-collapsed{top:78px!important;transform:none!important}


/* ===== D4166R2.4.2 live-QA corrections ===== */
.ag4166-map-chip.is-active{border-color:rgba(239,108,34,.72)!important;box-shadow:0 0 0 2px rgba(239,108,34,.12),0 5px 18px rgba(11,31,56,.14)!important}
.ag4166-map-popover{position:absolute;z-index:12;width:min(360px,calc(100vw - 24px));max-height:min(560px,calc(100% - 92px));overflow:auto;padding:16px;border:1px solid rgba(11,31,56,.12);border-radius:17px;background:#fff;color:var(--ag-map-navy);box-shadow:0 18px 48px rgba(11,31,56,.24);scrollbar-width:thin}.ag4166-map-popover[hidden]{display:none!important}
.ag4166-map-pop-section+.ag4166-map-pop-section{margin-top:14px;padding-top:14px;border-top:1px solid #e8edf0}.ag4166-map-pop-title{display:block;margin:0 0 10px;font-size:14px;line-height:1.3}.ag4166-map-pop-field{display:grid;gap:6px;margin:0 0 10px;font-size:12px;font-weight:750}.ag4166-map-pop-field input{width:100%;min-height:40px;border:1px solid #d5dee5;border-radius:10px;padding:0 11px;font:inherit;color:var(--ag-map-navy);background:#fff}.ag4166-map-pop-field input:focus{outline:3px solid rgba(239,108,34,.18);border-color:var(--ag-map-orange)}
.ag4166-map-pop-check{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:36px;font-size:13px;cursor:pointer}.ag4166-map-pop-check input{width:18px;height:18px;margin:0;accent-color:var(--ag-map-navy)}.ag4166-map-pop-check-label{min-width:0}.ag4166-map-pop-count{color:var(--ag-map-muted);font-size:11px;font-weight:700}.ag4166-map-pop-number-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ag4166-map-pop-note{margin:4px 0 10px;color:var(--ag-map-muted);font-size:12px;line-height:1.45}.ag4166-map-pop-footer{display:flex;justify-content:space-between;gap:10px;margin-top:15px;padding-top:13px;border-top:1px solid #e8edf0}.ag4166-map-pop-secondary,.ag4166-map-pop-clear{min-height:38px;border-radius:9px;padding:0 12px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.ag4166-map-pop-secondary{border:1px solid #ccd6de;background:#fff;color:var(--ag-map-navy)}.ag4166-map-pop-clear{border:0;background:transparent;color:#135cc5}.ag4166-map-pop-secondary:hover{border-color:#9fadb8}.ag4166-map-pop-clear:hover{color:var(--ag-map-orange)}
/* Fixed card geometry prevents portrait/landscape gallery images from resizing the hotel card. */
.ag4166-rail-card{height:218px!important;min-height:218px!important;max-height:218px!important;grid-template-rows:218px!important}.ag4166-rail-media{height:218px!important;min-height:0!important;max-height:218px!important}.ag4166-rail-media>img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important}.ag4166-rail-noimg{position:absolute;inset:0}.ag4166-rail-body{height:218px!important;min-height:0;overflow:hidden}.ag4166-rail-top h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.ag4166-rail-location,.ag4166-rail-rate{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.ag4166-rail-perks{max-height:24px;overflow:hidden}.ag4166-rail-actions{flex:0 0 auto}
/* Keep pins away from the top-left floating controls and close control. */
.ag4166-map-floating-controls,.ag4166-map-close{isolation:isolate}.ag4166-price-pin{z-index:4}.ag4166-price-pin.is-active,.ag4166-price-pin.is-selected,.ag4166-price-pin.is-hover{z-index:8}
@media(max-width:1180px){.ag4166-rail-card{height:210px!important;min-height:210px!important;max-height:210px!important;grid-template-rows:210px!important}.ag4166-rail-media,.ag4166-rail-body{height:210px!important;max-height:210px!important}}
@media(max-width:900px){.ag4166-map-popover{position:absolute!important;left:12px!important;right:12px!important;top:62px!important;width:auto!important;max-height:calc(100% - 78px)!important;padding:14px!important}.ag4166-map-pop-number-grid{grid-template-columns:1fr 1fr}.ag4166-map-popover .ag4166-map-pop-secondary,.ag4166-map-popover .ag4166-map-pop-clear{min-height:42px}.ag4166-map-floating-controls{scrollbar-width:none}.ag4166-map-floating-controls::-webkit-scrollbar{display:none}}
@media(max-width:520px){.ag4166-map-pop-number-grid{grid-template-columns:1fr}.ag4166-map-pop-footer{position:sticky;bottom:-14px;margin-left:-14px;margin-right:-14px;padding:12px 14px;background:#fff}}
@media(prefers-reduced-motion:reduce){.ag4166-map-popover{scroll-behavior:auto!important}}


/* ===== D4166R2.4.3 live-QA corrections ===== */
/* Desktop popup stays compact and cannot grow beyond the usable map viewport. */
@media(min-width:701px){
  body.ag4166-map-active .maplibregl-popup{max-width:344px!important}
  body.ag4166-map-active .maplibregl-popup-content{width:344px!important;max-width:calc(100vw - 32px)!important;max-height:min(470px,calc(100vh - var(--ag4166-map-top,154px) - 32px))!important;overflow:auto!important;overscroll-behavior:contain}
  body.ag4166-map-active .ag4166-info{max-width:320px!important}
  body.ag4166-map-active .ag4166-info img{max-height:148px!important}
}
/* Popup content stays readable in short desktop/tablet viewports instead of being clipped below the map. */
@media(min-width:701px) and (max-height:760px){
  body.ag4166-map-active .maplibregl-popup-content{max-height:calc(100vh - var(--ag4166-map-top,154px) - 24px)!important;padding:9px!important}
  body.ag4166-map-active .ag4166-info img{max-height:124px!important;margin-bottom:7px}
  body.ag4166-map-active .ag4166-info h3{font-size:16px}
  body.ag4166-map-active .ag4166-info-actions{margin-top:6px}
}


/* ===== D4166R2.4.5 live-QA interaction + price/header corrections ===== */
/* Map mode keeps the live news ticker, removes the secondary nav strip, and surfaces currency beside Close map. */
body.hotel-search-page.ag4166-map-active #nav,
body.hotel-search-page.ag4166-map-active .nav{display:none!important}
.ag4166-map-currency{position:absolute;z-index:10;top:20px;right:150px;min-height:42px;padding:0 14px;border:1px solid rgba(11,31,56,.10);border-radius:10px;background:#fff;color:var(--ag-map-navy);font:inherit;font-size:13px;font-weight:850;box-shadow:0 5px 18px rgba(11,31,56,.14);cursor:pointer}
.ag4166-map-currency:hover{border-color:#aeb9c3}.ag4166-map-currency:focus-visible{outline:3px solid rgba(239,108,34,.45);outline-offset:2px}
/* General map: rail is the detail authority. Do not cover the map with the large selected-hotel popup while the rail is open. */
body.ag4166-map-active:not(.ag4166-single-hotel-map) #ag4166MapRailWrap:not(.is-collapsed)~* .maplibregl-popup{display:none}
/* Per-hotel View map opens only that property's mapped detail; filters/rail are not shown. */
body.hotel-search-page.ag4166-single-hotel-map .ag4166-map-floating-controls,
body.hotel-search-page.ag4166-single-hotel-map .ag4166-map-rail,
body.hotel-search-page.ag4166-single-hotel-map .ag4166-rail-toggle{display:none!important}
/* Price pills are navy by default; hovered/selected authority is AirlyGo orange. */
.ag4166-price-pin{background:var(--ag-map-navy)!important;border-color:var(--ag-map-navy)!important;color:#fff!important}
.ag4166-price-pin:hover,.ag4166-price-pin.is-hover,.ag4166-price-pin.is-active,.ag4166-price-pin.is-selected{background:var(--ag-map-orange)!important;border-color:var(--ag-map-orange)!important;color:#fff!important}
/* Reserve clean vertical bands inside fixed rail cards so hotel copy never collides with benefits or price. */
.ag4166-rail-body{gap:0!important}
.ag4166-rail-location,.ag4166-rail-rate{flex:0 0 auto!important;-webkit-line-clamp:1!important;white-space:normal}
.ag4166-rail-perks{flex:0 0 auto!important;min-height:20px;max-height:20px!important;margin-top:6px!important}
.ag4166-rail-price{flex:0 0 auto!important;margin-top:auto!important;padding-top:5px!important}
.ag4166-rail-price strong{font-size:18px!important;line-height:1.15!important}
.ag4166-rail-price span{font-size:12px!important;line-height:1.25!important;font-weight:700!important}
.ag4166-rail-actions{margin-top:6px!important}
/* Selected popup follows the same total-vs-nightly emphasis. */
.ag4166-info-price strong{font-size:18px!important}.ag4166-info-price span{font-size:12px!important;font-weight:700!important}
/* Hover preview appears only when the rail is collapsed, similar to mature OTA map result previews. */
.ag4166-hover-preview{display:grid;grid-template-columns:132px minmax(0,1fr);width:356px;max-width:calc(100vw - 32px);min-height:122px;background:#fff;color:var(--ag-map-navy);overflow:hidden}
.ag4166-hover-preview>img{width:132px;height:100%;min-height:122px;object-fit:cover;display:block}
.ag4166-hover-preview-body{min-width:0;padding:10px 11px;display:flex;flex-direction:column}
.ag4166-hover-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ag4166-hover-preview-head strong{font-size:14px;line-height:1.28}.ag4166-hover-preview-head span{flex:0 0 auto;padding:4px 6px;border-radius:7px;background:var(--ag-map-navy);color:#fff;font-size:11px;font-weight:850}
.ag4166-hover-preview-stars{margin-top:4px;color:#f6a700;font-size:12px}.ag4166-hover-preview p{margin:4px 0 0;color:var(--ag-map-muted);font-size:11px;line-height:1.3}
.ag4166-hover-preview-price{margin-top:auto;text-align:right}.ag4166-hover-preview-price strong{display:block;font-size:17px}.ag4166-hover-preview-price span{display:block;margin-top:2px;color:var(--ag-map-muted);font-size:11px;font-weight:700}
/* Search-results map tile: clearer blue map CTA like the requested reference, while retaining AirlyGo-owned preview art. */
.ag4166-map-open{background:#0b63ce!important;box-shadow:0 8px 20px rgba(11,99,206,.24)!important}.ag4166-map-open:hover{box-shadow:0 10px 23px rgba(11,99,206,.30)!important}
.ag4166-map-pin-icon{font-size:0}.ag4166-map-pin-icon::before{content:"●";font-size:13px;color:#fff}
/* MapLibre popup chrome for hover preview should remain compact. */
.maplibregl-popup:has(.ag4166-hover-preview) .maplibregl-popup-content{padding:0!important;width:auto!important;max-width:370px!important;overflow:hidden!important;border-radius:14px!important}
.maplibregl-popup:has(.ag4166-hover-preview) .maplibregl-popup-tip{display:block}
@media(max-width:900px){.ag4166-map-currency{top:12px;right:60px;min-height:38px;padding:0 10px;font-size:11px}.ag4166-map-close{right:12px}.ag4166-hover-preview{grid-template-columns:110px minmax(0,1fr);width:min(330px,calc(100vw - 24px))}.ag4166-hover-preview>img{width:110px}}
@media(prefers-reduced-motion:reduce){.ag4166-map-currency,.ag4166-hover-preview{transition:none!important}}

.ag4166-map-currency-menu{position:absolute;z-index:14;top:68px;right:142px;width:168px;max-height:min(420px,calc(100% - 86px));overflow:auto;padding:7px;border:1px solid rgba(11,31,56,.12);border-radius:12px;background:#fff;box-shadow:0 16px 40px rgba(11,31,56,.22)}.ag4166-map-currency-menu[hidden]{display:none!important}.ag4166-map-currency-menu button{display:block;width:100%;min-height:36px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:var(--ag-map-navy);font:inherit;font-size:12px;font-weight:750;text-align:left;cursor:pointer}.ag4166-map-currency-menu button:hover,.ag4166-map-currency-menu button.is-active{background:#eef3f7}.ag4166-map-currency-menu button.is-active{color:var(--ag-map-orange)}
.ag4166-rail-card.is-map-hover{border-color:var(--ag-map-orange)!important;box-shadow:0 7px 20px rgba(11,31,56,.11)!important}
@media(max-width:900px){.ag4166-map-currency-menu{top:58px;right:12px;width:156px;max-height:calc(100% - 74px)}}


/* ===== D4166R2.4.5 approved viewport/rail/price/interaction polish ===== */
/* The map shell is now a direct body child: occupy every usable pixel below the LIVE ticker. */
html.ag4166-map-active-root,body.ag4166-map-active{height:100%!important;overflow:hidden!important;overscroll-behavior:none!important}
body.hotel-search-page.ag4166-map-active #nav,body.hotel-search-page.ag4166-map-active .nav{display:none!important}
body.hotel-search-page.ag4166-map-active #results{visibility:hidden!important;pointer-events:none!important}
body.hotel-search-page.ag4166-map-active.ag4166-map-filters-open #filters{visibility:visible!important;pointer-events:auto!important}
body.hotel-search-page.ag4166-map-active .ag4166-map-shell{display:block!important;position:fixed!important;z-index:10000!important;top:var(--ag4166-map-top,40px)!important;left:0!important;right:0!important;bottom:auto!important;height:var(--ag4166-map-height,calc(100dvh - var(--ag4166-map-top,40px)))!important;min-height:240px!important;max-height:none!important;margin:0!important;border:0!important;overflow:hidden!important;background:#eef2f4!important}
@supports(height:100dvh){body.hotel-search-page.ag4166-map-active .ag4166-map-shell{height:min(var(--ag4166-map-height,calc(100dvh - var(--ag4166-map-top,40px))),calc(100dvh - var(--ag4166-map-top,40px)))!important}}
.ag4166-map-workspace,.ag4166-map-stage,.ag4166-map-canvas{height:100%!important;min-height:0!important;max-height:none!important}

/* Search-results map preview: AirlyGo cream/navy/orange map art with a real semantic CTA. */
.ag4166-map-card{height:150px!important;border-color:#dbe3e8!important;background:#fbfaf7!important;box-shadow:0 8px 24px rgba(11,31,56,.09)!important}
.ag4166-map-preview{background:#fbfaf7 url('../images/airlygo-map-preview-r245.svg') center/cover no-repeat!important}
.ag4166-map-preview svg{display:none!important}.ag4166-map-card-place{display:none!important}
.ag4166-map-card-count{top:11px!important;right:11px!important;padding:7px 11px!important;background:rgba(255,255,255,.96)!important;color:var(--ag-map-navy)!important}
.ag4166-map-open{left:50%!important;bottom:18px!important;min-width:188px!important;min-height:48px!important;padding:0 16px!important;gap:11px!important;border:1.5px solid var(--ag-map-orange)!important;border-radius:999px!important;background:rgba(255,252,247,.97)!important;color:var(--ag-map-navy)!important;box-shadow:0 9px 24px rgba(11,31,56,.14)!important;font-size:14px!important;font-weight:850!important;letter-spacing:0!important}
.ag4166-map-open:hover{background:#fff!important;color:var(--ag-map-navy)!important;border-color:#df5c15!important;box-shadow:0 11px 27px rgba(239,108,34,.18)!important;filter:none!important}.ag4166-map-open-chevron{color:var(--ag-map-orange);font-size:27px;line-height:1;margin-left:1px}.ag4166-map-open .ag4166-location-icon{width:17px;height:17px}
.ag4166-location-icon{position:relative;display:inline-block;flex:0 0 auto;width:14px;height:14px;border:2px solid var(--ag-map-orange);border-radius:50% 50% 50% 0;transform:rotate(-45deg);box-sizing:border-box}.ag4166-location-icon::after{content:"";position:absolute;width:4px;height:4px;border-radius:50%;background:var(--ag-map-orange);left:3px;top:3px}

/* Stable rail cards: enough reserved height for 2-line names, vertical benefits, price and CTA. */
.ag4166-map-rail{bottom:14px!important}
.ag4166-rail-card{height:258px!important;min-height:258px!important;max-height:258px!important;grid-template-columns:218px minmax(0,1fr)!important;grid-template-rows:258px!important}
.ag4166-rail-media,.ag4166-rail-body{height:258px!important;max-height:258px!important;min-height:0!important}.ag4166-rail-body{padding:11px 13px 14px 16px!important;overflow:hidden!important}
.ag4166-rail-top h3{font-size:16px!important;line-height:1.25!important;max-height:40px}.ag4166-rail-stars{margin-top:3px!important}.ag4166-rail-location,.ag4166-rail-rate{margin-top:4px!important;line-height:1.28!important;-webkit-line-clamp:1!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important}
.ag4166-rail-perks{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:4px!important;flex:0 0 auto!important;min-height:0!important;max-height:44px!important;margin-top:6px!important;overflow:hidden!important}.ag4166-rail-perks span{display:inline-flex!important;width:max-content;max-width:100%;min-height:18px;align-items:center;padding:2px 7px!important;line-height:1.25!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ag4166-rail-price{flex:0 0 auto!important;margin-top:auto!important;padding-top:5px!important;text-align:right}.ag4166-total-line{display:flex;align-items:baseline;justify-content:flex-end;gap:4px;white-space:nowrap}.ag4166-total-line strong{font-size:18px!important;line-height:1.12!important;color:var(--ag-map-navy)!important}.ag4166-total-label{font-size:10px!important;line-height:1!important;font-weight:700!important;color:var(--ag-map-muted)!important;text-transform:lowercase}.ag4166-night-line{margin-top:4px!important;font-size:13px!important;line-height:1.2!important;font-weight:750!important;color:var(--ag-map-muted)!important;white-space:nowrap}
.ag4166-rail-actions{flex:0 0 auto!important;margin-top:7px!important;padding-bottom:0!important}.ag4166-rail-actions a{min-height:36px!important;padding:0 13px!important;border-radius:9px!important;font-size:11px!important}.ag4166-rail-card:last-child{margin-bottom:0}

/* Price pins: geography never changes with selection; visual state only. */
.ag4166-price-pin{background:var(--ag-map-navy)!important;border-color:var(--ag-map-navy)!important;color:#fff!important}.ag4166-price-pin:hover,.ag4166-price-pin.is-hover,.ag4166-price-pin.is-active,.ag4166-price-pin.is-selected{background:var(--ag-map-orange)!important;border-color:var(--ag-map-orange)!important;color:#fff!important}

/* Reusable preview gallery for single-hotel/tap popup and rail-collapsed hover preview. */
.ag4166-preview-gallery{position:relative;width:100%;height:156px;overflow:hidden;border-radius:12px;background:#eef2f4}.ag4166-preview-gallery.is-compact{width:142px;height:100%;min-height:138px;border-radius:0}.ag4166-preview-gallery>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}.ag4166-preview-noimg{position:absolute;inset:0;display:grid;place-items:center;color:#83909c;font-weight:800}.ag4166-preview-arrow{position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:999px;background:rgba(255,255,255,.94);color:var(--ag-map-navy);font:inherit;font-size:24px;line-height:1;display:grid;place-items:center;cursor:pointer;box-shadow:0 2px 9px rgba(11,31,56,.16)}.ag4166-preview-arrow.prev{left:8px}.ag4166-preview-arrow.next{right:8px}.ag4166-preview-dots{position:absolute;z-index:2;left:0;right:0;bottom:8px;display:flex;justify-content:center;gap:5px;pointer-events:none}.ag4166-preview-dot{width:7px;height:7px;border-radius:999px;background:rgba(255,255,255,.56);box-shadow:0 1px 2px rgba(0,0,0,.18)}.ag4166-preview-dot.is-active{background:#fff}

/* Compact selected hotel popup: clean copy, small total label, larger nightly, no bulky action buttons. */
.maplibregl-popup-content{width:370px!important;max-width:calc(100vw - 28px)!important;padding:10px!important}.ag4166-info{max-width:348px!important}.ag4166-info-body{padding:9px 2px 1px}.ag4166-info-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.ag4166-info h3{font-size:17px!important;line-height:1.22!important}.ag4166-info-stars{margin-top:4px;color:#f6a700;font-size:12px}.ag4166-info-rate{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:5px 0 0!important}.ag4166-info-perks{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:4px!important;margin:7px 0 0!important}.ag4166-info-price{display:block!important;margin:9px 0 7px!important;text-align:right}.ag4166-info-price .ag4166-total-line strong{font-size:18px!important}.ag4166-info-price .ag4166-night-line{font-size:13px!important}.ag4166-preview-location-link{appearance:none;border:0;background:transparent;padding:2px 0;margin:2px 0 0;display:inline-flex;align-items:center;gap:8px;color:var(--ag-map-navy);font:inherit;font-size:12px;font-weight:800;text-decoration:none;cursor:pointer}.ag4166-preview-location-link:hover{color:var(--ag-map-orange)}.ag4166-preview-location-link:focus-visible{outline:3px solid rgba(239,108,34,.35);outline-offset:3px;border-radius:4px}

/* Hover preview is interactive: gallery arrows/dots/swipe remain usable during the short hover hand-off. */
.ag4166-hover-preview{display:grid!important;grid-template-columns:142px minmax(0,1fr)!important;width:382px!important;max-width:calc(100vw - 32px)!important;min-height:138px!important;background:#fff;color:var(--ag-map-navy);overflow:hidden}.ag4166-hover-preview-body{min-width:0;padding:10px 11px 10px;display:flex;flex-direction:column}.ag4166-hover-preview-head strong{font-size:14px;line-height:1.25;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.ag4166-hover-preview-stars{margin-top:4px}.ag4166-hover-preview-price{margin-top:auto!important;text-align:right}.ag4166-hover-preview-price .ag4166-total-line strong{font-size:17px!important}.ag4166-hover-preview-price .ag4166-night-line{font-size:12px!important}.ag4166-hover-preview .ag4166-preview-location-link{margin-top:6px;max-width:100%;white-space:nowrap;overflow:hidden}.ag4166-hover-preview .ag4166-preview-location-link>span:last-child{overflow:hidden;text-overflow:ellipsis}
.maplibregl-popup:has(.ag4166-hover-preview) .maplibregl-popup-content{padding:0!important;width:auto!important;max-width:390px!important;overflow:hidden!important;border-radius:14px!important}

@media(max-width:1180px){.ag4166-rail-card{height:250px!important;min-height:250px!important;max-height:250px!important;grid-template-columns:190px minmax(0,1fr)!important;grid-template-rows:250px!important}.ag4166-rail-media,.ag4166-rail-body{height:250px!important;max-height:250px!important}.ag4166-rail-top h3{font-size:15px!important}.ag4166-rail-actions a{min-height:34px!important}}
@media(max-width:900px){body.hotel-search-page.ag4166-map-active #results{visibility:hidden!important}.ag4166-map-floating-controls{right:122px!important}.ag4166-map-currency{top:12px!important;right:60px!important}.ag4166-map-close{right:12px!important}.ag4166-map-open{min-height:46px!important;min-width:178px!important}.ag4166-hover-preview{grid-template-columns:118px minmax(0,1fr)!important;width:min(342px,calc(100vw - 24px))!important}.ag4166-preview-gallery.is-compact{width:118px}}
@media(max-width:700px){body.ag4166-map-active .maplibregl-popup{left:10px!important;right:10px!important;bottom:10px!important}.ag4166-info{max-width:none!important}.ag4166-preview-gallery{height:138px}.ag4166-info-body{padding:8px 1px 1px}.ag4166-hover-preview{display:block!important;width:min(344px,calc(100vw - 24px))!important}.ag4166-hover-preview .ag4166-preview-gallery.is-compact{width:100%!important;height:132px!important;min-height:132px!important}.ag4166-hover-preview-body{padding:9px 10px}}
@media(max-width:520px){.ag4166-map-open{min-width:170px!important;padding:0 14px!important}.ag4166-map-card-count{font-size:10px!important}.ag4166-total-line strong{font-size:17px!important}.ag4166-night-line{font-size:12px!important}}
@media(prefers-reduced-motion:reduce){.ag4166-price-pin,.ag4166-map-open,.ag4166-rail-card,.ag4166-preview-arrow{transition:none!important}.ag4166-rail-card:hover{transform:none!important}}

/* ===== D4166R2.4.6 adaptive rail + marker-position integrity hotfix ===== */
/* SECURITY/INTEGRITY: price-pin root transform belongs exclusively to the map provider.
   Do not set position/transform/left/top/right/bottom on .ag4166-price-pin in any visual state. */
.ag4166-price-pin,
.ag4166-price-pin:hover,
.ag4166-price-pin.is-hover,
.ag4166-price-pin.is-active,
.ag4166-price-pin.is-selected{
  background-clip:padding-box!important;
}

/* Desktop rail: use available horizontal room instead of forcing price below hotel copy. */
@media (min-width:1181px){
  .ag4166-rail-card{
    grid-template-columns:190px minmax(0,1fr)!important;
  }
  .ag4166-rail-body{
    min-width:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(132px,142px)!important;
    grid-template-rows:auto auto auto auto auto 1fr auto!important;
    column-gap:10px!important;
    align-content:stretch!important;
    padding:11px 13px 14px 14px!important;
  }
  .ag4166-rail-top{grid-column:1;grid-row:1;min-width:0}
  .ag4166-rail-stars{grid-column:1;grid-row:2;min-width:0}
  .ag4166-rail-location{grid-column:1;grid-row:3;min-width:0}
  .ag4166-rail-rate{grid-column:1;grid-row:4;min-width:0}
  .ag4166-rail-perks{grid-column:1;grid-row:5;min-width:0}
  .ag4166-rail-price{
    grid-column:2!important;
    grid-row:1 / 7!important;
    align-self:end!important;
    min-width:0!important;
    margin:0!important;
    padding:0 0 7px!important;
    text-align:right!important;
  }
  .ag4166-rail-actions{
    grid-column:2!important;
    grid-row:7!important;
    align-self:end!important;
    justify-content:stretch!important;
    min-width:0!important;
    margin:0!important;
  }
  .ag4166-rail-actions a{width:100%!important;box-sizing:border-box}
}

/* Copy must truncate deliberately, never because the body clips the right edge. */
.ag4166-rail-top{min-width:0!important}
.ag4166-rail-top h3{
  min-width:0!important;
  max-height:none!important;
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  overflow:hidden!important;
  overflow-wrap:anywhere!important;
  text-overflow:ellipsis;
}
.ag4166-rail-location{
  display:block!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.ag4166-rail-rate{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  white-space:normal!important;
  overflow:hidden!important;
  overflow-wrap:anywhere!important;
  text-overflow:ellipsis!important;
}
.ag4166-rail-perks{
  display:flex!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  align-items:flex-start!important;
  gap:4px!important;
  min-width:0!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
}
.ag4166-rail-perks span{max-width:100%!important}
.ag4166-rail-price{min-width:0!important}
.ag4166-rail-price .ag4166-total-line{min-width:0!important;justify-content:flex-end!important}
.ag4166-rail-price .ag4166-total-line strong{font-size:17px!important}
.ag4166-rail-price .ag4166-total-label{font-size:10px!important}
.ag4166-rail-price .ag4166-night-line{font-size:13px!important}

/* When there is not enough horizontal room, fall back to a safe vertical commercial footer. */
@media (max-width:1180px){
  .ag4166-rail-card{
    height:auto!important;
    min-height:250px!important;
    max-height:none!important;
    grid-template-columns:175px minmax(0,1fr)!important;
    grid-template-rows:auto!important;
  }
  .ag4166-rail-media{
    height:100%!important;
    min-height:250px!important;
    max-height:none!important;
  }
  .ag4166-rail-body{
    height:auto!important;
    min-height:250px!important;
    max-height:none!important;
    overflow:visible!important;
    display:flex!important;
    flex-direction:column!important;
    padding:11px 12px 14px 14px!important;
  }
  .ag4166-rail-price{margin-top:auto!important;padding-top:9px!important}
  .ag4166-rail-actions{margin-top:7px!important}
}

/* Very narrow rails retain text first; commercial controls remain fully visible. */
@media (max-width:700px){
  .ag4166-rail-card{grid-template-columns:150px minmax(0,1fr)!important}
  .ag4166-rail-price .ag4166-total-line strong{font-size:16px!important}
  .ag4166-rail-price .ag4166-night-line{font-size:12px!important}
}



/* ===== D4166R2.4.7 approved responsive map/currency/card/gallery polish ===== */
/* Currency ownership stays with the hotel search engine. While it refetches the selected currency,
   suppress stale map commercial values rather than independently converting or displaying mismatched prices. */
body.ag4167-currency-updating .ag4166-price-pin,
body.ag4167-currency-updating .ag4166-rail-price,
body.ag4167-currency-updating .ag4166-info-price,
body.ag4167-currency-updating .ag4166-hover-preview-price{visibility:hidden!important}
.ag4166-map-currency[aria-busy="true"]{cursor:progress!important;opacity:.78}

/* Search-result and map galleries: desktop/fine-pointer arrows are quiet until image hover/focus.
   Arrow chrome is intentionally transparent: only the chevron remains over the photo. */
@media (hover:hover) and (pointer:fine){
  .hotel-photo .gallery-arrow,
  .ag4166-rail-arrow,
  .ag4166-preview-arrow{
    opacity:0!important;pointer-events:none!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#fff!important;width:34px!important;height:48px!important;font-size:34px!important;font-weight:800!important;text-shadow:0 2px 8px rgba(0,0,0,.72)!important;filter:drop-shadow(0 1px 2px rgba(0,0,0,.36));transition:opacity .16s ease!important
  }
  .hotel-photo:hover .gallery-arrow,.hotel-photo:focus-within .gallery-arrow,.hotel-photo:focus .gallery-arrow,
  .ag4166-rail-media:hover .ag4166-rail-arrow,.ag4166-rail-media:focus-within .ag4166-rail-arrow,
  .ag4166-preview-gallery:hover .ag4166-preview-arrow,.ag4166-preview-gallery:focus-within .ag4166-preview-arrow,.ag4166-preview-gallery:focus .ag4166-preview-arrow{opacity:1!important;pointer-events:auto!important}
  .hotel-photo .gallery-arrow--prev,.ag4166-rail-arrow.prev,.ag4166-preview-arrow.prev{left:7px!important}
  .hotel-photo .gallery-arrow--next,.ag4166-rail-arrow.next,.ag4166-preview-arrow.next{right:7px!important}
}
@media (hover:none),(pointer:coarse){
  .hotel-photo .gallery-arrow,.ag4166-rail-arrow,.ag4166-preview-arrow{display:none!important}
}

/* Compact map previews: let long amounts wrap safely inside their own commercial column. */
.ag4166-info-price,.ag4166-hover-preview-price,.ag4166-rail-price{min-width:0!important;max-width:100%!important}
.ag4166-info-price .ag4166-total-line,.ag4166-hover-preview-price .ag4166-total-line,.ag4166-rail-price .ag4166-total-line{min-width:0!important;max-width:100%!important;white-space:normal!important;flex-wrap:wrap!important;row-gap:1px!important}
.ag4166-info-price .ag4166-total-line strong,.ag4166-hover-preview-price .ag4166-total-line strong,.ag4166-rail-price .ag4166-total-line strong{min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}
.ag4166-info-price .ag4166-night-line,.ag4166-hover-preview-price .ag4166-night-line,.ag4166-rail-price .ag4166-night-line{white-space:normal!important;overflow-wrap:anywhere!important}
.ag4166-info-head h3,.ag4166-hover-preview-head strong{min-width:0!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important}

/* Mobile sort becomes an accessible bottom sheet while the existing #sort and data-sort controls retain authority. */
.ag4167-sort-backdrop[hidden]{display:none!important}.ag4167-sort-sheet-head{display:none}.ag4167-redundant-nav-close{display:none!important}
@media(max-width:700px){
  body.ag4167-sort-open{overflow:hidden!important}
  .ag4167-sort-backdrop{position:fixed!important;inset:0!important;z-index:12030!important;border:0!important;background:rgba(11,31,56,.48)!important;cursor:pointer!important}
  #agSortMenu.ag-sort-menu{position:fixed!important;z-index:12040!important;left:10px!important;right:10px!important;top:auto!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;max-height:min(72dvh,580px)!important;margin:0!important;padding:0 0 calc(10px + env(safe-area-inset-bottom))!important;overflow:auto!important;border:1px solid rgba(11,31,56,.10)!important;border-radius:22px!important;background:#fff!important;box-shadow:0 22px 60px rgba(11,31,56,.28)!important;transform:none!important}
  #agSortMenu.ag-sort-menu[hidden]{display:none!important}
  .ag4167-sort-sheet-head{position:sticky;top:0;z-index:2;display:flex!important;align-items:center;justify-content:space-between;gap:12px;min-height:62px;padding:10px 14px 9px 18px;border-bottom:1px solid #e2e8ed;background:#fff}
  .ag4167-sort-sheet-head strong{font-size:18px;color:var(--ag-map-navy)}
  .ag4167-sort-close{width:44px;height:44px;border:1px solid #d8e0e6;border-radius:999px;background:#fff;color:var(--ag-map-navy);font:inherit;font-size:28px;line-height:1;cursor:pointer}
  #agSortMenu>button[data-sort]{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;width:100%!important;min-height:54px!important;padding:0 20px!important;border:0!important;border-bottom:1px solid #eef1f4!important;border-radius:0!important;background:#fff!important;color:var(--ag-map-navy)!important;font:inherit!important;font-size:15px!important;font-weight:700!important;text-align:left!important}
  #agSortMenu>button[data-sort].active{background:#fff8f2!important;color:var(--ag-map-navy)!important}
  #agSortMenu .ag-sort-check{color:var(--ag-map-orange)!important;font-weight:900!important}
}

/* Mobile edit-stay search: long destinations must never collide with controls or create horizontal overflow. */
@media(max-width:700px){
  #hotelResultsForm .destination-field,#hotelResultsForm .destination-field .field-control{min-width:0!important;max-width:100%!important}
  #hotelResultsForm #hotelDestination{min-width:0!important;max-width:100%!important;padding-right:18px!important;text-overflow:ellipsis!important;overflow:hidden!important;white-space:nowrap!important}
}

/* Responsive hotel results: image + identity/details share the first row; commercial block owns a clean full-width footer.
   The frozen search/rate engine and existing card DOM remain untouched. */
@media(max-width:900px){
  #searchResults .hotel-card{display:grid!important;grid-template-columns:clamp(180px,31vw,230px) minmax(0,1fr)!important;grid-template-areas:"photo details" "price price"!important;grid-template-rows:auto auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important;align-items:stretch!important}
  #searchResults .hotel-card>.hotel-photo{grid-area:photo!important;width:auto!important;min-width:0!important;height:auto!important;min-height:238px!important;max-height:none!important;align-self:stretch!important;border-radius:0!important}
  #searchResults .hotel-card>.hotel-photo>img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important}
  #searchResults .hotel-card>.hotel-content{grid-area:details!important;min-width:0!important;height:auto!important;min-height:238px!important;max-height:none!important;overflow:visible!important;padding:17px 16px 15px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-area:price!important;min-width:0!important;width:100%!important;min-height:0!important;height:auto!important;max-height:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(180px,1.25fr)!important;grid-template-areas:"review price" "cta cta"!important;gap:10px 16px!important;align-items:end!important;padding:15px 18px 17px!important;border-left:0!important;border-top:1px solid #e3e8ec!important;background:#fff!important}
  #searchResults .hotel-card .review-box,#searchResults .hotel-card .review-copy{grid-area:review!important;align-self:center!important;justify-self:start!important;min-width:0!important}
  #searchResults .hotel-card .price-block{grid-area:price!important;justify-self:end!important;align-self:center!important;min-width:0!important;max-width:100%!important;text-align:right!important}
  #searchResults .hotel-card .availability-button{grid-area:cta!important;width:100%!important;min-height:48px!important;margin:0!important;justify-self:stretch!important}
  #searchResults .hotel-title,#searchResults .hotel-title a{min-width:0!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;overflow-wrap:anywhere!important}
  #searchResults .hotel-location{min-width:0!important;display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important}
  #searchResults .hotel-location>span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  #searchResults .hotel-location .ag415-map-link{flex:0 0 auto!important;margin-left:6px!important;white-space:nowrap!important}
  #searchResults .ag415-stay-summary{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  #searchResults .ag4153-room-block{min-width:0!important}
  #searchResults .ag4153-room-block .room-name{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;overflow-wrap:anywhere!important}
  #searchResults .ag4153-room-block .board-name{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  #searchResults .ag4163-benefits{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:5px!important;min-width:0!important}
  #searchResults .ag4163-benefit{max-width:100%!important;min-width:0!important}
}
@media(max-width:700px){
  #searchResults .hotel-card{grid-template-columns:clamp(112px,36vw,160px) minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-photo{min-height:226px!important}
  #searchResults .hotel-card>.hotel-content{min-height:226px!important;padding:14px 12px 13px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:minmax(0,1fr) minmax(150px,1.18fr)!important;padding:14px 14px 16px!important;gap:10px 12px!important}
  #searchResults .hotel-title{font-size:19px!important;line-height:1.22!important}
  #searchResults .hotel-location{font-size:12px!important}
  #searchResults .hotel-location .ag415-map-link{font-size:12px!important}
  #searchResults .ag4152-details-link,#searchResults .ag415-stay-summary{font-size:12px!important}
  #searchResults .ag4153-room-block .room-name{font-size:14px!important;line-height:1.25!important}
  #searchResults .ag4153-room-block .board-name{font-size:12px!important}
  #searchResults .ag4163-benefit{font-size:11px!important}
  #searchResults .hotel-keyfacts{font-size:11px!important}
}
@media(max-width:360px){
  #searchResults .hotel-card{grid-template-columns:108px minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-content{padding-left:10px!important;padding-right:10px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:1fr!important;grid-template-areas:"review" "price" "cta"!important;align-items:start!important}
  #searchResults .hotel-card .price-block{justify-self:start!important;text-align:left!important}
}

/* Mobile map controls remain reachable instead of being clipped behind currency/close actions. */
@media(max-width:700px){
  .ag4166-map-floating-controls{left:10px!important;right:112px!important;top:10px!important;max-width:none!important;display:flex!important;gap:7px!important;overflow-x:auto!important;overscroll-behavior-x:contain!important;scrollbar-width:none!important;padding:0 2px 5px!important}
  .ag4166-map-floating-controls::-webkit-scrollbar{display:none!important}
  .ag4166-map-chip{flex:0 0 auto!important;min-height:38px!important;padding:0 11px!important;font-size:11px!important}
  .ag4166-map-currency{top:10px!important;right:58px!important;min-width:50px!important;min-height:38px!important;padding:0 8px!important}
  .ag4166-map-close{top:10px!important;right:10px!important;width:40px!important;min-width:40px!important;height:38px!important;min-height:38px!important;padding:0!important;font-size:0!important;justify-content:center!important}
  .ag4166-map-close span{font-size:25px!important}
  .ag4166-map-currency-menu{top:54px!important;right:10px!important}
}

@media(prefers-reduced-motion:reduce){
  .hotel-photo .gallery-arrow,.ag4166-rail-arrow,.ag4166-preview-arrow,#agSortMenu,.ag4167-sort-backdrop{transition:none!important}
}


/* ===== D4166R2.4.8 responsive OTA map/card interaction polish ===== */
/* SECURITY/INTEGRITY: map provider owns marker geography. Never set position/transform/left/top/right/bottom on .ag4166-price-pin. */
.ag4166-price-pin{
  display:inline-flex!important;align-items:center!important;gap:6px!important;min-height:34px!important;padding:6px 10px!important;
  border:2px solid var(--ag-map-navy)!important;border-radius:999px!important;background:var(--ag-map-navy)!important;color:#fff!important;
  box-shadow:0 5px 15px rgba(11,31,56,.22)!important;font-size:11px!important;font-weight:850!important;line-height:1!important;
}
.ag4168-pin-bed{width:14px;height:14px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ag4168-pin-price{white-space:nowrap}
/* Hover/focus is deliberately distinct from actual selection. Only the selected property becomes orange. */
.ag4166-price-pin:hover,.ag4166-price-pin.is-hover,.ag4166-price-pin:focus-visible{
  background:var(--ag-map-navy)!important;color:#fff!important;border-color:var(--ag-map-orange)!important;
  box-shadow:0 0 0 3px rgba(239,108,34,.18),0 8px 22px rgba(11,31,56,.25)!important;
}
.ag4166-price-pin.is-active,.ag4166-price-pin.is-selected{
  background:var(--ag-map-orange)!important;color:#fff!important;border-color:var(--ag-map-orange)!important;
  box-shadow:0 0 0 3px rgba(255,255,255,.82),0 9px 24px rgba(239,108,34,.34)!important;
}
.ag4166-price-pin.is-active:hover,.ag4166-price-pin.is-active:focus-visible,.ag4166-price-pin.is-selected:hover,.ag4166-price-pin.is-selected:focus-visible{
  background:var(--ag-map-orange)!important;border-color:var(--ag-map-orange)!important;
}

/* Strong synchronized selection state: 2px orange + cream tint + elevation. */
.ag4166-rail-card.is-active,
#searchResults .hotel-card.ag4166-map-card-active{
  border:2px solid var(--ag-map-orange)!important;background:#fff8f2!important;
  box-shadow:0 12px 30px rgba(11,31,56,.16),0 0 0 1px rgba(239,108,34,.05)!important;
}
.ag4166-rail-card.is-active{transform:none!important}
.ag4166-rail-card.is-active .ag4166-rail-body,
#searchResults .hotel-card.ag4166-map-card-active>.hotel-content,
#searchResults .hotel-card.ag4166-map-card-active>.hotel-price-panel{background:#fff8f2!important}
.ag4166-rail-card.is-map-hover:not(.is-active){border-color:rgba(239,108,34,.62)!important;box-shadow:0 7px 20px rgba(11,31,56,.10)!important}

/* Canonical coordinate directions links. */
.ag4166-preview-location-link,.ag4168-rail-directions{
  width:100%;min-width:0;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;
  color:var(--ag-map-navy)!important;text-decoration:none!important;cursor:pointer;
}
.ag4168-directions-place{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag4168-directions-action{color:var(--ag-map-orange);font-size:10px;font-weight:850;white-space:nowrap}
.ag4168-rail-directions{margin:5px 0 0!important;font-size:12px!important;font-weight:750!important;line-height:1.35!important}
.ag4168-rail-directions:hover .ag4168-directions-place,.ag4166-preview-location-link:hover .ag4168-directions-place{color:var(--ag-map-orange)!important}
#searchResults .hotel-location .ag4168-card-location-link{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit!important;text-decoration:none!important;font-weight:650}
#searchResults .hotel-location .ag4168-card-location-link:hover{color:var(--ag-map-orange)!important;text-decoration:underline!important;text-underline-offset:2px}
#searchResults .hotel-location .ag4168-card-directions-hint{flex:0 0 auto;color:var(--ag-map-orange);font-size:10px;font-weight:800;white-space:nowrap}

/* OTA quick hotel brief: stable image + identity + rating/location + one benefit + total/nightly. */
.ag4166-hover-preview{grid-template-columns:150px minmax(0,1fr)!important;width:390px!important;min-height:142px!important;border-radius:14px!important}
.ag4166-hover-preview .ag4166-preview-gallery.is-compact{width:150px!important;min-height:142px!important}
.ag4166-hover-preview-body{padding:11px 12px!important;gap:2px!important}
.ag4166-hover-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.ag4166-hover-preview-head>span{flex:0 0 auto;min-width:34px;padding:5px 7px;border-radius:8px;background:var(--ag-map-navy);color:#fff;font-size:11px;font-weight:850;text-align:center}
.ag4166-hover-preview-stars{color:#f6a700!important;font-size:12px!important;letter-spacing:.03em}
.ag4166-hover-preview .ag4166-preview-location-link{margin-top:3px!important;font-size:11px!important}
.ag4168-hover-benefit{align-self:flex-start;max-width:100%;margin-top:4px;padding:3px 7px;border-radius:999px;background:#edf8f1;color:#14753b;font-size:9.5px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ag4166-hover-preview-price{margin-top:auto!important;padding-top:6px!important}
.ag4166-hover-preview-price .ag4166-total-line{justify-content:flex-start!important}
.ag4166-hover-preview-price .ag4166-night-line{text-align:left!important}

/* Compact persistent map preview: prevent any price/title crossover. */
.ag4166-info-body{min-width:0!important}
.ag4166-info-price{min-width:0!important;display:grid!important;justify-items:end!important;gap:3px!important}
.ag4166-info-price .ag4166-total-line{display:flex!important;justify-content:flex-end!important;flex-wrap:nowrap!important;width:100%!important}
.ag4166-info-price .ag4166-total-line strong{overflow-wrap:normal!important;word-break:normal!important;white-space:nowrap!important}
.ag4166-info-price .ag4166-night-line{white-space:nowrap!important;max-width:100%!important}

/* Sort: sharp sheet over a dim backdrop. Never blur the interactive sheet or page content. */
body.ag4167-sort-open #agSortMenu,body.ag4167-sort-open #agSortMenu *{filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.ag4167-sort-backdrop{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

/* Mobile header: compact sticky surface, never a large fixed banner over hotel details. */
@media(max-width:700px){
  body.hotel-search-page .nav{position:sticky!important;top:0!important;z-index:1100!important;min-height:68px!important;height:auto!important;background:#fffaf3!important;box-shadow:0 1px 0 rgba(11,31,56,.08)!important}
  body.hotel-search-page .nav-inner{min-height:68px!important;padding-top:8px!important;padding-bottom:8px!important}
  body.hotel-search-page .nav-logo img{max-height:46px!important;width:auto!important}
  body.hotel-search-page .results-toolbar{margin-bottom:8px!important}
  body.hotel-search-page .results-toolbar+.active-filters,body.hotel-search-page .active-filters{margin-bottom:8px!important}
}

/* Responsive result cards: essential hotel identity/detail data must never disappear. */
@media(max-width:900px){
  #searchResults .hotel-card{isolation:isolate!important;overflow:hidden!important}
  #searchResults .hotel-card>.hotel-content{display:flex!important;flex-direction:column!important;visibility:visible!important;opacity:1!important;overflow:visible!important;z-index:1!important}
  #searchResults .hotel-card .hotel-title-row,#searchResults .hotel-card .hotel-title,#searchResults .hotel-card .hotel-location,#searchResults .hotel-card .ag4152-details-link,#searchResults .hotel-card .ag415-stay-summary,#searchResults .hotel-card .ag4153-room-block,#searchResults .hotel-card .ag4163-benefits{visibility:visible!important;opacity:1!important}
  #searchResults .hotel-card>.hotel-price-panel{position:relative!important;z-index:2!important;overflow:visible!important}
}
@media(max-width:700px){
  #searchResults .hotel-card{grid-template-columns:clamp(126px,37vw,158px) minmax(0,1fr)!important;grid-template-areas:"photo details" "price price"!important}
  #searchResults .hotel-card>.hotel-photo,#searchResults .hotel-card>.hotel-content{min-height:218px!important;height:auto!important}
  #searchResults .hotel-card>.hotel-content{padding:13px 11px 12px!important;gap:0!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:minmax(0,1fr) minmax(144px,1.15fr)!important;grid-template-areas:"review price" "cta cta"!important;padding:12px 13px 14px!important;gap:9px 10px!important}
  #searchResults .hotel-card .price-total-primary,#searchResults .hotel-card .price-nightly-secondary{white-space:normal!important;overflow-wrap:anywhere!important}
  #searchResults .hotel-location{gap:5px!important}
  #searchResults .hotel-location .ag415-map-link{margin-left:2px!important}
}
@media(max-width:360px){
  #searchResults .hotel-card{grid-template-columns:108px minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-photo,#searchResults .hotel-card>.hotel-content{min-height:210px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:1fr!important;grid-template-areas:"review" "price" "cta"!important}
  #searchResults .hotel-card .price-block{justify-self:start!important;text-align:left!important}
  #searchResults .hotel-location .ag4168-card-directions-hint{display:none!important}
}

/* Touch/mobile/tablet map preview: tap selection is persistent, compact, and viewport-safe. */
@media(max-width:900px),(hover:none),(pointer:coarse){
  .ag4166-map-rail{display:none!important}
  .ag4166-rail-toggle{display:none!important}
}
@media(max-width:700px){
  body.ag4166-map-active .maplibregl-popup{max-width:none!important}
  body.ag4166-map-active .maplibregl-popup-content{width:min(430px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;padding:8px!important;border-radius:17px!important}
  .ag4166-info{display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;max-width:none!important;min-height:132px!important}
  .ag4166-info>.ag4166-preview-gallery{width:112px!important;height:132px!important;border-radius:12px!important}
  .ag4166-info-body{padding:5px 5px 3px 10px!important;display:flex!important;flex-direction:column!important}
  .ag4166-info h3{font-size:15px!important}
  .ag4166-info-rate{font-size:11px!important;-webkit-line-clamp:1!important}
  .ag4166-info-perks{display:none!important}
  .ag4166-info-price{margin:6px 0 3px!important;margin-top:auto!important}
  .ag4166-info-price .ag4166-total-line strong{font-size:16px!important}
  .ag4166-info-price .ag4166-night-line{font-size:11px!important}
  .ag4166-info .ag4166-preview-location-link{font-size:10.5px!important;margin-top:2px!important}
  .ag4166-info .ag4168-directions-action{font-size:9px!important}
}
@media(min-width:701px) and (max-width:900px){
  .maplibregl-popup-content{width:380px!important;max-width:calc(100vw - 32px)!important}
}

/* Reduced-motion retains all state distinction without animation. */
@media(prefers-reduced-motion:reduce){
  .ag4166-price-pin,.ag4166-rail-card,#searchResults .hotel-card{transition:none!important}
}

/* R2.4.8 final sort interoperability: neutralize the legacy mobile sort chrome
   while the R2.4.8 sheet owns the visible modal surface. */
.ag170-sort-backdrop{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
body.ag4167-sort-open .ag170-sort-backdrop{display:none!important}
body.ag4167-sort-open #agSortMenu .ag170-sort-head{display:none!important}

/* Compact map-preview action. */
.ag4168-info-actions{display:flex;justify-content:flex-end;margin-top:8px}
.ag4168-info-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border-radius:12px;background:var(--ag-map-orange);color:#fff!important;font-weight:850;text-decoration:none;white-space:nowrap;box-shadow:0 5px 14px rgba(255,119,31,.18)}
.ag4168-info-actions a:hover,.ag4168-info-actions a:focus-visible{filter:brightness(.96);outline:3px solid rgba(255,119,31,.22);outline-offset:2px}
@media(max-width:700px){.ag4168-info-actions{margin-top:6px}.ag4168-info-actions a{min-height:40px;width:100%}}


/* ===== D4166R2.4.10 hotel-card + map preview gallery/safe-gap polish =====
   UI only. Search/supplier/PREBOOK/FX/payment/booking authority remains frozen. */

/* Search result cards: remove redundant text actions; hotel image/title remain the details navigation,
   while the full location row is the coordinate-based directions action. */
#searchResults .hotel-card .ag4152-details-link,
#searchResults .hotel-card .ag415-map-link,
#searchResults .hotel-card .ag4168-card-directions-hint{display:none!important}
#searchResults .hotel-card .hotel-location{align-items:flex-start!important;flex-wrap:wrap!important;min-width:0!important}
#searchResults .hotel-card .hotel-location .ag4168-card-location-link{
  display:inline!important;min-width:0!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important;
  white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.35!important;color:inherit!important;text-decoration:none!important
}
#searchResults .hotel-card .hotel-location .ag4168-card-location-link:hover,
#searchResults .hotel-card .hotel-location .ag4168-card-location-link:focus-visible{color:var(--ag-map-orange)!important;text-decoration:underline!important;text-underline-offset:2px}

/* Full identity/facility text: no premature ellipsis in hotel name, location, room, board or benefits. */
#searchResults .hotel-card .hotel-title,
#searchResults .hotel-card .hotel-title a{
  display:block!important;max-width:100%!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;
  -webkit-line-clamp:unset!important;-webkit-box-orient:initial!important;overflow-wrap:anywhere!important
}
#searchResults .hotel-card .ag415-stay-summary,
#searchResults .hotel-card .ag4153-room-block .room-name,
#searchResults .hotel-card .ag4153-room-block .board-name,
#searchResults .hotel-card .hotel-keyfacts,
#searchResults .hotel-card .ag4163-benefit,
#searchResults .hotel-card .ag4163-benefit strong{
  max-width:100%!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;
  -webkit-line-clamp:unset!important;-webkit-box-orient:initial!important;overflow-wrap:anywhere!important
}

/* Commercial truth remains readable: never split a monetary amount into two lines. */
#searchResults .hotel-card .price-block{min-width:0!important}
#searchResults .hotel-card .price-total-primary,
#searchResults .hotel-card .ag4164-price-value,
#searchResults .hotel-card .price-nightly-secondary,
.ag4166-info-price .ag4166-total-line,
.ag4166-info-price .ag4166-total-line strong,
.ag4166-info-price .ag4166-night-line,
.ag4166-hover-preview-price .ag4166-total-line,
.ag4166-hover-preview-price .ag4166-total-line strong,
.ag4166-hover-preview-price .ag4166-night-line,
.ag4166-rail-price .ag4166-total-line strong,
.ag4166-rail-price .ag4166-night-line{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
#searchResults .hotel-card .price-total-primary{display:flex!important;align-items:baseline!important;justify-content:flex-end!important;gap:5px!important;flex-wrap:nowrap!important}
#searchResults .hotel-card .ag4164-price-value{min-width:max-content!important}

/* Mobile/tablet arrangement: image + hotel identity first, clean commercial footer below. */
@media(max-width:900px){
  #searchResults .hotel-card{grid-template-columns:clamp(180px,31vw,230px) minmax(0,1fr)!important;grid-template-areas:"photo details" "price price"!important;grid-template-rows:auto auto!important;height:auto!important;max-height:none!important}
  #searchResults .hotel-card>.hotel-photo{grid-area:photo!important;min-height:250px!important;height:auto!important;align-self:stretch!important}
  #searchResults .hotel-card>.hotel-content{grid-area:details!important;min-height:250px!important;height:auto!important;overflow:visible!important;padding:17px 16px 15px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-area:price!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(210px,1.15fr)!important;grid-template-areas:"review price" "cta cta"!important;gap:10px 16px!important;align-items:center!important;padding:14px 18px 17px!important;border-left:0!important;border-top:1px solid #e3e8ec!important}
  #searchResults .hotel-card .review-box,#searchResults .hotel-card .review-copy{grid-area:review!important;justify-self:start!important}
  #searchResults .hotel-card .price-block{grid-area:price!important;justify-self:end!important;text-align:right!important}
  #searchResults .hotel-card .availability-button{grid-area:cta!important;width:100%!important;min-height:48px!important;margin:0!important}
}
@media(max-width:700px){
  #searchResults .hotel-card{grid-template-columns:clamp(126px,40vw,172px) minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-photo,#searchResults .hotel-card>.hotel-content{min-height:248px!important}
  #searchResults .hotel-card>.hotel-content{padding:14px 12px 13px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:minmax(0,1fr) minmax(165px,1.1fr)!important;padding:13px 14px 15px!important;gap:9px 12px!important}
  #searchResults .hotel-card .hotel-title{font-size:18px!important;line-height:1.22!important}
  #searchResults .hotel-card .hotel-location{font-size:12px!important}
  #searchResults .hotel-card .ag415-stay-summary{font-size:12px!important}
  #searchResults .hotel-card .ag4153-room-block .room-name{font-size:14px!important;line-height:1.28!important}
  #searchResults .hotel-card .ag4153-room-block .board-name{font-size:12px!important;line-height:1.32!important}
  #searchResults .hotel-card .ag4163-benefit{font-size:11px!important;line-height:1.3!important}
}
@media(max-width:360px){
  #searchResults .hotel-card{grid-template-columns:108px minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-photo,#searchResults .hotel-card>.hotel-content{min-height:236px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:1fr!important;grid-template-areas:"review" "price" "cta"!important;align-items:start!important}
  #searchResults .hotel-card .price-block{justify-self:start!important;text-align:left!important;width:100%!important}
  #searchResults .hotel-card .price-total-primary{justify-content:flex-start!important}
}

/* Map preview: full hotel/facility text, no visible Directions label, and gallery controls on hover/focus. */
.ag4166-preview-location-link,.ag4168-rail-directions{
  grid-template-columns:auto minmax(0,1fr)!important;align-items:start!important;gap:7px!important
}
.ag4168-directions-place{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.35!important}
.ag4168-directions-action{display:none!important}
.ag4166-info-head h3,.ag4166-hover-preview-head strong,.ag4166-rail-top h3{
  display:block!important;overflow:visible!important;text-overflow:clip!important;white-space:normal!important;
  -webkit-line-clamp:unset!important;-webkit-box-orient:initial!important;overflow-wrap:anywhere!important
}
.ag4166-info-rate,.ag4169-hover-rate,.ag4166-rail-rate{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;line-height:1.35!important}
.ag4166-info-perks,.ag4166-rail-perks{display:flex!important;flex-wrap:wrap!important}
.ag4166-info-perks span,.ag4166-rail-perks span,.ag4168-hover-benefit{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important}
.ag4166-preview-gallery{touch-action:pan-y!important}
.ag4166-preview-gallery.is-compact{touch-action:pan-y!important}

/* Selected/hover popup spacing is controlled by JS popup offsets; keep popup content itself compact and stable. */
.maplibregl-popup-content{overflow:visible!important}

@media(max-width:700px){
  body.ag4166-map-active .maplibregl-popup-content{width:min(430px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important}
  .ag4166-info{grid-template-columns:clamp(112px,34vw,148px) minmax(0,1fr)!important;min-height:154px!important;max-height:min(58vh,430px)!important;overflow:auto!important}
  .ag4166-info>.ag4166-preview-gallery{width:auto!important;height:auto!important;min-height:154px!important;border-radius:12px!important}
  .ag4166-info-body{padding:7px 7px 5px 10px!important}
  .ag4166-info h3{font-size:15px!important;line-height:1.25!important}
  .ag4166-info-rate{font-size:11px!important;-webkit-line-clamp:unset!important}
  .ag4166-info-perks{display:flex!important;gap:4px!important;margin-top:5px!important}
  .ag4166-info-perks span{font-size:9.5px!important}
  .ag4166-info-price{margin:7px 0 3px!important;margin-top:auto!important;justify-items:start!important}
  .ag4166-info-price .ag4166-total-line{justify-content:flex-start!important}
  .ag4166-info-price .ag4166-total-line strong{font-size:16px!important}
  .ag4166-info-price .ag4166-night-line{font-size:11px!important;text-align:left!important}
  .ag4166-info .ag4166-preview-location-link{font-size:10.5px!important;margin-top:3px!important}
}

/* Map rail also shows full identity/facility content. */
.ag4166-rail-body{overflow:visible!important}
.ag4166-rail-rate{max-width:100%!important}

/* Fine pointer: gallery arrows stay visually quiet until image hover/focus; coarse pointer uses swipe. */
@media (hover:hover) and (pointer:fine){
  .ag4166-preview-gallery .ag4166-preview-arrow{opacity:0!important;pointer-events:none!important}
  .ag4166-preview-gallery:hover .ag4166-preview-arrow,.ag4166-preview-gallery:focus-within .ag4166-preview-arrow,.ag4166-preview-gallery:focus .ag4166-preview-arrow{opacity:1!important;pointer-events:auto!important}
}
@media (hover:none),(pointer:coarse){.ag4166-preview-gallery .ag4166-preview-arrow{display:none!important}}


/* ===== D4166R2.4.11 responsive result-card collision hotfix + full-map visibility contract =====
   UI/map presentation only. Supplier/search/PREBOOK/FX/payment/booking authority remains frozen. */

/* The result list is the sizing authority. Container queries avoid squeezing the desktop 3-column
   card when filters reduce the actual card width even on a large viewport. */
#searchResults #results.results-list{container-type:inline-size;container-name:ag-hotel-results}

/* Benefits and commercial sections must remain in normal flow: never float/overlay one another. */
#searchResults .hotel-card .ag4163-benefits{
  position:static!important;inset:auto!important;display:flex!important;flex-wrap:wrap!important;
  align-items:flex-start!important;gap:6px!important;max-width:100%!important;margin-top:8px!important;
  transform:none!important
}
#searchResults .hotel-card .ag4163-benefit{position:static!important;max-width:100%!important;flex:0 1 auto!important}
#searchResults .hotel-card>.hotel-price-panel{position:static!important;inset:auto!important;transform:none!important;min-width:0!important}
#searchResults .hotel-card .price-block{position:static!important;inset:auto!important;transform:none!important;max-width:100%!important}
#searchResults .hotel-card .availability-button{position:static!important;inset:auto!important;transform:none!important}

/* Shared narrow-card geometry. The image + identity stay together; rating/price/CTA get a dedicated
   full-card footer, so benefits and money can never collide. */
@media(max-width:1180px){
  #searchResults .hotel-card{
    display:grid!important;grid-template-columns:clamp(180px,30vw,250px) minmax(0,1fr)!important;
    grid-template-areas:"photo details" "price price"!important;grid-template-rows:auto auto!important;
    align-items:stretch!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important
  }
  #searchResults .hotel-card>.hotel-photo{
    grid-area:photo!important;align-self:stretch!important;width:auto!important;height:auto!important;min-height:220px!important;max-height:none!important
  }
  #searchResults .hotel-card>.hotel-photo img{width:100%!important;height:100%!important;min-height:220px!important;object-fit:cover!important}
  #searchResults .hotel-card>.hotel-content{
    grid-area:details!important;display:flex!important;flex-direction:column!important;min-width:0!important;width:auto!important;
    height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:16px 15px!important
  }
  #searchResults .hotel-card>.hotel-price-panel{
    grid-area:price!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,max-content)!important;
    grid-template-areas:"review price" "cta cta"!important;align-items:center!important;column-gap:18px!important;row-gap:10px!important;
    width:auto!important;min-height:0!important;height:auto!important;padding:13px 16px 15px!important;border-left:0!important;border-top:1px solid #e3e8ec!important
  }
  #searchResults .hotel-card>.hotel-price-panel .review-box{grid-area:review!important;justify-self:start!important;align-self:center!important;min-width:0!important}
  #searchResults .hotel-card>.hotel-price-panel .price-block{grid-area:price!important;justify-self:end!important;align-self:center!important;text-align:right!important;min-width:max-content!important}
  #searchResults .hotel-card>.hotel-price-panel .availability-button{grid-area:cta!important;width:100%!important;min-height:48px!important;margin:0!important}
  #searchResults .hotel-card .price-total-primary{justify-content:flex-end!important}
}

/* Same geometry when the results column itself is narrow, even if the browser viewport is wide. */
@container ag-hotel-results (max-width:880px){
  .hotel-card{
    display:grid!important;grid-template-columns:clamp(180px,30cqw,250px) minmax(0,1fr)!important;
    grid-template-areas:"photo details" "price price"!important;grid-template-rows:auto auto!important;
    align-items:stretch!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important
  }
  .hotel-card>.hotel-photo{grid-area:photo!important;align-self:stretch!important;width:auto!important;height:auto!important;min-height:220px!important;max-height:none!important}
  .hotel-card>.hotel-photo img{width:100%!important;height:100%!important;min-height:220px!important;object-fit:cover!important}
  .hotel-card>.hotel-content{grid-area:details!important;display:flex!important;flex-direction:column!important;min-width:0!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;padding:16px 15px!important}
  .hotel-card>.hotel-price-panel{grid-area:price!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,max-content)!important;grid-template-areas:"review price" "cta cta"!important;align-items:center!important;column-gap:18px!important;row-gap:10px!important;width:auto!important;min-height:0!important;height:auto!important;padding:13px 16px 15px!important;border-left:0!important;border-top:1px solid #e3e8ec!important}
  .hotel-card>.hotel-price-panel .review-box{grid-area:review!important;justify-self:start!important;min-width:0!important}
  .hotel-card>.hotel-price-panel .price-block{grid-area:price!important;justify-self:end!important;text-align:right!important;min-width:max-content!important}
  .hotel-card>.hotel-price-panel .availability-button{grid-area:cta!important;width:100%!important;min-height:48px!important;margin:0!important}
}

@media(max-width:700px){
  #searchResults .hotel-card{grid-template-columns:clamp(124px,40vw,168px) minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-photo{min-height:214px!important}
  #searchResults .hotel-card>.hotel-photo img{min-height:214px!important}
  #searchResults .hotel-card>.hotel-content{padding:13px 11px 12px!important}
  #searchResults .hotel-card>.hotel-price-panel{grid-template-columns:minmax(0,1fr) minmax(165px,max-content)!important;padding:12px 13px 14px!important;column-gap:12px!important;row-gap:9px!important}
  #searchResults .hotel-card .hotel-title{font-size:18px!important;line-height:1.22!important}
  #searchResults .hotel-card .hotel-location{font-size:12px!important;line-height:1.32!important}
  #searchResults .hotel-card .ag4153-room-block{position:static!important;min-width:0!important;max-width:100%!important;margin-top:7px!important}
  #searchResults .hotel-card .ag4153-room-block .room-name{font-size:13px!important;line-height:1.3!important}
  #searchResults .hotel-card .ag4153-room-block .board-name{font-size:11.5px!important;line-height:1.32!important}
  #searchResults .hotel-card .ag4163-benefits{margin-top:7px!important;gap:5px!important}
  #searchResults .hotel-card .ag4163-benefit{font-size:10.5px!important;line-height:1.25!important}
}

/* Phones get a single-column commercial footer. This trades a little height for zero overlap and
   preserves complete monetary values on 320/390 widths. */
@media(max-width:480px){
  #searchResults .hotel-card{grid-template-columns:clamp(116px,38vw,150px) minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-photo{min-height:205px!important}
  #searchResults .hotel-card>.hotel-photo img{min-height:205px!important}
  #searchResults .hotel-card>.hotel-price-panel{
    grid-template-columns:1fr!important;grid-template-areas:"review" "price" "cta"!important;align-items:start!important;gap:8px!important
  }
  #searchResults .hotel-card>.hotel-price-panel .review-box{justify-self:start!important}
  #searchResults .hotel-card>.hotel-price-panel .price-block{justify-self:start!important;text-align:left!important;min-width:0!important;width:100%!important}
  #searchResults .hotel-card .price-total-primary{justify-content:flex-start!important;width:100%!important}
  #searchResults .hotel-card .price-nightly-secondary{text-align:left!important}
}
@media(max-width:340px){
  #searchResults .hotel-card{grid-template-columns:108px minmax(0,1fr)!important}
  #searchResults .hotel-card>.hotel-content{padding:11px 9px!important}
  #searchResults .hotel-card .hotel-title{font-size:17px!important}
}

/* R2.4.11 Map contract: every valid-coordinate result owns a visible DOM price marker. We no longer
   hide markers solely because another hotel is nearby. Exact/near overlaps may visually stack until
   the user zooms or pans, but no valid result is silently removed from the map. */
.ag4166-price-pin[hidden]{display:flex!important}
