* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure full control inside iframe */
html, body {
  font-family: sans-serif;
  background: #fff;
  color: #333;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.2rem;
  margin: 0;
}

h2 {
  color: #333366;
  font-size: 1.5rem;
}

/* Container for all services */
.services-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  text-align: center;
  overflow-x: auto;
  padding-bottom: 0.1rem; /* avoid extra space */
}

/* Individual service block */
.service {
  width: 18%;
  flex: 0 0 auto;
  padding: 0.3rem;
  background: #F0F0F0;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Service header */
.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6rem;
  margin-bottom: 0.1rem;
}

.service-header h2 {
  margin: 0;
  font-size: 0.5rem;
  font-weight: bold;
  color: #333;
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 1.2em;
}

/* Status badge */
.status {
  padding: 0.1em 0.25em;
  font-size: 0.75rem;
  border-radius: 1px;
  font-weight: bold;
  white-space: nowrap;
}

.status.operational {
  background: #d4edda;
  color: #155724;
}

.status.degraded {
  background: #fff3cd;
  color: #856404;
}

.status.down {
  background: #f8d7da;
  color: #721c24;
}

/* History container */
.history {
  display: flex;
  gap: 1px;
  flex-wrap: nowrap;
  justify-content: center;
  overflow-x: hidden;
  padding: 0.2rem 0;
  margin-bottom: 0.2rem;
}

/* Daily status bars */
.day {
  width: 5px;
  height: 5px;
  border-radius: 0.1px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.day:hover {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
  filter: brightness(1.3);
}

.day.operational {
  background: #28a745;
}

.day.degraded {
  background: #ffc107;
}

.day.down {
  background: #dc3545;
}

/* History labels */
.history-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #777;
  margin-top: 0.1rem;
  margin-bottom: 0 !important;
}

/* Responsive: stack on mobile */
@media (max-width: 700px) {
  .services-container {
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
  }

  .service {
    width: 100%;
    padding: 0.1rem;
    margin-bottom: 0.1rem;
  }

  .history,
  .history-labels {
    display: none;
  }
}
