/* Reserve separate positions for the credits, scale and zoom controls. */
#map .ol-attribution {
 inset: auto auto 8px 8px;
 max-width: min(48%, 460px);
 max-height: 46px;
 overflow: auto;
 overscroll-behavior: contain;
 background: var(--surface, #fff);
 color: var(--ink, #202833);
}
#map .ol-attribution ul {
 margin: 0;
 color: inherit;
 text-shadow: none;
 font-size: 11px;
 line-height: 1.35;
 overflow-wrap: anywhere;
}
#map .ol-attribution a {color: inherit; text-decoration: underline}
#map .ol-attribution.map-credits-managed {display: none !important}
#map .map-source-bar {
 position: absolute;
 z-index: 5;
 bottom: 6px;
 display: flex;
 align-items: center;
 gap: 4px 8px;
 padding: 4px 6px;
 border: 1px solid var(--line);
 border-radius: 9px;
 background: var(--surface, #fff);
 color: var(--ink, #202833);
 font-size: .75rem;
 line-height: 1.3;
 box-sizing: border-box;
}
.map-source-labels {min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; overflow-wrap: anywhere}
.map-source-labels a {color: inherit; text-decoration: underline}
.map-source-button {
 flex: none;
 min-height: 36px;
 padding: 4px 6px;
 border: 1px solid var(--line);
 border-radius: 6px;
 background: var(--surface-alt, var(--surface, #fff));
 color: inherit;
 cursor: pointer;
 font: inherit;
 font-weight: 600;
}
.map-source-dialog {
 box-sizing: border-box;
 color: var(--ink);
 background: var(--surface, #fff);
 width: min(620px, calc(100% - 24px));
 max-height: calc(var(--visible-height, 100dvh) - 24px);
 overflow: auto;
 overscroll-behavior: contain;
}
.map-source-content ul {padding-inline-start: 22px; overflow-wrap: anywhere}
.map-source-content li + li {margin-top: 8px}
@media (max-width: 700px) {
 body {
  --map-bottom: calc(var(--bottom-dock)
    + var(--mobile-legend-height, 0px) + var(--mobile-meteo-height, 0px) + var(--mobile-camera-height, 0px) + var(--mobile-drawing-height, 0px));
  --map-credit-row: var(--measured-map-credit-row, 54px);
 }
 body #map, body.panel-hidden #map {
  top: var(--map-header-height, var(--header));
  bottom: var(--map-bottom);
  height: auto;
 }
 #burzapp .statusbar {
  bottom: var(--visible-bottom-inset, 0px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "social privacy" "coordinates version";
  column-gap: 10px;
  row-gap: 0;
  height: auto;
  min-height: var(--footer);
  padding: 3px 12px;
 }
 .statusbar > a {grid-area: social; justify-self: start; min-height: 28px}
 #burzapp#burzapp .statusbar .footer-privacy {
  grid-area: privacy;
  min-height: 28px;
  margin: 0;
  padding: 0 2px;
  background: transparent;
  border: 0;
  box-shadow: none;
 }
 .statusbar #coordinate-readout {grid-area: coordinates; font-variant-numeric: tabular-nums}
 .statusbar .footer-mode {grid-area: version; justify-self: end; white-space: nowrap}
 #map .ol-attribution {max-width: 36%; left: 6px; bottom: 6px}
 #map .map-source-bar {left: 6px; max-width: calc(64% - 24px)}
 #map .map-source-button {min-height: 40px}
 #map .ol-scale-line {bottom: 8px !important; right: 8px !important; max-width: 36%}
 #map .ol-scale-line-inner {max-width: 100%; box-sizing: border-box}
 #map .ol-zoom {bottom: var(--map-credit-row) !important}
 body.radar-island-visible:not(.map-panel-open) #map .ol-zoom {
  bottom: calc(var(--map-credit-row) + 92px) !important;
 }
 #imgw-timeline {bottom: calc(var(--map-bottom) + var(--map-credit-row)); box-sizing: border-box}
 #imgw-timeline:not(.is-collapsed) {bottom:calc(var(--map-bottom) + var(--map-credit-row) + 24px)}
 #meteo-panel, #cameras-panel, #warning-legend {
  bottom: var(--bottom-dock) !important;
  max-height: min(52dvh, max(92px, calc(var(--visible-height, 100dvh) - var(--map-header-height, var(--header)) - var(--map-footer-height, var(--footer)) - var(--live-ticker-height, 0px) - 112px))) !important;
 }
 #meteo-panel:not([hidden]) {display: flex; flex-direction: column; overflow: hidden}
 #meteo-panel .meteo-heading {flex: none; min-width: 0}
 #meteo-panel .meteo-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 10px;
 }
 #cameras-panel .camera-body {overscroll-behavior: contain; scroll-padding-block: 10px}
 #meteo-panel.meteo-collapsed .meteo-body {display: none}
 #meteo-panel.meteo-collapsed, #cameras-panel.camera-collapsed {max-height: 68px !important}
 #warning-legend.mobile-expanded {overflow: auto; overscroll-behavior: contain}
 dialog[open] {max-height: calc(var(--visible-height, 100dvh) - 16px)}
 .history-wind-readout {grid-template-columns: minmax(0, 1fr); gap: 6px}
}
.history-wind-value strong {white-space: normal; overflow-wrap: anywhere}
@media (min-width: 701px) {
 body {--credit-right: 0px}
 body:is(.camera-panel-open,.meteo-drawer-open,:has(#drawing-container:not([hidden]))) {--credit-right: min(380px, calc(100vw - 100px))}
 #map .ol-attribution {
  left: auto;
  right: calc(var(--credit-right) + 232px);
  max-width: min(34%, 460px, calc(100% - var(--credit-right) - 244px));
 }
 #map .map-source-bar {right: calc(var(--credit-right) + 154px); max-width: calc(100% - var(--credit-right) - 166px)}
 #imgw-timeline {bottom: calc(var(--footer) + 56px)}
}
@media (max-width: 700px) {
 #cameras-panel:not([hidden]) {display: flex; flex-direction: column; overflow: hidden}
 #cameras-panel .editor-header {flex: none}
 #cameras-panel .camera-body {min-height: 0; overflow-y: auto}
 #warning-sheet-toggle {position: sticky; top: 0; z-index: 1; background: var(--surface, #fff)}
 .map-panel-open:not(.personal-map-open) #map .ol-zoom {bottom: var(--map-credit-row) !important}
 body.personal-map-open #map .ol-zoom {bottom: auto !important}
}
/* Dock the radar beside zoom when a weather or camera sheet is minimized. */
@media (max-width: 700px) {
 body:is(.synoptic-analysis,:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden]))) #imgw-timeline:not([hidden]) {
  visibility: visible;
  pointer-events: auto;
  left: auto;
  right: 68px;
  bottom: calc(var(--map-bottom) + var(--map-credit-row) + 24px);
  transform: none;
  width: min(300px, calc(100% - 80px));
  padding: 4px 6px;
 }
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline.is-collapsed {
  width: auto;bottom:calc(var(--map-bottom) + var(--map-credit-row) + 8px);
 }
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #map .ol-zoom {
  bottom: var(--map-credit-row) !important;
 }
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline .imgw-island-body {gap: 5px}
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline :is(#imgw-play,#imgw-refresh,#imgw-visibility) {
  width: 36px;
  height: 36px;
 }
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline #imgw-collapse {height: 36px}
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline .imgw-scan-track {min-width: 34px}
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-current-time {width: 38px; font-size: 12px}
}
@media (max-width: 700px) and (max-height: 500px) {
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline:not([hidden]) {
  right: 12px;
  width: min(300px, calc(100% - 24px));
 }
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline.is-collapsed {width: auto}
 body:has(#meteo-panel.meteo-collapsed:not([hidden]), #cameras-panel.camera-collapsed:not([hidden])) #map .ol-zoom {bottom: calc(var(--map-credit-row) + 64px) !important}
}
@media (max-width: 700px) and (max-height: 500px) {
 #map .ol-zoom {display: flex; right: 8px}
 #map .ol-zoom button {margin: 1px}
}

.drawing-drawer-tab[hidden] {display: none}
.drawing-drawer-tab {
 position: fixed;
 right: 0;
 top: calc(var(--header) + 337px);
 z-index: 1060;
 writing-mode: vertical-rl;
 padding: 12px 8px;
 border: 1px solid var(--line);
 border-right: 0;
 border-radius: 12px 0 0 12px;
 background: var(--surface, #fff);
 color: var(--ink);
 font: inherit;
 cursor: pointer;
}
body #drawing-container {
 position: fixed;
 inset: var(--header) 0 var(--footer) auto;
 z-index: 1190;
 padding: 14px;
 border: 1px solid var(--line);
 background: var(--surface, #fff);
 color: var(--ink);
 box-shadow: var(--shadow);
 width: min(380px, calc(100% - 88px));
 max-height: none;
 overflow: hidden;
 border-radius: 16px 0 0 16px;
}
#drawing-container[hidden] {display: none !important}
#drawing-container:not([hidden]) {display: flex; flex-direction: column}
#drawing-container .panel-header {flex: none; position: static}
.drawing-panel-body {
 min-height: 0;
 overflow-y: auto;
 overscroll-behavior: contain;
 scroll-padding-block: 12px;
}
@media (max-height: 650px), (max-width: 700px) {
 .drawing-drawer-tab {display: none}
}
@media (max-width: 700px) {
 body #drawing-container, body.panel-hidden #drawing-container {
  top: auto !important;
  right: 0;
  bottom: var(--bottom-dock) !important;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding-inline: 10px;
  max-width: none;
  max-height: min(58dvh, max(104px, calc(var(--visible-height, 100dvh) - var(--map-header-height, var(--header)) - var(--map-footer-height, var(--footer)) - var(--live-ticker-height, 0px) - 104px))) !important;
  border-radius: 16px 16px 0 0;
  z-index: 1125;
 }
}

@media (min-width: 701px) {
 body:has(#drawing-container:not([hidden])) #map .ol-zoom {right: calc(min(380px, 100vw - 88px) + 12px) !important}
}


/* Drawer's mobile handle stays available while the body is collapsed. */
#drawing-container .drawing-fold {display: grid; flex: none}
@media (min-width: 701px) {
 #drawing-container .panel-header h3 {flex: 1; min-width: 0}
}
@media (max-width: 700px) {
 #drawing-container .panel-header {justify-content: flex-start; padding-top: 10px; position: relative}
 #drawing-container .panel-header h3 {flex: 1; min-width: 0}
 #drawing-container .panel-header::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  width: 32px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 4px;
  background: var(--muted);
 }
 #drawing-container .drawing-fold {display: grid}
 #drawing-container.drawing-collapsed {padding-block: 5px}
 #drawing-container.drawing-collapsed .drawing-panel-body {display: none}
}

:is(#meteo-selected,#popup-content[data-meteo],.history-dialog) :is(h2,h3,h4,p,strong,small) {
 min-width: 0;
 overflow-wrap: anywhere;
}
.history-dialog .editor-header > h2 {flex: 1}
.history-dialog .editor-header > button {flex: none}
.history-reading-source {display: block; color: inherit !important}
.history-preview-summary strong,.history-dialog .history-readout strong {white-space: normal}
@media (max-width: 700px) {
 #meteo-selected .meteo-value-grid {grid-template-columns: minmax(0, 1fr)}
 .history-preview-summary {grid-template-columns: minmax(0, 1fr)}
 .history-dialog :is(.history-preview-summary,.history-wind-readout) {line-height: 1.45}
}

.meteo-plot-table {width:100%; border-collapse:collapse; table-layout:fixed; font-size:.8rem}
.meteo-plot-table th,.meteo-plot-table td {padding:5px 4px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; overflow-wrap:anywhere}
.meteo-plot-table th {width:36%; font-weight:600}
.meteo-plot-table th svg {width:1em;height:1em;vertical-align:-.15em;margin-inline-end:4px}
.meteo-plot-table td strong {display:inline-block;padding:0 4px;border-radius:4px;background:#fff}
.meteo-plot-table td small {display:block;margin-top:2px;color:var(--muted)}

/* The ticker is a row between the footer and the map/panels. */
body {
 --footer-edge: calc(var(--visible-bottom-inset, 0px) + var(--map-footer-height, var(--footer)));
 --bottom-dock: calc(var(--footer-edge) + var(--live-ticker-height, 0px));
}
body.has-live-ticker {--bottom-dock:calc(var(--footer-edge) + var(--live-ticker-height, 33px))}
body.has-live-ticker .statusbar {bottom:var(--visible-bottom-inset, 0px)}
body .live-ticker {bottom:var(--footer-edge)}
@media (min-width:701px) {
 body.has-live-ticker #map {bottom:var(--bottom-dock);height:auto}
 body.has-live-ticker :is(#meteo-panel,#cameras-panel,#drawing-container) {bottom:var(--bottom-dock)!important;height:auto}
 body.has-live-ticker #imgw-timeline {bottom:calc(var(--bottom-dock) + 56px)}
}
@media (max-width:700px) {
 body #personal-alert-map.expanded {bottom:calc(var(--bottom-dock) + 8px)}
 #drawing-container .drawing-panel-body {
  flex:1 1 auto;
  overflow-y:auto;
  touch-action:pan-y;
  overscroll-behavior-y:contain;
 }
 #drawing-container .panel-header {touch-action:none}
}
#meteo-param-buttons .meteo-temperature-modes {
 grid-auto-flow:row;
 grid-template-columns:repeat(2,minmax(0,1fr));
}
#meteo-param-buttons .meteo-temperature-modes button {
 word-break:normal;
 overflow-wrap:normal;
 white-space:normal;
}
#meteo-param-buttons .meteo-temperature-modes [data-meteo-mode="mean"] {grid-column:1/-1}
#meteo-param-controls button[data-login-required]::after {content:' 🔒'; font-size:.8em}

