/* AmbientBoard TV Kiosk Stylesheet (Transparent Overlay Layout) */
:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-dark: #05070c;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.68);
  --text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-display);
  user-select: none;
  cursor: none;
  text-shadow: var(--text-shadow);
}

/* Show cursor briefly if someone moves a mouse on a desktop browser */
body:hover {
  cursor: default;
}

/* Fullscreen Background Slideshow Layer */
.slideshow-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  background-color: #030712;
}

.slide-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transform-origin: center center;
  will-change: transform, opacity;
  transition: opacity 1.8s ease-in-out;
}

.slide-layer.active {
  opacity: 1;
}

/* Ken Burns Pan & Zoom Animation */
.slide-layer.ken-burns-1 {
  animation: kenBurns1 32s ease-in-out infinite alternate;
}

.slide-layer.ken-burns-2 {
  animation: kenBurns2 32s ease-in-out infinite alternate;
}

.slide-layer.ken-burns-3 {
  animation: kenBurns3 32s ease-in-out infinite alternate;
}

@keyframes kenBurns1 {
  0% { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1.5%, -1.5%); }
}

@keyframes kenBurns2 {
  0% { transform: scale(1.1) translate(-1.5%, 1.5%); }
  100% { transform: scale(1.0) translate(1%, -1%); }
}

@keyframes kenBurns3 {
  0% { transform: scale(1.04) translate(1.5%, 0); }
  100% { transform: scale(1.12) translate(-1%, 1.5%); }
}

/* Rich Top & Bottom Edge Gradients for Calendar & Weather Legibility */
.ambient-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.72) 18%, rgba(0, 0, 0, 0.54) 32%, transparent 45%),
    linear-gradient(to top, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.72) 15%, rgba(0, 0, 0, 0.50) 26%, transparent 36%);
}

/* Main Fullscreen Flex Layout */
.screen-layout {
  position: relative;
  z-index: 3;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 28px 10px;
}

/* Top Section: Clock/Date + 7-Day Calendar Strip */
.top-region {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

/* Top-Left Clock Cluster */
.clock-cluster {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.clock-time {
  font-size: 4.5rem;
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -1.5px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.clock-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 2px;
  gap: 2px;
}

.clock-seconds {
  font-size: 1.45rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
}

.clock-ampm {
  font-size: 1.0rem;
  font-weight: 400;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.88);
  text-transform: uppercase;
}

/* Top-Right Weekday & Date Cluster */
.date-cluster {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.date-weekday {
  font-size: 2.55rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.date-monthday {
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
}

/* 7-Column Horizontal Week Calendar (Sun - Sat) */
.calendar-strip {
  width: 100%;
}

.week-grid-container {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.week-day-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.week-day-column.past {
  opacity: 0.82;
}

.week-day-name {
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  padding-bottom: 4px;
}

.week-day-column.today .week-day-name {
  font-weight: 600;
  color: #ffffff;
}

.week-day-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  margin-bottom: 5px;
}

.week-day-column.today .week-day-divider {
  height: 3px;
  background: #ffffff;
  margin-bottom: 4px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.week-day-date {
  font-size: 0.92rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.week-day-column.today .week-day-date {
  font-weight: 700;
}

.week-day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.week-event-item {
  font-size: 0.82rem;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.28;
  word-break: break-word;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.week-event-item .event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(-1px);
}

.week-event-item .event-time {
  font-weight: 600;
  white-space: nowrap;
}

.week-event-item.all-day {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 2px;
  padding: 2px 6px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.week-event-item.meal-pill {
  background: rgba(245, 158, 11, 0.25);
  border-left: 3px solid #f59e0b;
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #fde68a;
}

.week-event-item.past-event {
  opacity: 0.72;
}

.cal-now-line {
  position: relative;
  width: 100%;
  height: 2px;
  background: #38bdf8;
  margin: 4px 0;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.8);
}

.cal-now-dot {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.9);
}

/* Open Center Area & Household Chores/Lists Board */
.open-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  pointer-events: none;
}

.household-board {
  width: 100%;
  max-height: 100%;
  gap: 18px;
  align-items: stretch;
}

.hh-column {
  background: rgba(9, 13, 22, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hh-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hh-col-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
}

.hh-star-pill {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.hh-progress {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
}

.hh-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hh-chore-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.9rem;
  transition: all 0.16s ease;
  user-select: none;
}

.hh-chore-item.checkable {
  cursor: pointer;
}

.hh-chore-item.checkable:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.hh-chore-item.done {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.hh-chore-item.done .hh-chore-title {
  opacity: 0.65;
  text-decoration: line-through;
}

.hh-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.hh-chore-item.done .hh-check {
  background: #10b981;
  border-color: #10b981;
}

.hh-chore-title {
  flex: 1;
}

.hh-chore-stars {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 600;
}

/* Bottom Section: Weather & Photo Metadata */
.bottom-region {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.weather-bar {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: end;
  gap: 24px;
  width: 100%;
}

/* Bottom-Left: Current Weather */
.weather-current {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.weather-stat-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
}

.weather-stat-row .stat-icon {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}

.weather-temp-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.weather-temp-value {
  font-size: 4.1rem;
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -1.5px;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.weather-main-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-main-icon svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
}

/* Bottom-Center/Right: 5-Day Forecast Strip */
.weather-forecast-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  width: 100%;
}

.forecast-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.forecast-day {
  font-size: 0.92rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #ffffff;
}

.forecast-icon {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forecast-icon svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.75));
}

.forecast-precip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.76rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

.forecast-precip svg {
  width: 10px;
  height: 10px;
  fill: rgba(255, 255, 255, 0.85);
}

.forecast-temps {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.forecast-high {
  font-weight: 600;
  color: #ffffff;
}

.forecast-low {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}

/* Bottom Edge Photo Metadata Bar */
.photo-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  padding-top: 2px;
  transition: opacity 0.4s ease;
}

.photo-footer-left,
.photo-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-icon {
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

/* Night Mode Overlay */
.night-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}

body.night-mode .night-overlay {
  opacity: 0.88;
}

body.night-mode-blackout .night-overlay {
  opacity: 1;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 200;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  .slide-layer {
    transition: opacity 0.5s ease !important;
    animation: none !important;
  }
}
