/* Aureum status page.
   Metrics taken from the status.io page template: 928px container, Lato,
   14px/#363434 body text, #27ae60 operational, 4px panel corners. */

:root {
  --text: #363434;
  --muted: #9b9b9b;
  --border: #c9c9c9;
  --sep: #dddddd;

  --operational: #27ae60;
  --degraded: #ffa837;
  --partial: #ffa837;
  --major: #e74c3c;
  --maintenance: #3498db;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 60px;
  background: #fff;
  color: var(--text);
  font: 400 14px/20px Lato, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h3, p { margin: 0; }

.container {
  width: 928px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- Logo ---------------------------------------------------------------- */

.logo {
  margin: 30px 0 25px;
  text-align: center;
  line-height: 1;
}
.logo-img {
  height: 92px;
  max-width: 100%;
}

/* --- Panels -------------------------------------------------------------- */

.panel {
  margin: 0 0 20px;
  border-radius: 4px;
}
.panel > .panel-body {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }

/* --- Overall status bar -------------------------------------------------- */

.top-bar > .panel-body {
  border: 0;
  color: #fff;
}
.top-bar[data-status="operational"] > .panel-body { background: var(--operational); }
.top-bar[data-status="degraded"] > .panel-body { background: var(--degraded); }
.top-bar[data-status="partial"] > .panel-body { background: var(--partial); }
.top-bar[data-status="major"] > .panel-body { background: var(--major); }
.top-bar[data-status="maintenance"] > .panel-body { background: var(--maintenance); }

/* 15px padding + a 22px line box gives the 52px bar in the reference. */
.top-bar strong { font-size: 18px; font-weight: 700; line-height: 22px; }
.top-bar .updated { font-size: 16px; line-height: 22px; text-align: right; }

/* --- Component list ------------------------------------------------------ */

.components { padding: 0 !important; }

.group { padding: 10px 0 12px; }
.group + .group { border-top: 1px solid var(--sep); }

.group-head {
  display: block; width: 100%;
  padding: 0 11px;
  border: 0; background: none; text-align: left;
  font: inherit; color: var(--text);
  cursor: pointer;
}
.group-name { font-size: 17px; line-height: 24px; }
.caret {
  display: inline-block; width: 12px;
  font-size: 17px; line-height: 24px;
  transition: transform .15s ease;
}
.group[data-open="false"] .caret { transform: rotate(-90deg); }
.group[data-open="false"] .group-items { display: none; }

.component {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 15px; height: 30px;
}
.component-name { margin-left: 21px; font-size: 14px; }
.component-status { margin-right: 20px; font-size: 17px; white-space: nowrap; }

.component-status[data-status="operational"] { color: var(--operational); }
.component-status[data-status="degraded"] { color: var(--degraded); }
.component-status[data-status="partial"] { color: var(--partial); }
.component-status[data-status="major"] { color: var(--major); }
.component-status[data-status="maintenance"] { color: var(--maintenance); }

/* --- History ------------------------------------------------------------- */

.history-title {
  margin: 20px 0 10px;
  font-size: 20px; font-weight: 400; line-height: 22px;
  color: var(--muted);
}

.incident { margin: 0 0 20px; }

.incident-head {
  display: flex; align-items: center; justify-content: space-between; gap: 15px;
  padding: 10px 15px;
  border-radius: 3px 3px 0 0;
  color: #fff;
}
.incident[data-status="operational"] .incident-head { background: var(--operational); }
.incident[data-status="degraded"] .incident-head { background: var(--degraded); }
.incident[data-status="partial"] .incident-head { background: var(--partial); }
.incident[data-status="major"] .incident-head { background: var(--major); }
.incident[data-status="maintenance"] .incident-head { background: var(--maintenance); }

.incident-title { font-size: 16px; font-weight: 500; line-height: 20px; }
a.incident-title { color: #fff; text-decoration: none; }
a.incident-title:hover { text-decoration: underline; }

.back-link { margin: 0 0 15px; font-size: 14px; }
.back-link a { color: var(--muted); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

.incident-detail-status {
  display: inline-block;
  margin-bottom: 15px;
  padding: 4px 10px;
  border-radius: 3px;
  color: #fff;
  font-size: 14px; font-weight: 700;
}
.incident-detail-status[data-status="operational"] { background: var(--operational); }
.incident-detail-status[data-status="degraded"] { background: var(--degraded); }
.incident-detail-status[data-status="partial"] { background: var(--partial); }
.incident-detail-status[data-status="major"] { background: var(--major); }
.incident-detail-status[data-status="maintenance"] { background: var(--maintenance); }

.incident-detail-title { margin: 0 0 10px; font-size: 28px; font-weight: 700; }
.incident-head-status { font-size: 16px; line-height: 20px; white-space: nowrap; }

.incident-body {
  padding: 15px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  background: #fff;
}

.meta { display: flex; margin-bottom: 10px; }
.meta-label {
  flex: 0 0 142px;
  padding-right: 10px;
  font-size: 16px; line-height: 23px;
  white-space: nowrap;
}
.meta-value { font-size: 14px; line-height: 23px; color: var(--muted); }

.incident-rule {
  height: 0; margin: 25px 0 20px;
  border: 0; border-top: 1px solid var(--sep);
}

.update { display: flex; gap: 15px; padding-bottom: 22px; }
.update:last-child { padding-bottom: 0; }
.update-time {
  flex: 0 0 284px;
  font-size: 12px; font-weight: 700; line-height: 17px;
  color: var(--muted);
}
.update-main { flex: 1; min-width: 0; }
.update-stage {
  font-size: 14px; font-weight: 700; line-height: 20px;
  text-transform: uppercase;
}
.dot {
  display: inline-block; width: 8px; height: 8px;
  margin-right: 6px; border-radius: 50%;
  vertical-align: middle;
}
.dot[data-status="operational"] { background: var(--operational); }
.dot[data-status="degraded"] { background: var(--degraded); }
.dot[data-status="partial"] { background: var(--partial); }
.dot[data-status="major"] { background: var(--major); }
.dot[data-status="maintenance"] { background: var(--maintenance); }

.update-body { margin-top: 8px; font-size: 14px; line-height: 20px; color: #555; }

.no-incidents { color: var(--muted); font-size: 14px; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 767px) {
  .logo { margin: 20px 0; }
  .logo-img { height: 48px; }
  .top-bar .updated { display: none; }
  .component-name { margin-left: 25px; }
  .component-status { font-size: 14px; }
  .update { display: block; }
  .update-time { display: block; margin-bottom: 6px; }
}
