/* Panhandle Weather camera overlay
   Designed on a fixed 1920x1080 stage and scaled to fit any browser-source
   resolution (see fitStage() in overlay.js). Background stays transparent so
   the overlay composites cleanly over a video feed in OBS / vMix / YouTube. */

:root {
  --bar-bg: rgba(18, 19, 22, 0.92);
  --bar-border: rgba(255, 255, 255, 0.10);
  --label: #9aa2ab;
  --value: #ffffff;
  --unit: #c9ced4;
  --divider: rgba(255, 255, 255, 0.14);
  --font: 'Inter', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: transparent;
  overflow: hidden;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
}

/* ---- Top-left brand pill ---- */
#brand {
  position: absolute;
  top: 24px;
  left: 18px;
  height: 132px;
  display: flex;
  align-items: center;
  padding: 0 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, #2a4f7c 0%, #1b2431 55%, #12161c 100%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}
#brand img { height: 92px; width: auto; display: block; }
#brand .brand-fallback {
  color: #fff;
  font-weight: 800;
  font-size: 40px;
  line-height: 1.0;
  letter-spacing: 0.5px;
}

/* ---- Bottom stat bar ---- */
#bar {
  position: absolute;
  left: 18px;
  right: 18px;              /* JS narrows this when a sponsor logo is present */
  bottom: 20px;
  height: 84px;
  display: flex;
  align-items: stretch;
  background: var(--bar-bg);
  border: 1px solid var(--bar-border);
  border-radius: 20px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.cell {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 26px;
  border-right: 1px solid var(--divider);
  min-width: 0;
}
.cell:last-child { border-right: none; }

.cell .label {
  color: var(--label);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.cell .val {
  color: var(--value);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.cell .unit {
  color: var(--unit);
  font-size: 22px;
  font-weight: 600;
  margin-left: -8px;
}

/* ---- Bottom-right sponsor logo ----
   The image Y (height) is locked to the box height and the box is anchored to
   a fixed right limit, so the logo's right edge is pinned and its width grows
   leftward per the image's aspect ratio. */
#sponsor {
  position: absolute;
  right: 18px;
  bottom: 20px;
  height: 120px;
  border-radius: 16px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  display: none;                 /* shown by JS only when a sponsor is set */
}
#sponsor img {
  height: 120px;                 /* locked Y dimension */
  width: auto;                   /* width follows aspect ratio */
  display: block;
}

/* ---- Data-source indicator (subtle) ----
   Hidden on live sensor data; a small amber dot appears when the overlay has
   fallen back to the forecast backup, so operators can tell at a glance. */
#src {
  position: absolute;
  top: 22px;
  right: 22px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}
#src .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f5a623;
  box-shadow: 0 0 8px rgba(245, 166, 35, 0.9);
}
#src .txt {
  color: #f5c877;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
