/* Public status page: the look of the nuxt3plus app (Vuetify theme `gaiasuite`, light only), system fonts */
:root {
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --grey: #9e9e9e;
  --bar-grey: #bdbdbd;
  --background: #f1f1f1;
  --surface: #ffffff;
  --text: #1a1a1a;
  --secondary: #616161;
  --border: #e3e3e3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--background);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 95%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0;
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.logo img {
  width: 200px;
  height: auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.card--page {
  padding: 32px;
}

.status-page {
  max-width: 960px;
  margin: 0 auto;
}

.footer {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* Type scale */
.headline-small {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 2rem;
}

.title-large {
  margin: 0 0 12px;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.75rem;
}

.title-medium {
  font-size: 1rem;
  font-weight: 500;
}

.title-small {
  font-size: 0.875rem;
  font-weight: 500;
}

.body-medium {
  font-size: 0.875rem;
}

.body-small {
  font-size: 0.75rem;
}

.secondary {
  color: var(--secondary);
}

.center {
  text-align: center;
}

/* Alerts: tonal, the text in the status colour on a tint of it */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}

.alert-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.alert-body {
  flex: 1 1 auto;
  min-width: 0;
}

.alert--prominent {
  align-items: center;
  margin-bottom: 32px;
  padding: 16px;
}

.alert--prominent .alert-icon {
  width: 28px;
  height: 28px;
  margin-top: 0;
}

.alert--success {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
}

.alert--warning {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
}

.alert--error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.12);
}

.alert--info {
  color: var(--info);
  background: rgba(59, 130, 246, 0.12);
}

.button {
  flex-shrink: 0;
  align-self: center;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  background: var(--background);
}

/* Sections and rows */
.section {
  margin-bottom: 32px;
}

.group {
  margin-bottom: 16px;
}

.group-title {
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.row {
  padding: 12px;
}

.row + .row {
  border-top: 1px solid var(--border);
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.row-label {
  min-width: 0;
}

@media (min-width: 600px) {
  .row {
    padding: 16px;
  }
}

@media (max-width: 599px) {
  .card--page {
    padding: 16px;
  }
}

/* Status chip */
.chip {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip-icon {
  width: 16px;
  height: 16px;
}

.chip--success {
  color: var(--success);
  background: rgba(34, 197, 94, 0.12);
}

.chip--warning {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.12);
}

.chip--error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.12);
}

.chip--grey {
  color: var(--secondary);
  background: rgba(158, 158, 158, 0.16);
}

.icon {
  fill: currentColor;
}

/* Uptime bars: one per UTC day, the last 30 only at phone width */
.uptime-bars-track {
  display: flex;
  gap: 2px;
  height: 28px;
}

.uptime-bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  transition: opacity 0.15s;
}

.uptime-bar:hover {
  opacity: 0.65;
}

.uptime-bar--success {
  background: var(--success);
}

.uptime-bar--warning {
  background: var(--warning);
}

.uptime-bar--error {
  background: var(--error);
}

.uptime-bar--grey {
  background: var(--bar-grey);
}

.uptime-bar--none {
  background: var(--border);
}

.uptime-bars-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.3;
}

.uptime-bars-legend > span {
  white-space: nowrap;
}

.uptime-bars-legend > .uptime-bars-summary {
  white-space: normal;
  text-align: center;
}

.uptime-bars-from-phone {
  display: none;
}

@media (max-width: 599px) {
  .uptime-bar--older,
  .uptime-bars-from {
    display: none;
  }

  .uptime-bars-from-phone {
    display: inline;
  }
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-swatch--success {
  background: var(--success);
}

.legend-swatch--warning {
  background: var(--warning);
}

.legend-swatch--error {
  background: var(--error);
}

.legend-swatch--none {
  background: var(--border);
}

/* States */
.status-stale {
  filter: grayscale(1);
  opacity: 0.6;
}

.loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tooltip {
  position: absolute;
  z-index: 10;
  max-width: 320px;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-line;
  pointer-events: none;
}

.tooltip[hidden] {
  display: none;
}
