/* Only geography navigation; the map, table and popups retain the existing CSS. */

.xw-geography{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;padding:12px;border:1px solid var(--sm-border,#bccbd6);border-radius:10px}.xw-geography a{display:inline-flex;min-height:44px;align-items:center;padding:6px 10px;border:1px solid var(--sm-border,#bccbd6);border-radius:8px;text-decoration:none;color:inherit}.xw-geography a[aria-current=page]{font-weight:750;text-decoration:underline}.xw-geography label{display:flex;align-items:center;gap:8px}.xw-geography select,#xw-elevation{font:inherit;min-height:44px;max-width:100%;background:var(--sm-bg,#fff);color:var(--sm-ink,#17374e);border:1px solid var(--sm-border,#bccbd6);border-radius:8px;padding:6px}.xw-country-links{columns:3 210px;line-height:2}.xw-country-links a{break-inside:avoid;display:block}.xw-geography :focus-visible{outline:3px solid #1689bf;outline-offset:2px}body.xionia-dark .xw-geography{background:#132b3d;color:#e1edf4}body.xionia-dark .xw-geography select{background:#132b3d;color:#e1edf4}@media(max-width:600px){.xw-geography label,.xw-geography select{width:100%}.xw-geography{gap:6px;padding:8px}}#station-workspace [hidden]{display:none!important}
.xw-places-panel{padding:12px;border:1px solid #bdcddc;border-radius:12px;margin:10px 0}.xw-places-panel label{display:inline-flex;gap:8px;flex-wrap:wrap;margin:6px}.xw-places-panel input,.xw-places-panel select,.xw-place-results button{min-height:44px;font:inherit;max-width:100%}.xw-place-results{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.xw-places-credit{font-size:12px;max-width:850px}@media(max-width:640px){.xw-places-panel label{display:flex}.xw-places-panel input{width:100%}.xw-place-results button{width:100%;text-align:left}}

/* Greek station map: reserve the first mobile position before deferred controls arrive. */
@media(max-width:700px){:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace{display:flex;flex-direction:column}:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace>*{order:5;min-width:0}:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace>#sm-map{order:0;flex:none}:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace>.sm-map-footer{order:1}:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace>.sm-toolbar{order:2}:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace>.sm-wu-controls:not(.xw-geography){order:3}:root:has(script[src*="/station-map-v33.9.30-stations-r9.js"]) #station-workspace>.xw-geography{order:4}}

/* XIONIA_STATIONS_MAPFIRST_M15 r1 — world stations page only, phones/tablets <=819px: the map comes first and is
   taller; the toolbar (day, map value, search, filters) follows directly under it, then legend, networks, geography.
   Order only; no control, label or text is removed. The expanded map (.xn-map-full) keeps its own sizing. */
@media(max-width:819px){
 #station-workspace[data-station-view=world]{display:flex;flex-direction:column}
 #station-workspace[data-station-view=world]>*{order:5;min-width:0}
 #station-workspace[data-station-view=world]>#sm-map{order:0;flex:none}
 html body #station-workspace[data-station-view=world]>#sm-map:not(.xn-map-full):not(#m15){min-height:0!important;max-height:none!important;height:clamp(360px,calc(100vh - 306px),640px)!important;height:clamp(360px,calc(100svh - 306px),640px)!important}
 #station-workspace[data-station-view=world]>.sm-toolbar{order:1}
 #station-workspace[data-station-view=world]>#xso-panel{order:2}
 #station-workspace[data-station-view=world]>.sm-map-footer{order:3}
 #station-workspace[data-station-view=world]>.sm-wu-controls{order:4}
}
/* :has() stands alone: without it the map-value select simply keeps its full-width row. */
@media(max-width:640px){
 html body #station-workspace[data-station-view=world] .sm-toolbar>label:has(#sm-metric){grid-column:auto}
}
/* Refresh starts its own row in the left column, so the floating "Top" button covers no control when the map sits under the header. */
@media(max-width:640px){
 html body #station-workspace[data-station-view=world] .sm-toolbar>#sm-refresh{grid-column:1}
}
@media(max-width:960px) and (max-height:500px){
 html body #station-workspace[data-station-view=world]>#sm-map:not(.xn-map-full):not(#m15){min-height:0!important;max-height:none!important;height:max(200px,58vh)!important;height:max(200px,58svh)!important}
}
