/* MAIN SLIDES DISPLAY CONTROL */
#stationid { display: none; }
#alerts { display: none; }
#current { display: none; }
#radar { display: none; }
#forecast-intraday { display: none; }
#forecast-shortterm { display: none; }
#forecast-extended { display: none; }
#\37 day-graph { display: none; }
#airquality { display: none; }

/* MAIN PRESENTATION UPNEXT BAR
   One row: slide title + progress on the left, location carousel in the middle, and the radar time/legend
   bubble at the right end while the radar slide is up. */
.main-presentation-upnext {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  height: 60px;
  flex-shrink: 0;
  gap: 12px;
  margin-bottom: 0.6%;
  box-sizing: border-box;
}

.slide-info-group {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  order: 0;
  width: 30%;
  height: 60px;
  flex-shrink: 0;
  padding: 0 20px;
  box-sizing: border-box;
  overflow: hidden;
  backdrop-filter: blur(64px) saturate(185%);
  -webkit-backdrop-filter: blur(64px) saturate(185%);
  background-image: var(--glass-surface-soft);
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-highlight);
}

.slide-info-icon {
  flex-shrink: 0;
  object-fit: contain;
}

.slide-info-name {
  flex: 1 1 auto;
  font-size: var(--text-md);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.slide-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.slide-progress-bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.upnext-locations-group {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 54px;
  gap: 8px;
  overflow: hidden;
  padding-left: 54px;
  box-sizing: border-box;
}

.current-location-group {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  height: 100%;
  padding: 0 12px;
  box-sizing: border-box;
  backdrop-filter: blur(64px) saturate(185%);
  -webkit-backdrop-filter: blur(64px) saturate(185%);
  background-image: var(--glass-surface-soft);
  border: var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--glass-highlight);
}

.main-upnext-carousel-current {
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
  max-width: min(52%, 720px);
  justify-content: flex-start;
  border-radius: 8px;
}

.current-location-icon {
  position: absolute;
  left: -48px;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  background-image: url(/graphics/ux/map-pinned.svg);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.current-location-name {
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.main-upnext-carousel-viewport {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 72px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 72px), transparent 100%);
}

.main-upnext-carousel-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
  width: max-content;
  min-width: 0;
  gap: 6px;
  flex: 0 0 auto;
  will-change: transform;
}

.main-upnext-carousel-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 440px;
  height: 100%;
  padding: 0 12px;
  box-sizing: border-box;
  backdrop-filter: blur(64px) saturate(185%);
  -webkit-backdrop-filter: blur(64px) saturate(185%);
  background-image: var(--glass-surface-soft);
  border: var(--glass-border);
  border-radius: 8px;
  color: var(--text-soft);
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  box-shadow: var(--glass-highlight);
}

.upnext-list {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.5rem;
}

.upnext-location-entry {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 16px;
  box-sizing: border-box;
  backdrop-filter: blur(64px) saturate(185%);
  -webkit-backdrop-filter: blur(64px) saturate(185%);
  background-image: var(--glass-surface-soft);
  border: var(--glass-border);
  border-radius: var(--radius);
}

.upnext-location-name {
  font-size: var(--text-md);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.7;
}


/* MAIN PRESENTATION */
.main-slides {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  display: none;
  justify-content: center;
  justify-self: center;
  align-items: center;
  margin: 0 auto;
}

.main-slide {
  position: relative;
  margin: auto auto;
  width: 100%;
  height: 100%;
}

.main-slide-panel {
  backdrop-filter: var(--blur-slide);
  -webkit-backdrop-filter: var(--blur-slide);
  position: relative;
  z-index: 0;
  border-radius: var(--radius);
}

.main-slide-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: var(--radius, 8px);
  background-image: var(--gradient-slide);
  background-size: 100% 100%;
  backdrop-filter: blur(112px) saturate(190%);
  -webkit-backdrop-filter: blur(112px) saturate(190%);
  border: var(--border-subtle, 1px solid rgba(255, 255, 255, 0.1));
  box-shadow: var(--glass-shadow);
}

/* STATION ID */
.main-info-container {
  position: relative;
  width: 100%;
  height: 85%;
  margin: 0 auto;
  margin-top: 3%;
}

.main-info-channelLogo {
  position: absolute;
  top: 20%;
  left: 10%;
  height: 10%;
}

.main-info-operatorLogos {
  position: absolute;
  width: 34%;
  height: 35%;
  left: 3%;
}

