/* Weather in the route generator (route-weather-generator.js): mock-up EquipoDispositivos/generador-tiempo. Tokens with dark variant; 44 px targets. */
:root{--pw-route-wind:#7b8ea8;--pw-dry:#e3e8ee;--pw-on-chip:#ffffff;--pw-outline:#07172e}
:root[data-theme="dark"]{--pw-route-wind:#8fa3bf;--pw-dry:#1b3354;--pw-on-chip:#07172e;--pw-outline:#ffffff}
.pw-block{display:grid;gap:10px;min-width:0}
.pw-open{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-height:44px;justify-self:start}
.pw-open svg,.pw-chip svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.pw-host:empty{display:none}
.pw{min-width:0;container-type:inline-size}
.pw-grid{display:grid;gap:14px;grid-template-columns:minmax(0,1fr);grid-template-areas:"side" "map" "strip" "source"}
.pw-side{grid-area:side;display:grid;gap:12px;align-content:start;min-width:0}
.pw-mapbox{grid-area:map;display:grid;gap:6px;min-width:0}
.pw-stripbox{grid-area:strip;min-width:0}
.pw-source{grid-area:source;min-width:0}
@container (min-width:900px){.pw-grid{grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"map side" "strip strip" "source source"}}
.pw-departure{display:grid;gap:8px;margin:0;padding:0;border:0;min-width:0}
.pw-departure legend{padding:0;margin-bottom:6px;font-weight:700}
.pw-day{width:100%;min-height:44px}
.pw-hour-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px}
.pw-step{width:auto;min-width:44px;min-height:44px;padding:0 10px;font-variant-numeric:tabular-nums}
.pw-ends{display:flex;justify-content:space-between;margin:-8px 56px 0;font-variant-numeric:tabular-nums}
.pw-when{margin:0;font-weight:700;font-size:16px;line-height:1.35;font-variant-numeric:tabular-nums}
.pw-horizon{margin:0}
.pw-see{display:grid;gap:6px}
.pw-label-text{font-weight:700}
.pw-chips{display:flex;flex-wrap:wrap;gap:8px}
.pw-chip{display:inline-flex;align-items:center;gap:6px;width:auto;min-height:44px;padding:8px 14px;border-radius:999px}
.pw-chip[aria-pressed="true"]{background:var(--accent);color:var(--on-accent);border-color:var(--accent);font-weight:700}
.pw-summary{margin:0;padding:10px 12px;border-radius:12px;background:var(--raised);border:1px solid var(--sep);font-size:15px;line-height:1.4}
.pw-map{height:min(60vh,520px);min-height:300px}
@container (min-width:600px){.pw-side{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}.pw-departure{grid-row:span 3}}
.pw-legend .pw-scale{display:inline-block;width:72px;height:8px;border-radius:4px;margin:0 6px;vertical-align:middle}
.pw-strip-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 8px;margin-bottom:6px}
.pw-strip{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:2px 2px 8px;scrollbar-width:thin}
.pw-stretch{flex:0 0 auto;width:calc((100% - 66px)/12);min-width:66px;min-height:84px;padding:6px 4px;border-radius:10px;display:grid;gap:2px;justify-items:center;align-content:space-between;
  scroll-snap-align:start;font-size:12px;white-space:nowrap;background:var(--raised);border:2px solid transparent;color:var(--text);font-variant-numeric:tabular-nums}
.pw-stretch[aria-pressed="true"]{border-color:var(--text)}
.pw-strip.has-selection .pw-stretch[aria-pressed="false"]{opacity:.45}
.pw-value{display:block;width:100%;border-radius:6px;padding:4px 0;font-weight:700;font-size:14px;color:var(--pw-on-chip)}
.pw-value svg{width:14px;height:14px;vertical-align:-2px;fill:currentColor}
.pw-value.is-cara{background:var(--rwm-cara)}.pw-value.is-lateral{background:var(--rwm-lateral)}.pw-value.is-cola{background:var(--rwm-cola)}
.pw-value.is-rain{background:var(--rwm-rain)}.pw-value.is-dry,.pw-value.is-none{background:var(--pw-dry);color:var(--text)}.pw-value.is-temp{color:#07172e;background:var(--pw-dry)}
.pw-source .rwm-source{display:flex;align-items:center;gap:4px}
.pw-info-button{width:44px;height:44px;min-height:44px;background-clip:content-box;padding:8px;font-size:15px}
.pw-info{margin-top:4px;padding:10px 12px;border-radius:12px;background:var(--raised);border:1px solid var(--sep);font-size:14px}
.pw-info p{margin:0 0 6px}.pw-info p:last-child{margin:0}.pw-info a{color:inherit}
path.pw-outline{stroke:var(--pw-outline)}
path.pw-hit{cursor:pointer}
.leaflet-marker-icon.pw-label{display:grid !important;place-items:center;pointer-events:none}
.leaflet-marker-icon.pw-label span{display:inline-block;padding:2px 6px;border-radius:8px;background:var(--card);border:1px solid var(--sep);color:var(--text);font:600 12px/1.3 system-ui,sans-serif;white-space:nowrap;font-variant-numeric:tabular-nums}
.leaflet-marker-icon.pw-label.is-rain span{color:var(--rwm-rain)}
.pw-map.leaflet-touch .leaflet-bar.leaflet-control-zoom a{width:44px;height:44px;line-height:44px;font-size:22px}
/* Several switches on at once (CEO, 18 nov): one value per switch in each stretch; the clothing fold under the summary. */
.pw-stretch .pw-value + .pw-value{margin-top:2px}
.pw-legend[hidden]{display:none}
.pw-clothes{margin-top:8px}
.pw-clothes summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-weight:600}
/* Phone (CEO, 18 nov): the map first and big (about 60 % of the screen upright, nearly all of it lying down), the controls
   in a sheet under it that stays at the bottom while scrolling, and full screen and back. Leaflet's panes stay inside the map. */
