/* ================================
   Frontline Statuspage - Clean Product Grid
   Does NOT style:
   - Logo
   - Header / masthead
   - Subscribe to Updates button
   - Page width / container width
   - Main status banner colors
   - Default Atlassian status legend/key
   ================================ */

:root {
  --fl-plum-dark: #402b56;
  --fl-plum: #682a6d;
  --fl-salt: #f1f3f5;
  --fl-border: #d5dbe0;
  --fl-text: #15181d;
  --fl-white: #ffffff;
}

/* Keep Atlassian's native operational / incident banner colors */
.status-index .page-status {
  margin-bottom: 28px !important;
}

/* Remove any leftover custom legend from previous testing */
.fl-status-legend {
  display: none !important;
}

/* ================================
   Product table card
   ================================ */

.components-section {
  background: var(--fl-white) !important;
  border: 1px solid var(--fl-border) !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

/* Purple table header */
.components-section::before {
  content: "Product Area Status";
  display: block;
  background: var(--fl-plum-dark);
  color: var(--fl-white);
  font-size: 18px;
  font-weight: 700;
  padding: 15px 22px;
}

/* Force the component area into a clean 3-column grid */
.components-container {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  border-top: none !important;
}

/* Each product cell */
.component-container {
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 60px !important;

  background: var(--fl-white) !important;
  box-sizing: border-box !important;
  padding: 14px 18px !important;

  border-top: none !important;
  border-left: none !important;
  border-right: 1px solid var(--fl-border) !important;
  border-bottom: 1px solid var(--fl-border) !important;

  float: none !important;
  position: relative !important;
  vertical-align: middle !important;
}

/* Remove right border on every third cell */
.component-container:nth-child(3n) {
  border-right: none !important;
}

.component-container:hover {
  background: var(--fl-salt) !important;
}

/* Make the inside of each component cell align name left + checkmark right */
.component-container .component-inner-container,
.component-container > div,
.component-container > a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 32px !important;
}

/* Product names: wrap cleanly but leave room for the checkmark */
.component-container .name,
.component-container .component-name,
.components-container .name,
.components-container .component-name {
  color: var(--fl-text) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;

  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;

  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;

  padding: 0 !important;
  margin: 0 !important;
}

/* Hide the status text but keep the icon/checkmark aligned right */
.component-container .component-status {
  position: static !important;
  float: none !important;
  transform: none !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  flex: 0 0 18px !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;

  margin: 0 0 0 auto !important;
  padding: 0 !important;

  font-size: 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

/* Restore icon/check size after hiding the status text */
.component-container .component-status::before,
.component-container .component-status i,
.component-container .component-status svg,
.component-container .component-status .icon-indicator,
.component-container .component-status .status-icon {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  margin: 0 !important;
}

/* Hide incident history and past incident sections */
.incidents-list,
.past-incidents,
.history-footer-link,
a[href="/history"],
a[href$="/history"],
a[href*="/history"] {
  display: none !important;
}

/* Mobile: switch to one clean column */
@media screen and (max-width: 650px) {
  .components-container {
    grid-template-columns: 1fr !important;
  }

  .component-container {
    min-height: 56px !important;
    padding: 14px 16px !important;
    border-right: none !important;
  }

  .components-section::before {
    font-size: 17px;
    padding: 14px 18px;
  }
}