.main-info-links {
  position: absolute;
  bottom: -1%;
  left: 3%;
  height: 30%;
  line-height: 1.2;
  font-size: 44.8pt;
}

.main-info-hds1info {
  position: absolute;
  right: 9%;
  bottom: 9%;
  width: 24%;
  height: 16%;
  text-align: right;
}

.hdsLogo {
  height: 50%;
}

.versionID {
  bottom: -55%;
  right: -28%;
  position: absolute;
}

.main-info-netlogo-container {
  position: absolute;
  top: 39%;
  left: 3%;
  width: 37%;
  height: 11%;
  background: url(/images/meteoch.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.main-info-sspwxrlogo-container {
  position: absolute;
  top: 12%;
  right: -16.5%;
  width: 100%;
  height: 35%;
  background: url(/images/sspwxr.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* CURRENT CONDITIONS */
.main-current-slide-container {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: space-between;
}

.main-current-leftcontainer {
  display: block;
  background-image:
    linear-gradient(180deg, rgba(2, 8, 18, 0.28), rgba(2, 8, 18, 0.68)),
    var(--current-weather-bg, none),
    var(--gradient-base);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  width: 30%;
  height: 100%;
  border: var(--border-distinct);
  border-radius: var(--radius);
  text-shadow: 1px 1px 5px rgb(0, 0, 0);
}

#main-current-box-filter {
  border-radius: var(--radius);
  width: 100%;
  height: 100%;
}

.main-current-rightcontainer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 64%;
  height: 100%;
  padding: 2%;
  line-height: 1.6;
  font-weight: 600;
  font-size: var(--text-lg);
}

#main-current-condition {
  padding-top: 20%;
  text-align: center;
  width: 100%;
  font-weight: 500;
  font-size: var(--text-md);
}

#main-current-icon {
  display: block;
  width: 100%;
  height: 30%;
  margin-left: auto;
  margin-right: auto;
  backdrop-filter: blur(72px) saturate(185%);
  -webkit-backdrop-filter: blur(72px) saturate(185%);
  border-radius: var(--radius);
  border: var(--border-subtle)
}

#main-current-temp {
  text-align: center;
  width: 100%;
  font-size: var(--text-3xl);
  font-weight: 300;
}

#main-current-temp .small-degrees {
  font-size: var(--text-md);
}

.main-slide .small-degrees {
  vertical-align: top;
  position: relative;
  top: 0.48em;
}

.main-current-conditions-slotone {
  display: flex;
  justify-content: space-around;
  width: 100%;
  height: 40%;
}

.main-current-condtions-box {
  width: 30%;
  height: 100%;
  text-align: center;
  white-space: nowrap;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  font-size: var(--text-sm);
  background-image: var(--glass-surface-soft);
  background-size: 100% 100%;
  backdrop-filter: blur(72px) saturate(185%);
  -webkit-backdrop-filter: blur(72px) saturate(185%);
  border: var(--glass-border);
  box-shadow: 
    0 16px 36px -10px rgba(0, 0, 0, 0.58),
    var(--glass-highlight);
  mask-image: radial-gradient(circle at center, black 60%, rgba(0,0,0,0.85) 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 60%, rgba(0,0,0,0.85) 100%);
}

.main-current-icon-container {
  width: 100%;
  height: 30%;
}

#main-current-windicon {
  height: 100%;
}

#main-current-feelslikeicon {
  height: 100%;
}

.main-current-boxlabel {
  font-weight: 200;
}

#main-current-windvalue {
  font-weight: 200;
}

#main-current-windvalue-gust {
  font-size: var(--text-xs);
  font-weight: lighter;
}

#main-current-feelslikevalue {
  font-weight: 300;
  font-size: var(--text-xl);
}

.main-current-sunicon {
  height: var(--text-xl);
}

.main-current-sunrisesunset-container {
  display: flex;
  margin: auto auto;
  justify-content: space-between;
  width: 65%;
  font-size: var(--text-sm);
}

.main-current-conditions-slottwo {
  overflow: hidden;
  height: 55%;
}

.main-current-extraproducts {
  display: flex;
  justify-content: space-between;
  font-weight: 300;
  overflow: hidden;
}

.main-current-module1 {
  display: none;
}

.main-current-module2 {
  display: none;
}

/* PRECIPITATION */
.main-precip-slide-container {
  width: 100%;
  height: 100%;
}

.main-precip-eventtype-container {
  word-wrap: break-word;
  width: 100%;
  height: 35%;
  display: flex;
  justify-content: center;
}

