/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #2a6b74;
  --green-dark:  #152830;
  --green-mid:   #3d9aab;
  --green-light: #7ecbd6;
  --text-dark:   #111111;
  --text-gray:   #4a8a96;
  --red:         #dd3333;
  --white:       #ffffff;
  --header-h:    80px;
  --ticker-h:    90px;
  --sidebar-w:   300px;
  --border-sub:  rgba(126,203,214,0.18);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--green-dark);
  color: var(--white);
}

/* ─── App Grid — 3 rows ─────────────────────────────────── */
#app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr var(--ticker-h);
  width: 1920px; height: 1080px;
  transform-origin: top left;
}

/* ─── Header B ──────────────────────────────────────────── */
#header {
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--green-dark);
  border-bottom: 3px solid var(--green);
  padding: 0 32px;
  gap: 24px;
}

/* Left: building name + subtitle */
#header-left { display: flex; flex-direction: column; gap: 3px; }
#building-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.5px;
}
#building-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Center: large clock + date stacked */
#header-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
#clock-time {
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  white-space: nowrap;
}
#clock-digits { font-size: 38px; letter-spacing: 2px; }
#clock-ampm   { font-size: 20px; letter-spacing: 1px; margin-left: 4px; color: var(--green-light); }
#clock-date   { font-size: 16px; color: var(--green-light); }

/* Right: 8-day weather cards */
#header-weather {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
#forecast-block { display: flex; align-items: center; gap: 5px; }
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 68px;
  padding: 6px 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 5px;
  border: 1px solid rgba(170,207,133,0.15);
}
.forecast-day .fd-label { font-size: 10px; font-weight: 700; color: var(--green-light); text-transform: uppercase; letter-spacing: 0.5px; }
.forecast-day .fd-icon  { width: 32px; height: 32px; }
.forecast-day .fd-temps { font-size: 12px; color: var(--white); white-space: nowrap; }
.forecast-day .fd-hi    { font-weight: 700; }
.forecast-day .fd-lo    { color: var(--text-gray); }
#weather-unavail { font-size: 14px; color: var(--text-gray); }

/* ─── Main — 2-col: sidebar + body ──────────────────────── */
#main {
  grid-row: 2;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  overflow: hidden;
}

/* ─── Sidebar B ─────────────────────────────────────────── */
#sidebar {
  grid-column: 1;
  background: var(--green-dark);
  border-right: 2px solid var(--border-sub);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Green header block */
#sidebar-header {
  background: var(--green);
  padding: 14px 16px;
  flex-shrink: 0;
}
.sh-bldg {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}
.sh-addr {
  font-size: 11px;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
}

/* Sections */
.sidebar-section {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border-sub);
}
.sidebar-section:last-child { border-bottom: none; margin-top: auto; }
.sidebar-section.sidebar-cta { flex-shrink: 0; }

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-sub);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-sub);
}

/* Amenity rows with icons */
.common-area-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(170,207,133,0.07);
  font-size: 12px;
}
.common-area-row:last-child { border-bottom: none; }
.ca-icon { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
.ca-name { color: var(--white); flex: 1; padding-right: 6px; }
.ca-suite {
  font-size: 11px;
  color: var(--green-light);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(170,207,133,0.12);
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Notices */
.sidebar-notice {
  font-size: 11px;
  color: rgba(255,255,255,0.72);
  line-height: 1.5;
  margin-bottom: 5px;
  padding-left: 6px;
  border-left: 2px solid rgba(170,207,133,0.3);
}
.sidebar-notice:last-child { margin-bottom: 0; }

/* Leasing CTA */
.cta-line  { font-size: 14px; font-weight: 700; color: var(--green-light); margin-bottom: 4px; }
.cta-name  { font-size: 13px; color: var(--white); }
.cta-phone { font-size: 18px; font-weight: 800; color: var(--white); margin-top: 4px; }
.cta-email { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* ─── Body Frame ─────────────────────────────────────────── */
#body-frame {
  grid-column: 2;
  position: relative;
  overflow: hidden;
}

.body-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.body-panel.active-panel {
  opacity: 1;
  pointer-events: auto;
}

/* Directory view */
#directory {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--green-dark);
}
#directory-header {
  display: flex;
  gap: 16px;
  padding: 10px 20px 6px;
  border-bottom: 1px solid var(--border-sub);
  flex-shrink: 0;
}
#dir-floor1-label, #dir-floor2-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}
#directory-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  align-content: start;
  gap: 0 12px;
  padding: 8px 20px;
  overflow: hidden;
}
.tenant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(170,207,133,0.07);
  min-height: 0;
}
.t-name {
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  padding-right: 6px;
  line-height: 1.3;
}
.t-suite {
  font-size: 12px;
  color: var(--green-light);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Floor plan view */
#floorplan-view {
  background: var(--green-dark);
  display: flex;
  flex-direction: column;
}
#fp-label-bar {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-sub);
  flex-shrink: 0;
}
#fp-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 2px;
}
#fp-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  overflow: hidden;
}
#fp-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* ─── Footer B — Two rows ────────────────────────────────── */
#zone3 {
  grid-row: 3;
  background: #0a1820;
  border-top: 2px solid var(--border-sub);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top row: building notices (timed rotation) */
#notices-row {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-sub);
  background: rgba(72,86,57,0.2);
  flex-shrink: 0;
}
#notice-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(170,207,133,0.3);
  padding: 2px 8px;
  border-radius: 3px;
}
#notice-text {
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.4s ease;
}

/* Bottom row: scrolling stocks + news */
#ticker-row {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#ticker-label {
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-right: 1px solid var(--border-sub);
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.3);
  white-space: nowrap;
}

#ticker-track-wrapper {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
#ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 0s linear infinite;
}
.ticker-item {
  padding: 0 36px;
  font-size: 17px;
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ticker-item.notice { color: #e8f5d8; }
.ticker-item.news   { color: #c8e0ff; }
.ticker-item.stock  { display: inline-flex; gap: 6px; }
.ticker-item.stock .sym   { color: var(--green-light); font-weight: 700; }
.ticker-item.stock .price { color: var(--white); }
.ticker-item.stock .up    { color: #66dd66; }
.ticker-item.stock .down  { color: var(--red); }
.ticker-sep {
  padding: 0 16px;
  color: rgba(170,207,133,0.35);
  font-size: 14px;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Live TV Overlay ────────────────────────────────────── */
#live-tv-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
}
#live-tv-overlay.active { display: block; }
#live-tv-iframe { width: 100%; height: 100%; border: none; }
#live-tv-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--red);
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: blink 1.5s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
