/* Sigma Maps / Aqua 2006 — matched Frutiger Aero icon family.
   The Frontier skin keeps its own SVG controls and paper markers. */
.aero-ui-glyph{display:none;object-fit:contain;flex-shrink:0;vertical-align:middle;user-select:none;-webkit-user-drag:none;pointer-events:none}
body[data-theme=aero] .aero-ui-glyph{display:block;width:23px;height:23px}
body[data-theme=aero] .aero-fallback-glyph{display:none!important}
body[data-theme=aero] .studio-spark{display:none}

body[data-theme=aero] :is(.circle-button,.tool-button) .aero-ui-glyph{width:26px;height:26px}
body[data-theme=aero] .tool-button .aero-ui-glyph{width:28px;height:28px}
body[data-theme=aero] .search-icon .aero-ui-glyph{width:25px;height:25px}
body[data-theme=aero] .styles-launcher>.aero-ui-glyph{width:32px;height:32px}
body[data-theme=aero] .studio-launch>.aero-ui-glyph{width:22px;height:22px}
body[data-theme=aero] .route-place-symbol>.aero-ui-glyph{width:36px;height:36px}
body[data-theme=aero] :is(.route-style-button,.utility-button,.origin-summary,.origin-shortcuts button)>.aero-ui-glyph{width:21px;height:21px}
body[data-theme=aero] :is(.search-result,.origin-result,.place-row-select)>.aero-ui-glyph{width:23px;height:23px}

/* Correct the optical weight of the glossy artwork at compact mobile sizes. */
@media(max-width:760px){
  body[data-theme=aero] :is(.circle-button,.tool-button) .aero-ui-glyph{width:25px;height:25px}
  body[data-theme=aero] .search-icon .aero-ui-glyph{width:23px;height:23px}
  body[data-theme=aero] .styles-launcher>.aero-ui-glyph{width:27px;height:27px}
  body[data-theme=aero] .route-place-symbol>.aero-ui-glyph{width:32px;height:32px}
  body[data-theme=aero] .studio-launch>.aero-ui-glyph{width:19px;height:19px}
}

/* The route's endpoint is a real map marker, not a floating screen overlay.
   MapLibre owns element positioning; the background is anchored to its point. */
body[data-theme=aero] .sigma-marker.sigma-destination{
  width:35px;height:42px;padding:0;margin:0;border:0!important;border-radius:0!important;
  background:url('./assets/aero/destination-orange.png') center bottom/contain no-repeat!important;
  box-shadow:none!important;filter:drop-shadow(0 2px 2px rgba(56,67,83,.22));
  clip-path:none;transform:none;
}
body[data-theme=aero] .sigma-marker.sigma-destination .marker-centre{display:none}
body[data-theme=aero] .sigma-marker.sigma-origin{width:28px;height:28px;border:0!important;box-shadow:none!important}

/* Keep the destination field's width fixed while the phone keyboard opens.
   Search mode previously hid the neighboring Worlds key, causing a sudden
   field expansion as the input received focus. */
body[data-view=search] .styles-launcher{display:flex!important}

/* Safari zooms the page when focusing text fields below 16px.
   Do not shrink the Frontier search, which has its own larger type. */
@media(max-width:900px){
  body[data-theme=aero] .search-box input,
  body[data-theme=rose] .search-box input{font-size:16px}
  #originSearch{font-size:16px}
}

/* Keep the active input and suggestions in the visible portion of an iPhone
   screen when its keyboard overlays the bottom of the layout viewport. */
@media(max-width:900px){
  body[data-keyboard=search] .bottom-controls{
    bottom:calc(10px + env(safe-area-inset-bottom) + var(--sigma-keyboard-inset,0px));
  }
  body[data-keyboard=search] .search-results{
    max-height:min(230px,max(90px,calc(var(--sigma-visible-height,100dvh) - 160px)));
  }
  body[data-keyboard=origin] .route-card{
    bottom:calc(8px + var(--sigma-keyboard-inset,0px));
    max-height:max(140px,calc(var(--sigma-visible-height,100dvh) - 22px));
    overflow-y:auto;
  }
}
body[data-theme=aero] .nav-here-dot{
  display:block;width:24px;height:24px;border:0;border-radius:0;
  background:url('./assets/aero/route-start-green.png') center/contain no-repeat;
  box-shadow:none;filter:drop-shadow(0 1px 2px rgba(27,99,47,.25));
}
body[data-theme=aero] .nav-here-dot:after{display:none}

/* Subtle arrival motif without adding another button to the map. */
body[data-theme=aero] .route-kicker-dot{
  width:14px;height:14px;border-radius:0;
  background:url('./assets/aero/arrival-orange.png') center/contain no-repeat;
  box-shadow:none;
}

/* Aqua 2006 / Silver hardware revision.
   The colorful PNGs sit on a calm Windows-era raised toolbar surface rather
   than merging into blue controls. The map, glass windows, and orange CTA stay
   in their own materials. */
