/* ==========================================================================
   Family Home Hub - Fire TV 16:9 Living Room Dashboard Stylesheet
   Designed for 1920x1080 Viewports (Silk Browser on Amazon Fire TV)
   TV-Safe Margins: 3.5% padding (no overscan clipping)
   ========================================================================== */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Color Palette */
  --bg-deep: #070d18;
  --bg-card: rgba(22, 33, 54, 0.78);
  --bg-card-hover: rgba(30, 45, 74, 0.9);
  --bg-card-active: rgba(38, 56, 92, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(255, 255, 255, 0.22);
  
  --text-main: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  /* Member Accent Colors */
  --color-mom: #D946EF;    /* Fuchsia */
  --color-dad: #22C55E;    /* Green */
  --color-s1: #3B82F6;     /* Blue (Roman) */
  --color-s2: #EF4444;     /* Red (Dominic) */
  --color-family: #EAB308; /* Yellow */
  
  /* Remote Focus Glow */
  --focus-ring: #38BDF8;
  --focus-glow: rgba(56, 189, 248, 0.6);
  --focus-shadow: 0 0 0 3px var(--focus-ring), 0 10px 30px var(--focus-glow);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  width: 1920px;
  height: 1080px;
  max-width: 1920px;
  max-height: 1080px;
  overflow: hidden;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse at 50% 0%, #1e3a5f 0%, transparent 65%),
    radial-gradient(ellipse at 85% 100%, #172554 0%, transparent 50%),
    radial-gradient(ellipse at 15% 100%, #0f172a 0%, transparent 60%);
  color: var(--text-main);
  font-family: var(--font-family);
  user-select: none;
}

/* TV Canvas Container */
.tv-screen {
  width: 1920px;
  height: 1080px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 48px; /* TV Safe Margin */
  gap: 20px;
}

/* ==========================================================================
   Top Header (Branding, Clock, Weather)
   ========================================================================== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
  width: 100%;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.brand-text h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #FFFFFF, #E2E8F0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text .brand-family-name {
  color: #FBBF24;
  -webkit-text-fill-color: #FBBF24;
}

.brand-text .tagline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Center Clock */
.clock-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 280px;
}

.clock-time {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  color: #FFFFFF;
}

.clock-date {
  font-size: 16px;
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.clock-seconds {
  font-size: 26px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Weather Widget */
.weather-section {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
}

.weather-icon-box {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.weather-info .temp-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 12px;
}

.weather-temp {
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.weather-high-low {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.weather-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   Main Grid Layout (The Content Body: ~810px height)
   12-Column Flexible Grid System Matching Approved Reference Designs
   ========================================================================== */
.main-stage {
  flex: 1;
  height: 808px;
  max-height: 808px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 434px 354px;
  gap: 20px;
  position: relative;
}

/* Background Atmosphere per Mode */
body.mode-afterschool {
  background-image: 
    linear-gradient(rgba(7, 13, 24, 0.82), rgba(7, 13, 24, 0.88)),
    radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(30, 58, 138, 0.3) 0%, transparent 60%);
}

body.mode-night {
  background-image: 
    linear-gradient(rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.94)),
    radial-gradient(circle at 60% 40%, rgba(180, 83, 9, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 20% 20%, rgba(49, 46, 129, 0.35) 0%, transparent 50%);
}

body.mode-weekend {
  background-image: 
    linear-gradient(rgba(7, 13, 24, 0.82), rgba(7, 13, 24, 0.9)),
    radial-gradient(circle at 30% 20%, rgba(34, 197, 94, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(56, 189, 248, 0.25) 0%, transparent 60%);
}

body.mode-vacation {
  background-image: 
    linear-gradient(rgba(7, 13, 24, 0.8), rgba(7, 13, 24, 0.88)),
    radial-gradient(circle at 50% 10%, rgba(14, 165, 233, 0.35) 0%, transparent 70%),
    radial-gradient(circle at 80% 60%, rgba(16, 185, 129, 0.25) 0%, transparent 60%);
}

body.mode-sunday {
  background-image: 
    linear-gradient(rgba(7, 13, 24, 0.84), rgba(7, 13, 24, 0.9)),
    radial-gradient(circle at 40% 15%, rgba(56, 189, 248, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 85% 20%, rgba(234, 179, 8, 0.2) 0%, transparent 50%);
}

/* Common Card Styles */
.hub-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.hub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.hub-card-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
}

.hub-card-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

/* TV Focusable Item Styling */
.tv-focusable {
  outline: none;
}

.tv-focusable:focus,
.tv-focusable.tv-focused {
  border-color: var(--focus-ring) !important;
  box-shadow: var(--focus-shadow) !important;
  transform: scale(1.025);
  z-index: 10;
}

/* Inactivity Fade */
body.tv-inactive .tv-focusable:focus,
body.tv-inactive .tv-focusable.tv-focused {
  box-shadow: none !important;
  border-color: var(--border-highlight) !important;
  transform: scale(1.0);
}

/* ==========================================================================
   Hero Card: Coming Up Next / Time to Leave
   ========================================================================== */
.card-coming-up {
  background: linear-gradient(135deg, rgba(30, 58, 102, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-event-header {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  color: #38BDF8;
}

.hero-countdown-box {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 16px 0;
}

.hero-category-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4);
}

.hero-countdown-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: #FFFFFF;
  letter-spacing: -1px;
}

.hero-countdown-label {
  font-size: 24px;
  font-weight: 700;
  color: #38BDF8;
  letter-spacing: 1px;
}

.hero-subdetails {
  font-size: 18px;
  color: #E2E8F0;
  margin-top: 6px;
}

.hero-buffer-info {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
}

.hero-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38BDF8, #818CF8);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.hero-action-buttons {
  display: flex;
  gap: 12px;
}

.tv-btn {
  flex: 1;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tv-btn:hover, .tv-btn:focus {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38BDF8;
}

/* ==========================================================================
   Schedule Lists (Today / Tomorrow)
   ========================================================================== */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: hidden;
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 4px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.schedule-item.item-next {
  background: rgba(56, 189, 248, 0.12);
  border-left-color: #38BDF8;
}

.schedule-item.item-done {
  opacity: 0.55;
}

.schedule-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  width: 72px;
}

.schedule-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.schedule-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact Sunday & Multi-item Lists */
.card-key-items .schedule-list {
  gap: 6px;
}

.card-key-items .schedule-item {
  padding: 6px 10px;
  gap: 10px;
}

.card-dinner-plan .schedule-list {
  gap: 0;
}

.dinner-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

/* ==========================================================================
   Dinner Card (Appetizing Photo + Tomorrow preview)
   ========================================================================== */
.card-dinner {
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.dinner-image-container {
  height: 200px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #1e293b;
}

.dinner-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.dinner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.2) 60%, rgba(15, 23, 42, 0.6) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.dinner-tag {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #FBBF24;
}

.dinner-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
}

.dinner-bottom-info {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  flex: 1;
}

.dinner-tomorrow-preview {
  font-size: 15px;
  color: var(--text-secondary);
}

.dinner-tomorrow-preview strong {
  color: #FFFFFF;
}

/* ==========================================================================
   Chores Widget
   ========================================================================== */
.chore-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.chore-progress-bar {
  width: 140px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.chore-progress-fill {
  height: 100%;
  background: #22C55E;
  border-radius: 4px;
}

.chore-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chore-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #E2E8F0;
}

.chore-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.chore-checkbox.checked {
  background: #22C55E;
  border-color: #22C55E;
  color: #FFFFFF;
}

/* ==========================================================================
   Family Photo Card & Rotating Gallery
   ========================================================================== */
.card-photo {
  padding: 0;
  position: relative;
}

.photo-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.family-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-quote-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.photo-quote {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 26px;
  color: #F8FAFC;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.photo-dots {
  display: flex;
  gap: 6px;
}

.photo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.photo-dot.active {
  background: #FFFFFF;
  width: 18px;
  border-radius: 4px;
}

/* ==========================================================================
   Week Ahead 5-7 Day Strip
   ========================================================================== */
.week-ahead-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
  height: 100%;
}

.week-day-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.week-day-box.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
}

.week-day-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.week-day-date {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  margin: 2px 0;
}

.week-day-icon {
  font-size: 24px;
  margin: 6px 0;
}

.week-day-bar {
  width: 80%;
  height: 4px;
  border-radius: 2px;
  margin-top: 4px;
}

/* ==========================================================================
   Next Major Event Card
   ========================================================================== */
.card-major-event {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.major-event-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.65;
}

.major-event-content {
  position: relative;
  z-index: 2;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0.8) 100%);
}