.map-drawer-tabs {display:none}
@media (min-width:701px) {
 .map-drawer-tabs:has(> button:not([hidden])) {
  position:fixed;
  z-index:1060;
  top:calc(var(--map-header-height,var(--header)) + 70px);
  right:0;
  bottom:calc(var(--bottom-dock) + 125px);
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  overflow:auto;
  scrollbar-width:thin;
  pointer-events:none;
 }
 .map-drawer-tabs :is(#meteo-drawer-tab,.camera-drawer-tab,.drawing-drawer-tab):not([hidden]) {
  position:static;
  display:flex;
  flex:none;
  pointer-events:auto;
 }
}

#drawing-container .drawing-disable {width:100%; margin:0 0 10px; min-height:44px}

#radar-tool-btn[aria-pressed=true] {
 background:linear-gradient(135deg,#ffd64c,#f5a119);color:#332509;border:1px solid #e7a32b;
}
#radar-map-legend {
 position:fixed;z-index:785;box-sizing:border-box;left:104px;bottom:calc(var(--bottom-dock) + 12px);
 width:min(284px,calc(100% - 24px));padding:8px 12px;border-radius:10px;
 border:1px solid var(--line);background:var(--surface,#fff);color:var(--ink);
 display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 10px;font-size:12px;
}
#radar-map-legend[hidden] {display:none}
#radar-source-details {grid-column:2;grid-row:1;position:static;justify-self:end}
#radar-source-details summary {cursor:pointer;text-decoration:underline}
#imgw-layer-credit {
 position:absolute;bottom:100%;left:0;right:auto;width:100%;
 box-sizing:border-box;margin:0 0 6px;padding:10px;border:1px solid var(--line);border-radius:10px;
 background:var(--surface,#fff);color:var(--ink);overflow-wrap:anywhere;
}
#radar-legend-scale {grid-column:1/-1;min-width:0}
#radar-legend-scale .imgw-colors {height:8px;margin:0}
#radar-legend-scale .imgw-scale {position:relative;height:1.1em;margin-top:2px;line-height:1.1}
#radar-legend-scale .imgw-scale span {position:absolute;transform:translateX(-50%);white-space:nowrap}
#radar-legend-scale .imgw-scale .first {transform:none}
#radar-legend-scale .imgw-scale .last {transform:translateX(-100%)}
#imgw-timeline:not(.is-collapsed) {
 padding:4px 8px;border-radius:18px;
}
#imgw-timeline .imgw-island-body {gap:6px}
#imgw-timeline #imgw-play {width:36px;height:36px;font-size:14px!important}
#imgw-timeline :is(#imgw-visibility,#imgw-refresh) {width:32px;height:32px}
#imgw-timeline #imgw-collapse {width:24px;height:36px}
#imgw-timeline .imgw-drawer-handles {display:grid;gap:2px;flex:none}
#imgw-timeline .imgw-drawer-toggle {
 width:25px;height:18px;border-radius:5px;background:var(--ui-soft,var(--pink));
 color:var(--ink);font-size:13px;line-height:1;
}
#imgw-timeline .imgw-drawer-toggle[aria-expanded=true] {background:#ffcf5f;color:#332509}
#imgw-timeline .imgw-drawer-toggle[aria-expanded=true] span {transform:rotate(180deg)}
#imgw-timeline .imgw-drawer-edge {position:absolute;left:8px;right:8px;pointer-events:none}
#imgw-drawer-top {bottom:100%}
#imgw-drawer-bottom {top:100%}
#imgw-timeline.is-collapsed .imgw-drawer-edge {display:none}
#imgw-timeline .imgw-drawer {
 display:grid;grid-template-rows:0fr;visibility:hidden;
 transition:grid-template-rows 170ms ease,visibility 0s linear 170ms;
}
#imgw-timeline .imgw-drawer.is-open {
 grid-template-rows:1fr;visibility:inherit;transition-delay:0s;
}
.imgw-drawer-content {
 min-height:0;overflow:hidden;background:var(--surface,#fff);color:var(--ink);
 font-size:11px;box-shadow:inset 0 0 0 1px var(--line);
}
#imgw-timeline .imgw-drawer.is-open .imgw-drawer-content {pointer-events:auto}
#imgw-products .imgw-drawer-content {border-radius:10px 10px 0 0}
#imgw-opacity-panel .imgw-drawer-content {border-radius:0 0 10px 10px}
#imgw-products .imgw-product-buttons {margin:6px 7px 0}
#imgw-products p {margin:3px 8px;line-height:1.25}
#imgw-opacity-panel .radar-opacity {margin:5px 8px 0}
#imgw-opacity-panel input {display:block;width:calc(100% - 16px);height:22px;margin:0 8px 3px;accent-color:#d99018}
.imgw-product-buttons {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
#imgw-timeline [data-imgw-product] {
 width:100%;min-width:0;height:28px;border-radius:6px;font-size:11px;
 background:var(--ui-soft,var(--pink));color:var(--ink);
}
#imgw-timeline [data-imgw-product][aria-pressed=true] {background:#ffcf5f;color:#332509}
@media (min-width:701px){
 #imgw-timeline:not(.is-collapsed),
 body.has-live-ticker #imgw-timeline:not(.is-collapsed) {
  bottom:calc(var(--bottom-dock) + 54px);
 }
 #imgw-timeline:not(.is-collapsed):has(#imgw-opacity-panel.is-open),
 body.has-live-ticker #imgw-timeline:not(.is-collapsed):has(#imgw-opacity-panel.is-open) {
  bottom:calc(var(--bottom-dock) + 102px);
 }
 #radar-map-legend {z-index:775}
 body:not(.panel-hidden) #radar-map-legend {visibility:hidden}
}
@media (min-width:701px) and (max-width:1050px){
 #radar-map-legend {width:min(260px,calc(100vw - 130px))}
}
@media (max-width:700px){
 #radar-map-legend {inset-block-start:var(--map-header-height,var(--header));bottom:auto;left:0;
  width:100%;border-radius:0;padding:4px 8px;grid-template-columns:auto minmax(0,1fr) auto;font-size:11px}
 #radar-legend-scale {grid-column:2;grid-row:1}
 #radar-source-details {grid-column:3}
 #imgw-layer-credit {bottom:auto;top:100%;margin:6px 0 0}
 body.radar-legend-visible .rail {top:calc(var(--map-header-height,var(--header)) + 38px)}
 body.radar-legend-visible:not(.panel-hidden) #radar-map-legend {visibility:hidden}
 #imgw-timeline:not(.is-collapsed),
 body:has(#meteo-panel.meteo-collapsed:not([hidden]),#cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline:not([hidden]):not(.is-collapsed) {
  bottom:calc(var(--map-bottom) + var(--map-credit-row) + 43px);
 }
 #imgw-timeline .imgw-drawer-toggle {width:28px;height:21px}
}
@media(max-width:700px) and (max-height:500px){
 #imgw-drawer-bottom {bottom:100%;top:auto}
 #imgw-opacity-panel .imgw-drawer-content {border-radius:10px 10px 0 0}
}
@media(prefers-reduced-motion:reduce){
 #imgw-timeline .imgw-drawer {transition:none}
}