.main-precip-narrative {
  width: 80%;
  padding-top: 2%;
}

.main-precip-map-container {
  height: 63%;
  width: 100%;
  margin-top: 2%;
  outline: auto;
}

/* INTRADAY FORECAST */
.main-intraday-slide-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.main-intraday-period {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 23%;
  height: 100%;
  text-align: center;
  text-rendering: optimizeSpeed;
}

.main-intraday-period-title {
  backdrop-filter: blur(90px) saturate(850%) brightness(60%);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  width: 100%;
  height: 15%;
  top: 0;
  position: absolute;         /* relative to panel, not viewport */
  z-index: 1;                /* sit above the panel overlay */
  line-height: 1.2;
  font-weight: 300;
  font-size: var(--text-lg);
}

.main-intraday-time {
  font-size: var(--text-md);
  font-weight: 700;
}

#main-precip-map {
  height: 100%;
}

.main-intraday-period-temp {
  font-weight: 200;
  font-size: var(--text-3xl);
}

.main-intraday-period-condition {
  font-weight: 600;
  font-size: var(--text-lg);
  margin-top: 25%;
  overflow: visible;
  text-wrap: nowrap;
}

.intradayicon {
  margin-top: 2%;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.42));
}

.main-intraday-temp-slider-container {
  background-color: #69696933;
  backdrop-filter: saturate(250%) brightness(130%);
  border-radius: var(--radius);
  margin-top: 10%;
  width: 75%;
  height: 43%;
  position: relative;
}

.main-intraday-temp-slider {
  border-radius: var(--radius);
  backdrop-filter: saturate(250%) brightness(130%);
  background-color: #92929254;
  width: 100%;
  position: absolute;
  height: 10%;
  bottom: 0%;
}

/* SHORT-TERM FORECAST */
.main-shortterm-slide-container {
  display: flex;
  width: 100%;
  height: 100%;
  justify-content: space-between;
  align-items: stretch;
  gap: 22px;
}

.forecast-shortterm-summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  width: 18%;
  min-width: 0;
  height: 100%;
  padding: 42px 14px 52px;
  box-sizing: border-box;
  border-radius: var(--radius);
  text-shadow: 1px 1px 5px rgb(0, 0, 0);
  background-image:
    linear-gradient(180deg, rgba(2, 8, 18, 0.62), rgba(2, 8, 18, 0.82)),
    var(--forecast-weather-bg, none),
    var(--glass-surface-strong);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}

.forecast-shortterm-text {
  display: flex;
  justify-content: space-between;
  width: calc(82% - 22px);
  height: 100%;
  padding: 2%;
  box-sizing: border-box;
  line-height: 1.6;
  font-size: var(--text-lg);
  overflow: hidden;
}

.forecast-shortterm-title {
  text-align: center;
  width: 100%;
  font-weight: 500;
  font-size: var(--text-lg);
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.forecast-shortterm-icon {
  display: block;
  width: 100%;
  height: 230px;
  padding: 18px 4px;
  object-fit: contain;
  box-sizing: border-box;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.42));
}

.forecast-shortterm-condition {
  text-align: center;
  width: 100%;
  font-weight: 650;
  font-size: var(--text-lg);
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.forecast-shortterm-temp {
  text-align: center;
  width: 100%;
  font-size: 104pt;
  font-weight: 320;
  line-height: 0.82;
}

.forecast-shortterm-temp .small-degrees {
  font-size: var(--text-md);
  top: 0.08em;
}

/* EXTENDED FORECAST */
.main-forecast-slide-container {
  display: flex;
  justify-content: space-between;
  text-align: center;
  width: 100%;
  height: 100%;
}

.main-forecast-day {
  height: 100%;
  width: 18%;
}

.main-forecast-title {
  height: 10%;
  width: 100%;
  backdrop-filter: blur(90px) saturate(850%) brightness(60%);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding-top: 4%;
}

.main-forecast-condition {
  font-size: var(--text-md);
  font-weight: 650;
  white-space: nowrap;
}

.main-forecast-icon {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.42));
  width: 100%;
  height: 20%;
}

.main-forecast-temp {
  margin: 0 auto;
  width: 75%;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  font-weight: 500;
  font-size: var(--text-lg);
}

.main-forecast-temp-labels {
  margin: 0 auto;
  width: 75%;
  font-size: var(--text-xs);
  font-weight: bold;
  line-height: 0;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}