.major-event-countdown {
  display: flex;
  align-items: center;
  gap: 12px;
}

.major-event-days {
  font-size: 40px;
  font-weight: 800;
  color: #FFFFFF;
}

.major-event-label {
  font-size: 16px;
  font-weight: 600;
  color: #38BDF8;
}

/* ==========================================================================
   Bottom Strip (Family Avatars & Remote Navigation)
   ========================================================================== */
.bottom-strip {
  height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.family-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(22, 33, 54, 0.65);
  backdrop-filter: blur(16px);
  padding: 8px 24px;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
}

.member-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.member-avatar-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  position: relative;
  border: 3px solid transparent;
}

.member-info .member-name {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
}

.member-info .member-color-tag {
  font-size: 12px;
  font-weight: 600;
}

.member-info .member-balance {
  font-size: 16px;
  font-weight: 700;
  color: #4ADE80; /* Cash green */
}

/* Bottom Remote Navigation */
.bottom-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  height: 56px;
  padding: 0 20px;
  background: rgba(22, 33, 54, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ==========================================================================
   Mode Switcher / Dev Bar (For easy testing of all 7 modes on TV/Browser)
   ========================================================================== */
.mode-bar {
  position: absolute;
  top: 4px;
  right: 48px;
  z-index: 100;
  display: flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.mode-btn.active {
  background: #38BDF8;
  color: #0F172A;
  font-weight: 700;
}

/* ==========================================================================
   High-Priority Overlays Simulator (Authoritative from media_1790258702765.jpg)
   ========================================================================== */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.overlay-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Dev Overlay Switcher bar inside modal */
.overlay-switcher-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 16px;
  border-radius: 9999px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 1080px;
}

.overlay-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.overlay-switch-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.overlay-switch-btn.active {
  background: #38BDF8;
  color: #0F172A;
  font-weight: 700;
}

/* Master Overlay Card Container */
.overlay-card {
  width: 940px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  padding: 28px 36px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all 0.25s ease;
}

/* Final Alert Red Pulse and Glow (Screen C) */
.overlay-card.overlay-final-alert {
  border: 2.5px solid #EF4444 !important;
  box-shadow: 
    0 0 50px rgba(239, 68, 68, 0.7),
    0 0 100px rgba(239, 68, 68, 0.35),
    inset 0 0 20px rgba(239, 68, 68, 0.2),
    0 30px 80px rgba(0, 0, 0, 0.9) !important;
  animation: redAlertPulse 2s infinite ease-in-out;
}

@keyframes redAlertPulse {
  0%, 100% {
    box-shadow: 
      0 0 45px rgba(239, 68, 68, 0.65),
      0 0 90px rgba(239, 68, 68, 0.3),
      inset 0 0 15px rgba(239, 68, 68, 0.15);
  }
  50% {
    box-shadow: 
      0 0 70px rgba(239, 68, 68, 0.9),
      0 0 130px rgba(239, 68, 68, 0.45),
      inset 0 0 30px rgba(239, 68, 68, 0.3);
  }
}

/* Overlay Card Top Header */
.overlay-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.overlay-brand-label {
  font-size: 15px;
  font-weight: 600;
  color: #E2E8F0;
  letter-spacing: 0.5px;
}

.overlay-brand-label span {
  color: #FBBF24;
  font-weight: 700;
}

.overlay-time-now {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Overlay Card Main Body Row */
.overlay-body-row {
  display: flex;
  align-items: center;
  gap: 28px;
}

.overlay-icon-badge {
  width: 92px;
  height: 92px;
  min-width: 92px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.overlay-info-col {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.overlay-event-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
}

.overlay-sublabel {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

.overlay-countdown-text {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.05;
  margin: 2px 0 6px 0;
}

.overlay-location-row {
  font-size: 18px;
  font-weight: 600;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-buffer-row {
  font-size: 15px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* Pill Action Buttons */
.overlay-actions-row {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-pill-btn {
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.overlay-pill-btn.primary {
  background: #38BDF8;
  color: #0F172A;
  border: none;
}

.overlay-pill-btn.primary:hover,
.overlay-pill-btn.primary:focus {
  background: #7DD3FC;
  transform: translateY(-2px);
}

.overlay-pill-btn.primary-white {
  background: #FFFFFF;
  color: #0F172A;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.overlay-pill-btn.primary-white:hover,
.overlay-pill-btn.primary-white:focus {
  background: #F1F5F9;
  transform: translateY(-2px);
}

.overlay-pill-btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.overlay-pill-btn.secondary:hover,
.overlay-pill-btn.secondary:focus {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.overlay-pill-btn.tertiary {
  background: rgba(255, 255, 255, 0.06);
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.overlay-pill-btn.tertiary:hover,
.overlay-pill-btn.tertiary:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ==========================================================================
   Parent PIN Modal
   ========================================================================== */
.pin-modal {
  width: 480px;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.pin-display {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}

.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
}

.pin-dot.filled {
  background: #38BDF8;
  border-color: #38BDF8;
  box-shadow: 0 0 12px #38BDF8;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.pin-key {
  height: 60px;
  font-size: 24px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #FFFFFF;
  cursor: pointer;
}
