.ss-timeline-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}

.ss-group-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94A3B8;
  padding: 20px 0 8px 0;
  margin-top: 4px;
  border-top: 1px solid #2D3142;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ss-group-header:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.ss-timeline-card {
  background: transparent;
  padding: 16px 0;
}

.ss-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.ss-timeline-name {
  font-size: 15px;
  font-weight: 600;
  color: #E2E8F0;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ss-timeline-status {
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ss-timeline-bars {
  display: flex;
  height: 34px;
  gap: 2px;
  align-items: stretch;
  border-radius: 3px;
  overflow: visible;
}

.ss-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  position: relative;
}

.ss-bar:hover {
  opacity: 0.75;
  transform: scaleY(1.15);
}

.ss-bar-operational {
  background-color: var(--ss-color-operational);
}

.ss-bar-degraded {
  background-color: var(--ss-color-degraded);
}

.ss-bar-outage {
  background-color: var(--ss-color-outage);
}

/* Rich tooltip card */
.ss-tooltip {
  display: none;
  position: absolute;
  z-index: 9999;
  background: #13141F;
  border: 1px solid #2D3142;
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 200px;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', -apple-system, sans-serif;
  pointer-events: none;
}

.ss-tooltip-date {
  font-size: 13px;
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2D3142;
}

.ss-tooltip-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ss-tooltip-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ss-tooltip-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ss-tooltip-detail {
  font-size: 12px;
  color: #94A3B8;
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ss-tooltip-issues {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #2D3142;
}

.ss-tooltip-issues-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94A3B8;
  margin-bottom: 6px;
}

.ss-tooltip-issue {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 4px;
  line-height: 1.4;
}

.ss-issue-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}

.ss-issue-tag-maint {
  background: rgba(117, 149, 255, 0.15);
  color: #7595FF;
  border: 1px solid rgba(117, 149, 255, 0.3);
}

.ss-issue-tag-incident {
  background: rgba(255, 92, 92, 0.15);
  color: #FF5C5C;
  border: 1px solid rgba(255, 92, 92, 0.3);
}

.ss-tooltip-svc {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #2D3142;
}

.ss-timeline-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ss-timeline-center {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 16px;
  gap: 8px;
}

.ss-timeline-line {
  flex: 1;
  height: 1px;
  background: #2D3142;
}

.ss-timeline-uptime {
  color: #E2E8F0;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* Past Incidents section */
.ss-past-incidents {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #2D3142;
}

.ss-past-incidents-title {
  font-size: 18px;
  font-weight: 700;
  color: #E2E8F0;
  margin-bottom: 20px;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ss-past-incidents-empty {
  font-size: 14px;
  color: #94A3B8;
  padding: 24px;
  border: 1px dashed #2D3142;
  border-radius: 4px;
  text-align: center;
}

.ss-past-incident-card {
  padding: 16px 0;
  border-bottom: 1px solid #2D3142;
}

.ss-past-incident-card:last-child {
  border-bottom: none;
}

.ss-past-incident-date {
  font-size: 14px;
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 6px;
}

.ss-past-incident-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ss-past-incident-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.ss-past-incident-tag-maint {
  background: rgba(117, 149, 255, 0.15);
  color: #7595FF;
}

.ss-past-incident-tag-incident {
  background: rgba(255, 92, 92, 0.15);
  color: #FF5C5C;
}

.ss-past-incident-link {
  font-size: 14px;
  color: #7595FF;
  text-decoration: none;
}

.ss-past-incident-link:hover {
  text-decoration: underline;
}

/* Hide default Upptime UI: time selector, live status cards, rate limit prompt */
.f.changed,
div.svelte-fqsq6s.f,
.live-status,
section.svelte-fqsq6s,
.live-status ~ section,
.svelte-8lnl4f:has(.loading),
form[action*="token"],
div:has(> input[placeholder*="token"]) {
  display: none !important;
}

@media (max-width: 640px) {
  .ss-timeline-bars {
    height: 28px;
    gap: 1px;
  }

  .ss-timeline-name {
    font-size: 14px;
  }

  .ss-tooltip {
    display: none !important;
  }

  .ss-timeline-center {
    padding: 0 8px;
  }
}