.main-forecast-labels {
  margin: 0 auto;
  width: 75%;
  font-size: var(--text-xs);
  font-weight: bold;
  line-height: 1.5;
  padding-top: 6.5px;
}

.main-forecast-wind {
  width: 100%;
  font-size: var(--text-xs);
  white-space: nowrap;
  backdrop-filter: blur(52px) saturate(185%) brightness(70%);
  -webkit-backdrop-filter: blur(52px) saturate(185%) brightness(70%);
}

/* RADAR */
#radar {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: var(--border-subtle);
}

#radar::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  border-radius: var(--radius);
  border: var(--border-subtle);
  box-shadow: inset 0 0 20px rgba(170, 180, 188, 0.08);
}

#radar-map {
  width: 100%;
  height: 100%;
}

.maplibregl-control-container {
  width: 100%;
  height: 100% !important;
}

/* Frame time + precip legend, pinned over the map's top-left corner. It lives inside #radar, so it shows,
   hides and animates with the slide. Solid tint, no backdrop blur: blurring the map would re-blur every frame. */
.radar-info-bubble {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3; /* above the label map */
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  width: max-content;
  padding: 12px 22px;
  background-image: var(--glass-surface-strong); /* opaque enough that place names don't show through */
  border: var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  pointer-events: none;
}

.radar-bubble-time {
  font-family: var(--monospace-font), monospace;
  font-size: var(--text-sm);
  line-height: 1;
  white-space: nowrap;
}

/* One key per section: a label over a continuous colour bar, light to heavy. */
.radar-legend {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.radar-legend:empty {
  display: none;
}

.radar-legend-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radar-legend-label {
  font-size: var(--text-2xs);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  white-space: nowrap;
}

.radar-swatches {
  display: flex;
  flex-direction: row;
  border-radius: 4px;
  overflow: hidden;
}

.radar-swatch {
  width: 24px;
  height: 12px;
  flex-shrink: 0;
}

.radar-legend-ends {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-2xs);
  line-height: 1;
  color: var(--text-soft);
  opacity: 0.75;
}

.radar-legend-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* ECCC's licence credit, last in the legend. Small and muted like the Light/Heavy ends. */
.radar-legend-credit {
  max-width: 18em;
  font-size: var(--text-2xs);
  line-height: 1.3;
  text-wrap: balance;
  color: var(--text-soft);
  opacity: 0.75;
}

.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right {
  opacity: 0%;
}

/* 7-DAY GRAPH */
.main-7day-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
}

#main-7day-canvas-container {
  display: flex;
  margin-right: 1px;
  margin-left: 1px;
  height: 100%;
}

/* AIR QUALITY */
.main-aq-slide-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}

.main-aq-flexcontainer {
  display: flex;
  overflow: visible;
  justify-content: space-around;
  flex-direction: column;
  text-align: center;
  align-items: center;
  width: 30%;
  height: 100%;
}

.main-aq-otherflexcontainer {
  display: flex;
  overflow: visible;
  text-wrap: nowrap;
  justify-content: space-around;
  flex-direction: row;
  width: 63%;
  height: 100%;
}

.main-aq-text-container {
  width: 100%;
  height: 80%;
  text-align: center;
}

#main-aq-icon {
  width: 30%;
  height: 30%;
}

#main-aq-narrative {
  position: absolute;
  top: 4%;
  left: 4%;
  word-wrap: break-word;
  white-space: break-spaces;
}

#main-aq-category {
  font-size: var(--text-2xl);
}

.main-aq-top-label {
  font-weight: 200;
  font-size: var(--text-sm);
}

.main-aq-top-value {
  font-weight: 600;
  font-size: var(--text-sm);
}

/* ALERTS */
.alert-box {
  display: none;
}

.main-alerts-standby {
  position: relative;
  text-align: center;
  line-height: 0.2;
  margin: 0 auto;
  padding: 0.5%;
  width: 100%;
  height: 90%;
}

.main-alerts-standby-brainrot {
  margin: 0 auto;
  background-position: center;
  background-repeat: no-repeat;
}

.main-alerts-standby-scrolltextcontainer {
  position: relative;
  white-space: nowrap;
  width: 100%;
  height: 5%;
  left: 0%;
  text-shadow: rgb(0, 0, 0) 1pt 1pt 1pt;
  bottom: -64%;
  animation: slidein 2s ease-in-out 1;
}

.main-alerts-standby-scrolltextdecorative {
  animation: scroll 20s linear infinite;
  margin-top: 2%;
}