.pw-map-wrap{position:relative;isolation:isolate;min-width:0}
.pw-full-toggle{position:absolute;right:10px;bottom:28px;z-index:1000;min-height:44px;width:auto;padding:0 14px;border-radius:22px;
  background:var(--card);color:var(--text);border:1px solid var(--sep);box-shadow:0 2px 8px rgba(0,0,0,.25);font-weight:600}
.pw-sheet-toggle{display:none}
@container (max-width:899px){
  .pw-grid{grid-template-areas:"map" "side" "strip" "source";gap:10px}
}
@container (max-width:599px){
  /* Edge to edge on a phone: the map is not squeezed by the cards around it. */
  .pw-mapbox{margin-inline:calc(50% - 50vw)}
  .pw-mapbox > :not(.pw-map-wrap){padding-inline:16px}
  .pw-map{height:max(300px,58svh);border-radius:0;border-inline:0}
  .pw-sheet-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;padding:0;
    background:none;border:0;color:var(--text);font-weight:700;text-align:left;position:relative}
  .pw-sheet-more::after{content:"Más";font-weight:600;color:var(--accent)}
  .pw-sheet-toggle[aria-expanded="true"] .pw-sheet-more::after{content:"Menos"}
  .pw-side[data-sheet="min"] > :is(.pw-summary,.rwm-alerts,.rwm-best,.pw-clothes),
  .pw-side[data-sheet="min"] :is(.pw-horizon,.pw-ends,.pw-when,.pw-departure > legend,.pw-label-text){display:none}
  .pw-side[data-sheet="min"] :is(.pw-departure,.pw-see){gap:6px}
  .pw-side[data-sheet="min"] .pw-chips{flex-wrap:nowrap;overflow-x:auto}
  .pw-side[data-sheet="min"] .pw-chip{flex:0 0 auto;padding:0 12px}
  @media (orientation:portrait){
    /* The sheet stays at the bottom of the screen, above the tab bar, under the map; never on top of the route. */
    .pw-side{position:sticky;bottom:0;z-index:2;padding:4px 16px 12px;border-radius:16px 16px 0 0;margin-inline:calc(50% - 50vw);
      background:var(--card);border:1px solid var(--sep);border-bottom:0;box-shadow:0 -6px 18px rgba(0,0,0,.22);max-height:60svh;overflow:auto}
    body.has-navigation .pw-side{bottom:calc(76px + env(safe-area-inset-bottom))}
    .pw-sheet-toggle::before{content:"";position:absolute;left:50%;top:2px;width:40px;height:4px;margin-left:-20px;border-radius:2px;background:var(--sep)}
  }
}
@media (orientation:landscape) and (max-height:520px){
  .pw-map{height:calc(100svh - 96px - env(safe-area-inset-bottom));min-height:240px}
}
.pw-mapbox.pw-full{position:fixed;inset:0;z-index:2000;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:var(--bg);display:flex;flex-direction:column;gap:6px}
.pw-mapbox.pw-full .pw-map-wrap{flex:1;min-height:0}
.pw-mapbox.pw-full .pw-map{height:100%;min-height:0;border-radius:0}
.pw-mapbox.pw-full .pw-full-toggle{top:calc(10px + env(safe-area-inset-top));bottom:auto}
.pw-mapbox.pw-full > :not(.pw-map-wrap){padding:0 12px}
.pw-mapbox.pw-full > .muted{display:none}
.pw-mapbox.pw-full{margin-inline:0}
html.pw-locked,html.pw-locked body{overflow:hidden}
/* The marker look: trembling edges and a lighter, offset second pass; off while the map moves (slow phones). */
.leaflet-overlay-pane path.so-marker{filter:url(#so-marker)}
.leaflet-overlay-pane path.so-marker-echo{filter:url(#so-marker);transform:translate(2.4px,1.8px)}
.leaflet-zoom-anim .leaflet-overlay-pane path:is(.so-marker,.so-marker-echo),.leaflet-dragging .leaflet-overlay-pane path:is(.so-marker,.so-marker-echo){filter:none}
/* «Generar propuestas»: room above and a clear main action (CEO, 18 nov). */
.route-create form .route-generate{margin-top:16px;min-height:48px}
@media (max-width:700px){.route-create form .route-generate{width:100%}}
/* A proposal inside «Crear una ruta» is one card only on a phone (Calidad, 18 nov): its own border and padding go,
   so the map and the figures get those ~60 px back. */
@media (max-width:600px){
  .route-create .route-proposal{border:0;border-top:1px solid var(--sep);border-radius:0;background:transparent;box-shadow:none;padding-inline:0;margin-inline:0}
}
