/* ==================================================
   Pixel Theme Tokens
   ================================================== */
.status-theme-pixel {
  --pixel-bg: #f8f9fa;
  --pixel-surface: #ffffff;
  --pixel-border: #d0d7de;
  --pixel-text: #24292f;
  --pixel-muted: #57606a;
  --pixel-green: #1a7f37;
  --pixel-amber: #b08800;
  --pixel-red: #cf222e;
  --pixel-blue: #0969da;
  --pixel-maintenance: #8250df;
  
  --pixel-radius: 2px;
  --pixel-font-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  --bg-page: var(--pixel-bg);
  --text-main: var(--pixel-text);
  --text-muted: var(--pixel-muted);
  --border-color: var(--pixel-border);
  --hover-bg: var(--pixel-bg);
}

@media (prefers-color-scheme: dark) {
  .status-theme-pixel {
    --pixel-bg: #0d1117;
    --pixel-surface: #161b22;
    --pixel-border: #30363d;
    --pixel-text: #c9d1d9;
    --pixel-muted: #8b949e;
    --pixel-green: #2ea043;
    --pixel-amber: #d29922;
    --pixel-red: #f85149;
    --pixel-blue: #58a6ff;
    --pixel-maintenance: #bc8cff;
  }
}

/* Base Overrides */
.status-theme-pixel.public-status-demo {
  background: var(--pixel-bg);
  color: var(--pixel-text);
  font-family: var(--font-stack);
}

.status-theme-pixel .container {
  max-width: 860px;
}

.status-theme-pixel a {
  color: var(--pixel-blue);
  text-decoration: none;
}
.status-theme-pixel a:hover {
  text-decoration: underline;
}

/* Header */
.status-theme-pixel header {
  border-bottom: 1px solid var(--pixel-border);
  padding-bottom: 24px;
  margin-bottom: 40px;
  border-radius: 0;
}

.status-theme-pixel .brand-logo {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}

/* Buttons */
.status-theme-pixel .subscribe-btn,
.status-theme-pixel .btn-primary,
.status-theme-pixel .btn-secondary {
  background: var(--pixel-surface);
  color: var(--pixel-text);
  border: 1px solid var(--pixel-border);
  border-radius: var(--pixel-radius);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 2px 2px 0 var(--pixel-border);
  transition: all 0.1s;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-theme-pixel .subscribe-btn:hover,
.status-theme-pixel .btn-primary:hover,
.status-theme-pixel .btn-secondary:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--pixel-border);
  background: var(--pixel-bg);
  opacity: 1;
}
.status-theme-pixel .subscribe-btn:active,
.status-theme-pixel .btn-primary:active,
.status-theme-pixel .btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 transparent;
}
.status-theme-pixel .btn-danger-bg {
  color: var(--pixel-red);
  border-color: var(--pixel-red);
  box-shadow: 2px 2px 0 var(--pixel-red);
}
.status-theme-pixel .btn-danger-bg:hover {
  background: rgba(207, 34, 46, 0.1);
  box-shadow: 1px 1px 0 var(--pixel-red);
}

/* Status Hero */
.status-theme-pixel .system-status-hero {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  border-radius: var(--pixel-radius);
  padding: 24px;
  text-align: left;
  position: relative;
  margin-bottom: 32px;
}
.status-theme-pixel .system-status-hero h1 {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-theme-pixel .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  display: inline-block;
}
.status-theme-pixel .status-dot.operational { background: var(--pixel-green); }
.status-theme-pixel .status-dot.degraded { background: var(--pixel-amber); }
.status-theme-pixel .status-dot.outage, .status-theme-pixel .status-dot.major { background: var(--pixel-red); }
.status-theme-pixel .status-dot.maintenance { background: var(--pixel-maintenance); }

.status-theme-pixel .system-status-hero p {
  margin: 0;
  color: var(--pixel-muted);
  font-family: var(--pixel-font-mono);
  font-size: 12px;
}

/* Incident Banner */
.status-theme-pixel .active-incident-banner {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-amber);
  border-left: 4px solid var(--pixel-amber);
  border-radius: var(--pixel-radius);
  padding: 20px;
  margin-bottom: 40px;
}
.status-theme-pixel .incident-date {
  font-family: var(--pixel-font-mono);
  font-size: 11px;
  color: var(--pixel-amber);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.status-theme-pixel .incident-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px 0;
}
.status-theme-pixel .incident-desc {
  color: var(--pixel-text);
  font-size: 14px;
  line-height: 1.5;
}