body[data-theme=aero]{
  --silver-edge:#8495a5;
  --silver-edge-soft:#a5b2bd;
  --silver-ink:#344f63;
  --silver-key:
    linear-gradient(180deg,rgba(255,255,255,.7) 0%,rgba(255,255,255,.17) 43%,transparent 44%),
    linear-gradient(180deg,#f5f7f9 0%,#e3e9ee 49%,#c9d3dc 100%);
  --silver-key-hover:
    linear-gradient(180deg,rgba(255,255,255,.8) 0%,rgba(255,255,255,.24) 43%,transparent 44%),
    linear-gradient(180deg,#fff 0%,#edf1f4 49%,#d4dce3 100%);
}
body[data-theme=aero] :is(
  .circle-button,.tool-button,.theme-close,.drawer-close,.route-close,
  .modal-close,.styles-launcher,.studio-launch,.route-style-button,
  .utility-button,.secondary-button,.origin-shortcuts button,.quick-places button
){
  color:var(--silver-ink)!important;
  background:var(--silver-key)!important;
  border:1px solid var(--silver-edge)!important;
  border-radius:5px;
  box-shadow:inset 0 1px 0 #fff,inset 1px 0 0 rgba(255,255,255,.65),
    inset 0 -1px 0 #aab7c2,0 1px 0 rgba(255,255,255,.76),
    0 2px 5px rgba(39,75,100,.14)!important;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  text-shadow:0 1px 0 rgba(255,255,255,.8);
}
body[data-theme=aero] :is(
  .circle-button,.tool-button,.theme-close,.drawer-close,.route-close,
  .modal-close,.styles-launcher,.studio-launch,.route-style-button,
  .utility-button,.secondary-button,.origin-shortcuts button,.quick-places button
):hover:not(:disabled){
  background:var(--silver-key-hover)!important;
  border-color:#697e92!important;
  filter:none;
}
body[data-theme=aero] :is(
  .circle-button,.tool-button,.styles-launcher,.studio-launch,.route-style-button,
  .utility-button,.secondary-button,.origin-shortcuts button,.quick-places button
):active:not(:disabled),
body[data-theme=aero] :is(.circle-button,.tool-button).active{
  background:linear-gradient(180deg,#c4ced7,#dce4eb)!important;
  border-color:#72899e!important;
  box-shadow:inset 0 2px 4px rgba(53,80,104,.2),inset 0 0 0 1px rgba(255,255,255,.5)!important;
  transform:none;
}
body[data-theme=aero] .styles-launcher:after{
  background:#98a8b5;opacity:.56;
}
body[data-theme=aero] .styles-copy strong{color:#344f63}
body[data-theme=aero] .styles-copy small{color:#627789}
body[data-theme=aero] .quick-places .place-dot{
  background:#52d33d;border-color:#4caf42;box-shadow:inset 0 1px #d9ffcf;
}
/* A silver icon well makes the orange arrival glass read immediately. */
body[data-theme=aero] .route-place-symbol{
  background:linear-gradient(180deg,#f7f9fb,#d5dfe7 100%)!important;
  border-color:var(--silver-edge-soft)!important;
  box-shadow:inset 0 1px #fff,inset 0 -1px rgba(99,120,137,.18)!important;
}

/* The window dismiss actions use a single custom ruby close key. They remain
   native buttons with their original labels, focus rings, and click handlers. */
body[data-theme=aero] :is(#routeClose,#themeClose,#placesClose,#aboutClose){
  width:36px;height:36px;min-width:36px;min-height:36px;
  padding:0;border:0!important;border-radius:5px;
  background:transparent url('./assets/aero/close-red-v1.png') center/contain no-repeat!important;
  box-shadow:none!important;backdrop-filter:none;transform:none;
}
body[data-theme=aero] :is(#routeClose,#themeClose,#placesClose,#aboutClose) .line-icon{
  visibility:hidden;
}
body[data-theme=aero] :is(#routeClose,#themeClose,#placesClose,#aboutClose):hover:not(:disabled){
  background:transparent url('./assets/aero/close-red-v1.png') center/contain no-repeat!important;
  filter:brightness(1.08) drop-shadow(0 2px 3px rgba(166,33,42,.2));
}
body[data-theme=aero] :is(#routeClose,#themeClose,#placesClose,#aboutClose):active:not(:disabled){
  background:transparent url('./assets/aero/close-red-v1.png') center/contain no-repeat!important;
  filter:brightness(.94);transform:translateY(1px);
}
/* Live route-state updates reconstruct this markup; icon() always restores
   the same image so loading/retry state cannot lose the new artwork. */
body[data-theme=aero] #routeButton>.aero-ui-glyph{
  display:block;width:29px;height:29px;
  filter:drop-shadow(0 1px 1px rgba(25,69,109,.27));
}
@media(max-width:760px){
  body[data-theme=aero] :is(#routeClose,#themeClose,#placesClose,#aboutClose){
    width:36px;height:36px;min-width:36px;min-height:36px;
  }
  body[data-theme=aero] #routeButton>.aero-ui-glyph{width:27px;height:27px}
}
@media(prefers-reduced-motion:reduce){
  body[data-theme=aero] .aero-ui-glyph{animation:none;transition:none}
}
