:root {
  --apple-bg: #000000;
  --apple-glass: rgba(255, 255, 255, 0.1);
  --apple-glass-border: rgba(255, 255, 255, 0.2);
  --apple-text: #ffffff;
  --apple-text-muted: #888888;
  --apple-accent: #0a84ff;
  --apple-radius: 20px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--apple-bg);
  color: var(--apple-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden; /* Typical for a 10ft dashboard */
  -webkit-font-smoothing: antialiased;
}

.dashboard-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  gap: 24px;
  padding: 40px;
  height: 100vh;
  box-sizing: border-box;
}

.widget {
  background: var(--apple-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--apple-glass-border);
  border-radius: var(--apple-radius);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.widget-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--apple-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
}

.widget-content {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.column-start {
    flex-direction: column;
    align-items: flex-start;
}

.center-text {
    text-align: center;
}

.top-start {
    justify-content: flex-start;
    align-items: flex-start;
}

.scrollable {
    overflow-y: auto;
}

/* 10ft Scale adjustments */
h1, h2, h3 { margin: 0; }
.large-text { font-size: 4rem; font-weight: 700; }
.medium-text { font-size: 2.5rem; font-weight: 600; }
.muted { color: var(--apple-text-muted); }
.change-text {
    margin-top: 4px;
    font-size: 1.5rem;
    font-weight: bold;
}

.bottom-label {
    position: absolute;
    bottom: 5px;
    left: 24px;
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    z-index: 2;
    white-space: nowrap;
}

.clock-widget {
  grid-column: span 2;
  grid-row: span 1;
}

.calendar-widget {
  grid-column: span 2;
  grid-row: span 2;
}

.stock-widget {
  grid-column: span 1;
  grid-row: span 1;
}

.home-assistant-widget {
  grid-column: span 1;
  grid-row: span 1;
  padding: 0 !important; /* Remove padding to allow footer to go edge-to-edge */
}

.home-assistant-widget > div:first-child {
    padding: 24px;
    padding-bottom: 0;
}

a {
    color: var(--apple-accent);
    text-decoration: none;
}

/* Calendar Grouping Styles */
.day-group {
    margin-bottom: 24px;
    width: 100%;
}

.day-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--apple-accent);
    margin-bottom: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--apple-glass-border);
}

.today-highlight {
    border: 2px solid var(--apple-accent);
    padding: 12px;
    border-radius: 16px;
    background: rgba(10, 132, 255, 0.05);
    margin: -12px; /* Pull back padding for alignment */
    margin-bottom: 12px;
}

/* Weather Footer Styling */
.weather-footer {
    width: 100%;
    padding: 12px 24px;
    border-top: 1px solid var(--apple-glass-border);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.weather-theme-clear { background: linear-gradient(90deg, rgba(255, 159, 10, 0.15), rgba(255, 214, 10, 0.1)); color: #ffd60a; }
.weather-theme-cloudy { background: linear-gradient(90deg, rgba(142, 142, 147, 0.15), rgba(99, 99, 102, 0.1)); color: #aeaeb2; }
.weather-theme-rain { background: linear-gradient(90deg, rgba(10, 132, 255, 0.15), rgba(0, 64, 221, 0.1)); color: #409cff; }
.weather-theme-snow { background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(200, 200, 200, 0.05)); color: #ffffff; }
.weather-theme-thunder { background: linear-gradient(90deg, rgba(191, 94, 255, 0.15), rgba(148, 0, 211, 0.1)); color: #bf5eff; }
.weather-theme-default { background: rgba(255, 255, 255, 0.05); color: var(--apple-text-muted); }