/* Section Titles */
.status-theme-pixel .section-title {
  font-family: var(--pixel-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pixel-muted);
  border-bottom: 1px solid var(--pixel-border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* Services */
.status-theme-pixel .services-list {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  border-radius: var(--pixel-radius);
  overflow: hidden;
}
.status-theme-pixel .service-row {
  border: none;
  border-bottom: 1px solid var(--pixel-border);
  border-radius: 0;
  padding: 16px 20px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) minmax(128px, auto);
  align-items: center;
  gap: 16px;
  transition: background 0.1s;
}
.status-theme-pixel .service-row:last-child {
  border-bottom: none;
}
.status-theme-pixel .service-row:hover {
  background: var(--pixel-bg);
  transform: none;
  box-shadow: none;
}
.status-theme-pixel .service-name {
  font-weight: 600;
  font-size: 14px;
}
.status-theme-pixel .service-info {
  min-width: 0;
}
.status-theme-pixel .service-metrics {
  color: var(--pixel-muted);
  font-family: var(--pixel-font-mono);
  font-size: 12px;
  gap: 8px 14px;
  line-height: 1.5;
}
.status-theme-pixel .metric-value {
  color: var(--pixel-text);
  font-weight: 600;
}

/* Service Status Colors */
.status-theme-pixel .text-operational { color: var(--pixel-green); }
.status-theme-pixel .text-degraded { color: var(--pixel-amber); }
.status-theme-pixel .text-outage, .status-theme-pixel .text-major { color: var(--pixel-red); }
.status-theme-pixel .text-maintenance { color: var(--pixel-maintenance); }

.status-theme-pixel .service-status {
  font-family: var(--pixel-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.status-theme-pixel .service-status i {
  display: none; /* Hide generic icons */
}
.status-theme-pixel .service-status::before {
  content: '■';
  font-size: 14px;
}

/* Uptime Grid */
.status-theme-pixel .service-history-compact {
  height: 24px;
  width: 100%;
  min-width: 170px;
  max-width: 220px;
  gap: 2px;
  justify-self: end;
}
.status-theme-pixel .history-bar-compact {
  border-radius: 0;
  background: var(--pixel-border);
  opacity: 1;
}
.status-theme-pixel .history-bar-compact.operational { background: var(--pixel-green); }
.status-theme-pixel .history-bar-compact.degraded { background: var(--pixel-amber); }
.status-theme-pixel .history-bar-compact.outage { background: var(--pixel-red); }
.status-theme-pixel .history-bar-compact.maintenance { background: var(--pixel-maintenance); }
.status-theme-pixel .history-bar-compact.no-data { background: var(--pixel-border); opacity: .55; }
.status-theme-pixel .history-bar-compact:hover {
  filter: brightness(1.2);
}

/* Detailed Uptime */
.status-theme-pixel .uptime-container {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  border-radius: var(--pixel-radius);
  padding: 24px;
}
.status-theme-pixel .uptime-header {
  font-family: var(--pixel-font-mono);
  font-size: 12px;
  margin-bottom: 24px;
}
.status-theme-pixel .uptime-header strong {
  font-size: 18px;
  font-family: var(--font-stack);
}
.status-theme-pixel .uptime-grid {
  height: 48px;
  gap: 2px;
  margin-bottom: 12px;
}
.status-theme-pixel .uptime-day {
  border-radius: 0;
  background: var(--pixel-border);
  opacity: 1;
}
.status-theme-pixel .uptime-day.operational { background: var(--pixel-green); }
.status-theme-pixel .uptime-day.degraded { background: var(--pixel-amber); }
.status-theme-pixel .uptime-day.outage { background: var(--pixel-red); }
.status-theme-pixel .uptime-day.maintenance { background: var(--pixel-maintenance); }
.status-theme-pixel .uptime-labels {
  font-family: var(--pixel-font-mono);
  color: var(--pixel-muted);
  font-size: 11px;
}

/* Incidents List */
.status-theme-pixel .incident-history-list {
  border-left: 1px solid var(--pixel-border);
  margin-left: 6px;
  padding-left: 20px;
}
.status-theme-pixel .incident-item {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  border-radius: 0;
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  transition: background 0.1s;
}
.status-theme-pixel .incident-item:hover {
  transform: none;
  box-shadow: none;
  background: var(--pixel-bg);
}
.status-theme-pixel .incident-item::before {
  content: '■';
  position: absolute;
  left: -27px;
  top: 16px;
  color: var(--pixel-border);
  background: var(--pixel-bg);
  font-size: 12px;
  line-height: 1;
}
.status-theme-pixel .incident-item.active::before {
  color: var(--pixel-amber);
}
.status-theme-pixel .incident-date {
  font-family: var(--pixel-font-mono);
  font-size: 11px;
  color: var(--pixel-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.status-theme-pixel .incident-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--pixel-text);
  margin-bottom: 4px;
}
.status-theme-pixel .incident-title i { display: none; }

/* Tooltip */
.status-theme-pixel .tooltip {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  color: var(--pixel-text);
  border-radius: 0;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.05);
  font-family: var(--pixel-font-mono);
  font-size: 11px;
  padding: 10px;
}
.status-theme-pixel .tooltip-date {
  color: var(--pixel-muted);
  border-bottom: 1px dotted var(--pixel-border);
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.status-theme-pixel .tooltip-desc {
  color: var(--pixel-text);
}

/* Charts */
.status-theme-pixel .chart-section {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  border-radius: var(--pixel-radius);
  padding: 20px;
  margin-bottom: 24px;
}
.status-theme-pixel .chart-header {
  border-bottom: 1px solid var(--pixel-border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.status-theme-pixel .chart-header h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}
.status-theme-pixel .chart-val {
  font-family: var(--pixel-font-mono);
  font-size: 13px;
}
.status-theme-pixel .chart-reset-zoom {
  background: var(--pixel-bg);
  border: 1px solid var(--pixel-border);
  font-family: var(--pixel-font-mono);
  border-radius: 0;
  text-transform: uppercase;
  font-size: 10px;
  box-shadow: 1px 1px 0 var(--pixel-border);
}

/* Subscription Modal */
.status-theme-pixel .status-modal-backdrop {
  background: rgba(0,0,0,0.6);
  backdrop-filter: none;
}
.status-theme-pixel .status-modal {
  background: var(--pixel-surface);
  border: 1px solid var(--pixel-border);
  border-radius: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.2);
}
.status-theme-pixel .status-modal-header {
  border-bottom: 1px solid var(--pixel-border);
  padding: 16px 24px;
  background: var(--pixel-bg);
}
.status-theme-pixel .status-modal-header h2 {
  font-family: var(--pixel-font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.status-theme-pixel .modal-desc {
  color: var(--pixel-muted);
  font-size: 13px;
}
.status-theme-pixel .form-input {
  background: var(--pixel-bg);
  border: 1px solid var(--pixel-border);
  border-radius: 0;
  color: var(--pixel-text);
}
.status-theme-pixel .form-input:focus {
  border-color: var(--pixel-blue);
  box-shadow: inset 0 0 0 1px var(--pixel-blue);
}
.status-theme-pixel .form-section-title {
  font-family: var(--pixel-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pixel-muted);
  border-bottom: 1px dashed var(--pixel-border);
}
.status-theme-pixel .service-select-list {
  border: 1px solid var(--pixel-border);
  border-radius: 0;
  background: var(--pixel-bg);
}
.status-theme-pixel .service-select-item {
  border-bottom: 1px solid var(--pixel-border);
}
.status-theme-pixel .toggle-switch {
  border-radius: 0;
  background: var(--pixel-bg);
  border: 1px solid var(--pixel-border);
}
.status-theme-pixel .toggle-switch::after {
  border-radius: 0;
  background: var(--pixel-muted);
  top: 1px; left: 1px;
  width: 16px; height: 16px;
  box-shadow: none;
}
.status-theme-pixel .toggle-label input:checked + .toggle-switch {
  background: var(--pixel-surface);
  border-color: var(--pixel-text);
}
.status-theme-pixel .toggle-label input:checked + .toggle-switch::after {
  background: var(--pixel-text);
  transform: translateX(16px);
}
.status-theme-pixel .success-email, 
.status-theme-pixel .manage-email {
  background: var(--pixel-bg);
  border: 1px solid var(--pixel-border);
  border-radius: 0;
  font-family: var(--pixel-font-mono);
}

/* Footer */
.status-theme-pixel .footer {
  border-top: 1px solid var(--pixel-border);
  padding-top: 24px;
  margin-top: 60px;
  font-family: var(--pixel-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 600px) {
  .status-theme-pixel .service-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: flex-start;
  }
  .status-theme-pixel .service-status {
    justify-content: flex-start;
  }
  .status-theme-pixel .status-modal {
    border-radius: 0;
    border-top: 2px solid var(--pixel-border);
  }
}
