/* ZebraByte Status overview focus layer.
 * The overview is an executive summary; Services and Incidents own the detail.
 */

/* Overview previews are intentionally short. */
.view[data-view="status"] #maintenance-preview .event-row:nth-child(n+2),
.view[data-view="status"] #events-preview .event-row:nth-child(n+3) {
  display: none !important;
}

.view[data-view="status"] #events-preview .event-message {
  display: none !important;
}

.view[data-view="status"] #events-preview .event-row {
  padding-top: 16px;
  padding-bottom: 17px;
}

.view[data-view="status"] #events-preview .event-title {
  margin-top: 3px;
}

.view[data-view="status"] #events-preview .event-affected {
  margin-top: 7px;
}

/* Overview actions should read as navigation, not passive underlined copy. */
.view[data-view="status"] .section-heading .text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 3px 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.view[data-view="status"] .section-heading .text-link::after {
  content: "›";
  display: inline-block;
  color: var(--green);
  font-size: 21px;
  font-weight: 420;
  line-height: .8;
  transform: translateY(-1px);
  transition: transform .16s ease;
}

.view[data-view="status"] .section-heading .text-link:hover,
.view[data-view="status"] .section-heading .text-link:focus-visible {
  color: var(--green);
}

.view[data-view="status"] .section-heading .text-link:hover::after,
.view[data-view="status"] .section-heading .text-link:focus-visible::after {
  transform: translate(3px, -1px);
}

/* Category overview must not resemble the technical Services table. */
.view[data-view="status"] .category-overview-section {
  padding-top: 32px;
  padding-bottom: 34px;
}

.view[data-view="status"] .category-overview-heading {
  margin-bottom: 13px;
}

.view[data-view="status"] .category-summary-root {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
}

.view[data-view="status"] .category-summary-row {
  display: flex;
  min-width: 0;
  min-height: 84px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px 16px;
  border: 0;
  border-right: 1px solid var(--border);
}

.view[data-view="status"] .category-summary-row:first-child {
  padding-left: 0;
}

.view[data-view="status"] .category-summary-row:last-child {
  padding-right: 0;
  border-right: 0;
}

.view[data-view="status"] .category-summary-copy h3 {
  font-size: 13px;
  line-height: 1.35;
}

.view[data-view="status"] .category-summary-meta {
  margin-top: 4px;
  font-size: 9.5px;
}

.view[data-view="status"] .category-summary-state {
  min-width: 0;
  justify-content: flex-start;
  font-size: 9.5px;
}

.view[data-view="status"] .category-summary-issue {
  font-size: 9.5px;
}

/* Keep sections editorial rather than stacking full data tables. */
.view[data-view="status"] .recent-section {
  padding-top: 32px;
  padding-bottom: 36px;
}

@media (max-width: 680px) {
  /* The hero should state the situation, not consume half the screen. */
  .view[data-view="status"] .overall {
    min-height: 0;
    padding-top: 30px;
    padding-bottom: 26px;
    gap: 20px;
  }

  .view[data-view="status"] .overall-copy h1 {
    font-size: 23px;
    line-height: 1.17;
  }

  .view[data-view="status"] .overall-description {
    margin-top: 10px;
    line-height: 1.55;
  }

  .view[data-view="status"] .overall-actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .view[data-view="status"] .updated-at {
    text-align: right;
    font-size: 9.5px;
  }

  /* One next maintenance item is enough on the overview. */
  .view[data-view="status"] .maintenance-section {
    padding-top: 24px;
    padding-bottom: 26px;
  }

  .view[data-view="status"] .maintenance-section-heading,
  .view[data-view="status"] .category-overview-heading,
  .view[data-view="status"] .recent-section .section-heading {
    margin-bottom: 11px;
  }

  .view[data-view="status"] .maintenance-section-heading p:not(.section-kicker),
  .view[data-view="status"] .category-overview-heading p,
  .view[data-view="status"] .recent-section .section-heading p {
    display: none;
  }

  /* Cloudflare-like "View all" hierarchy, while keeping ZebraByte styling. */
  .view[data-view="status"] .maintenance-section-heading,
  .view[data-view="status"] .category-overview-heading,
  .view[data-view="status"] .recent-section .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .view[data-view="status"] .section-heading .text-link {
    min-height: 34px;
    margin-top: 0;
    font-size: 11px;
    justify-self: end;
  }

  .view[data-view="status"] .maintenance-preview .event-row {
    padding-top: 13px;
    padding-bottom: 14px;
  }

  /* Compact status index: visually distinct from /monitors. */
  .view[data-view="status"] .category-overview-section {
    padding-top: 24px;
    padding-bottom: 22px;
  }

  .view[data-view="status"] .category-summary-root {
    display: block;
    border-bottom: 0;
  }

  .view[data-view="status"] .category-summary-row,
  .view[data-view="status"] .category-summary-row:first-child,
  .view[data-view="status"] .category-summary-row:last-child {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0 13px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .view[data-view="status"] .category-summary-row:last-child {
    border-bottom: 0;
  }

  .view[data-view="status"] .category-summary-copy h3 {
    font-size: 12.5px;
  }

  .view[data-view="status"] .category-summary-meta {
    margin-top: 2px;
    font-size: 9px;
  }

  .view[data-view="status"] .category-summary-state {
    align-self: center;
    font-size: 9px;
  }

  .view[data-view="status"] .recent-section {
    padding-top: 22px;
    padding-bottom: 28px;
  }

  .view[data-view="status"] #events-preview .event-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 13px 0 14px;
  }

  .view[data-view="status"] #events-preview .event-date {
    grid-column: 1;
    grid-row: 1;
    font-size: 9.5px;
  }

  .view[data-view="status"] #events-preview .event-main {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .view[data-view="status"] #events-preview .event-state {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    font-size: 9.5px;
  }

  .view[data-view="status"] #events-preview .event-kind {
    display: none;
  }

  .view[data-view="status"] #events-preview .event-title {
    margin-top: 0;
    font-size: 13px;
  }

  .view[data-view="status"] #events-preview .event-affected {
    margin-top: 5px;
    font-size: 9.5px;
  }
}
