/* Layout V2.2: embedded Cloud Deck + single-cycle scan swipe.
   Layout overlay only. The Cloud Deck weather engine and the main data engine
   are intentionally not modified by this design branch. */
html.layout-v2 .v2-clouds-view {
  min-width:0;
  width:100%;
  margin-top:0;
  margin-bottom:32px;
}
html.layout-v2 #cloudsView #cloudDeckDialog {
  position:relative!important;
  inset:auto!important;
  display:none;
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  z-index:auto!important;
  border:1px solid rgba(151,234,211,.18)!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,rgba(15,41,47,.95),rgba(3,16,22,.98))!important;
  box-shadow:0 22px 70px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04)!important;
  color:#edfff8;
}
html.layout-v2 #cloudsView #cloudDeckDialog[open] {display:block!important;}
html.layout-v2 #cloudsView #cloudDeckDialog::backdrop {display:none!important;background:none!important;backdrop-filter:none!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-shell {
  display:block!important;
  overflow:visible!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  padding:27px 28px 25px!important;
  background:transparent!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header {
  padding-bottom:22px!important;
  align-items:center!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading h2 {
  font-size:clamp(32px,3vw,45px)!important;
  letter-spacing:.02em;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status {gap:10px!important;}
html.layout-v2 #cloudsView #cloudDeckDialog #cloudDeckClose {display:none!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .v2-clouds-back {
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:46px!important;
  padding:9px 15px!important;
  border:1px solid rgba(128,202,232,.27)!important;
  border-radius:10px!important;
  background:linear-gradient(150deg,rgba(28,73,83,.8),rgba(6,29,34,.95))!important;
  color:#d9f3f5;
  font:700 13px/1.2 var(--display)!important;
  letter-spacing:.025em;
  cursor:pointer;
}
html.layout-v2 #cloudsView #cloudDeckDialog .v2-clouds-back:hover {border-color:rgba(142,229,245,.55)!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-controls {
  padding:20px 0!important;
  gap:15px!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs {max-width:760px!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs button {min-height:53px;border-radius:10px;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-main {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(270px,310px)!important;
  gap:20px!important;
  padding:22px 0!important;
  align-items:start!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-wrap {
  width:100%!important;
  height:760px!important;
  min-height:760px!important;
  max-height:none!important;
  border-radius:16px!important;
  border:1px solid rgba(140,223,202,.21)!important;
  background:#07171e;
  box-shadow:0 10px 38px rgba(0,0,0,.20),inset 0 1px rgba(255,255,255,.05);
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline {gap:8px!important;padding:14px!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline span {font-size:11px;min-height:36px;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-overlay-toggle {border-radius:8px;min-height:40px!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-legend {padding:17px 14px!important;}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-side {
  grid-template-columns:minmax(0,1fr)!important;
  align-content:start!important;
  gap:14px!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-side-card {
  padding:18px!important;
  border-radius:13px!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-timeline-shell {
  margin-top:2px!important;
  padding:22px 0 0!important;
  border-top:1px solid rgba(150,231,211,.16)!important;
  background:transparent!important;
}
html.layout-v2 #cloudsView .v2-dialog-nav {display:none!important;}
/* Keep the visual refresh cue lightweight, non-blocking and data-neutral.
   It triggers only when the genuine scan label becomes SCAN. */
html.layout-v2 .v2-global-scan-sweep {
  position:fixed;
  inset:0;
  z-index:105;
  pointer-events:none;
  visibility:hidden;
  overflow:hidden;
}
html.layout-v2 .v2-global-scan-sweep:after {
  content:"";
  position:absolute;
  inset:-8% 0;
  pointer-events:none;
  background:linear-gradient(94deg,
    transparent 8%,
    rgba(109,247,213,.013) 29%,
    rgba(125,255,213,.055) 42%,
    rgba(188,255,239,.17) 49%,
    rgba(109,247,213,.055) 55%,
    transparent 70%);
  transform:translateX(-120%);
}
html.layout-v2.v2-scan-sweeping .v2-global-scan-sweep {visibility:visible;}
html.layout-v2.v2-scan-sweeping .v2-global-scan-sweep:after {
  animation:v2-scanswipe .92s cubic-bezier(.2,.7,.22,1) both;
}
@keyframes v2-scanswipe {
  from {transform:translateX(-120%);opacity:.5;}
  22% {opacity:1;}
  to {transform:translateX(120%);opacity:0;}
}
@media(min-width:1650px){
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-wrap {
    height:840px!important;
    min-height:840px!important;
  }
}
@media(max-width:1050px){
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-main {
    grid-template-columns:minmax(0,1fr)!important;
    gap:16px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-wrap {
    height:730px!important;
    min-height:730px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-side {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:760px){
  html.layout-v2 #cloudsView #cloudDeckDialog {
    border-radius:15px!important;
    margin-bottom:22px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-shell {
    padding:17px 14px 22px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header {
    flex-wrap:wrap!important;
    gap:10px!important;
    padding-bottom:17px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading {flex-basis:100%!important;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-heading h2 {font-size:34px!important;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status {
    flex-direction:row!important;
    margin:0!important;
    margin-left:auto!important;
    width:100%!important;
    align-items:center!important;
    justify-content:space-between!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-header-status>span {display:block!important;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-controls {
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
    padding:14px 0!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs {
    width:100%!important;
    flex:0 1 auto!important;
    max-width:none!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-model-control {width:100%!important;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-refresh-button {width:100%!important;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-main {
    grid-template-columns:minmax(0,1fr)!important;
    gap:15px!important;
    padding:17px 0!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-wrap {
    height:max(570px,69dvh)!important;
    min-height:570px!important;
    max-height:none!important;
    border-radius:13px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline {
    padding:10px!important;
    gap:5px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline span {font-size:10px;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-side {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-timeline-shell {
    padding-top:18px!important;
  }
}
@media(max-width:350px){
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-deck-shell {
    padding-left:9px!important;
    padding-right:9px!important;
  }
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-topline span {font-size:9px;}
  html.layout-v2 #cloudsView #cloudDeckDialog .cloud-layer-tabs button {font-size:12px!important;}
}
@media(prefers-reduced-motion:reduce){
  html.layout-v2 .v2-global-scan-sweep {display:none!important;}
  html.layout-v2.v2-scan-sweeping .v2-global-scan-sweep:after {animation:none!important;}
}

/* Browser QA regression: when the map is loading or offline, its visual
   loading veil must never block the fixed PWA nav or ordinary page controls. */
html.layout-v2 .nav-status-row {
  position:relative!important;
  z-index:10!important;
}
html.layout-v2 #cloudsView {
  position:relative!important;
  z-index:0!important;
  isolation:isolate!important;
}
html.layout-v2 #cloudsView #cloudDeckDialog .cloud-map-loading {
  pointer-events:none!important;
}
@media(max-width:760px) {
  html.layout-v2 #pwaBottomNav.pwa-bottom-nav {
    position:fixed!important;
    z-index:500!important;
    pointer-events:auto!important;
  }
  html.layout-v2 #pwaBottomNav .pwa-nav-button {
    pointer-events:auto!important;
  }
}