/* Compact radar controls, with reserved room for zoom and the credits row. */
@media (max-width:700px) {
 #radar-map-legend {
  grid-template-columns:max-content minmax(0,1fr) max-content;
  gap:4px;padding:3px 6px;font-size:10px;line-height:1.1;
 }
 #radar-map-legend #radar-source-details,
 #radar-map-legend #radar-source-details summary {
  font-size:10px;line-height:1.1;font-weight:600;white-space:nowrap;
  padding:0;margin:0;min-height:0;
 }
 #radar-map-legend #imgw-layer-credit {
  left:auto;right:0;width:min(285px,calc(100vw - 12px));font-size:12px;line-height:1.4;
 }
 #radar-legend-scale .imgw-colors {height:6px}
 #radar-legend-scale .imgw-scale {font-size:9px;height:10px;line-height:10px;margin-top:1px}
 body.radar-legend-visible .rail {top:calc(var(--map-header-height,var(--header)) + 36px)}
 #imgw-timeline:not(.is-collapsed),
 body:has(#meteo-panel.meteo-collapsed:not([hidden]),#cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline:not([hidden]):not(.is-collapsed) {
  left:8px;right:60px;transform:none;width:auto;padding:4px 6px;
 }
 #imgw-timeline .imgw-island-body,
 body:has(#meteo-panel.meteo-collapsed:not([hidden]),#cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline .imgw-island-body {gap:3px}
 #imgw-timeline .imgw-drawer-edge {left:0;right:0}
 #imgw-timeline .imgw-product-buttons {grid-template-columns:repeat(2,minmax(0,1fr))}
 #imgw-timeline .imgw-drawer-toggle {width:28px;height:21px}
 #imgw-timeline #imgw-play,
 body:has(#meteo-panel.meteo-collapsed:not([hidden]),#cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline #imgw-play {width:32px;height:32px}
 #imgw-timeline :is(#imgw-visibility,#imgw-refresh),
 body:has(#meteo-panel.meteo-collapsed:not([hidden]),#cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline :is(#imgw-visibility,#imgw-refresh) {width:30px;height:32px}
 #imgw-timeline #imgw-collapse {width:22px;height:34px}
 #imgw-current-time {width:38px;font-size:12px}
 #imgw-timeline .imgw-scan-track {min-width:45px}
}
@media (max-width:700px) and (max-height:500px) {
 #imgw-timeline:not(.is-collapsed),
 body:has(#meteo-panel.meteo-collapsed:not([hidden]),#cameras-panel.camera-collapsed:not([hidden])) #imgw-timeline:not([hidden]):not(.is-collapsed) {
  right:8px;bottom:calc(var(--map-bottom) + var(--map-credit-row) + 70px);
 }
 #imgw-products .imgw-drawer-content {max-height:30dvh;overflow-y:auto}
}

/* Radar capsule and its attached controls. */
#imgw-timeline:not(.is-collapsed) {
 border:1px solid var(--ui-border,var(--line));
 background:var(--surface,#fff);
 box-shadow:0 8px 24px rgba(4,12,22,.24),0 2px 6px rgba(4,12,22,.14);
}
#imgw-timeline .imgw-drawer-toggle {
 position:relative;border:1px solid var(--ui-border,var(--line));
 background:var(--ui-soft,var(--pink));box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
 transition:background 150ms ease,box-shadow 150ms ease,transform 150ms ease;
}
#imgw-timeline .imgw-drawer-toggle span {
 display:block;width:7px;height:7px;border-top:2px solid currentColor;
 border-left:2px solid currentColor;transform:translateY(2px) rotate(45deg);
 font-size:0;transition:transform 150ms ease;
}
#imgw-timeline #imgw-opacity-toggle span {transform:translateY(-2px) rotate(225deg)}
#imgw-timeline #imgw-products-toggle[aria-expanded=true] span {transform:translateY(-2px) rotate(225deg)}
#imgw-timeline #imgw-opacity-toggle[aria-expanded=true] span {transform:translateY(2px) rotate(45deg)}
#imgw-timeline .imgw-drawer-toggle:focus-visible {outline:2px solid var(--ui-focus,#e49b20);outline-offset:2px}
#imgw-timeline .imgw-drawer-content {
 box-shadow:inset 0 0 0 1px var(--line),0 5px 16px rgba(4,12,22,.16);
}
#imgw-drawer-bottom {right:auto;width:min(255px,100%)}
#imgw-timeline #imgw-time::-webkit-slider-thumb {
 box-shadow:0 1px 4px rgba(0,0,0,.38),0 0 0 1px rgba(130,78,0,.4);
}
@media (min-width:1100px) {
 body.radar-island-visible #map .map-source-bar {
  max-width:min(420px,calc((100vw - min(520px,100vw - 24px))/2 - var(--credit-right) - 164px));
 }
 body.radar-island-visible #imgw-timeline:not(.is-collapsed) {
  bottom:calc(var(--bottom-dock) + 12px);
 }
 body.radar-island-visible #imgw-timeline:not(.is-collapsed):has(#imgw-opacity-panel.is-open) {
  bottom:calc(var(--bottom-dock) + 86px);
 }
 /* A right panel can consume the entire credit column beside the radar.
    Keep credits left of the capsule and below the legends in that case. */
 body.radar-island-visible:is(.camera-panel-open,.meteo-drawer-open,:has(#drawing-container:not([hidden]))) #map .map-source-bar {
  right:calc((100vw + min(520px,100vw - 24px))/2 + 12px);
  max-width:min(420px,calc((100vw - min(520px,100vw - 24px))/2 - 100px));
 }
 body.radar-island-visible:is(.camera-panel-open,.meteo-drawer-open,:has(#drawing-container:not([hidden]))) #radar-map-legend {
  bottom:calc(var(--bottom-dock) + var(--measured-map-credit-row,54px) + 12px);
 }
}
/* Wrapped credits need their measured row on tablets as well as phones. */
@media (min-width:701px) and (max-width:1099px) {
 #radar-map-legend {bottom:calc(var(--bottom-dock) + var(--measured-map-credit-row,54px) + 12px)}
 body.radar-island-visible #imgw-timeline:not(.is-collapsed) {
  bottom:calc(var(--bottom-dock) + var(--measured-map-credit-row,54px) + 68px);
 }
 body.radar-island-visible #imgw-timeline:not(.is-collapsed):has(#imgw-opacity-panel.is-open) {
  bottom:calc(var(--bottom-dock) + var(--measured-map-credit-row,54px) + 116px);
 }
}
@media (max-width:700px) {
 #radar-map-legend #imgw-layer-credit {
  white-space:normal;overflow-wrap:anywhere;word-break:normal;
  max-height:min(40dvh,240px);overflow:auto;overscroll-behavior:contain;
  font-weight:400;
 }
 body.radar-island-visible:not(.radar-island-collapsed) #map .ol-zoom {
  bottom:var(--radar-aligned-zoom-bottom,var(--map-credit-row))!important;
 }
}
@media (prefers-reduced-motion:reduce) {
 #imgw-timeline .imgw-drawer-toggle,#imgw-timeline .imgw-drawer-toggle span {transition:none}
}
