/* =========================================================
   Tazapay status page: custom CSS
   Paste into: Statuspage > Customize page > Custom CSS
   Works with statuspage-footer.html (the script adds the
   tz-* classes used below).
   ========================================================= */

:root {
  --tz-ink: #0f2329;      /* matches the logo */
  --tz-muted: #5d6676;
  --tz-line: #e2e5eb;
  --tz-wash: #f5f6f8;
  --tz-accent: #2c66d6;   /* matches the Subscribe button */
  --tz-ok: #2f8a5b;
  --tz-maint: #3b7dd8;
  --tz-degraded: #d4a017;
  --tz-partial: #e07b24;
  --tz-major: #cf3b2e;
  --tz-radius: 8px;
  --tz-incident-title: var(--tz-ink);  /* colour of past-incident titles */
}

/* ---------- Toolbar (search, filter, expand all) ---------- */
.tz-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 16px;
}
.tz-search { flex: 1 1 280px; position: relative; margin: 0; }
.tz-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px 11px 38px;
  font: inherit;
  font-size: 15px;
  color: var(--tz-ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6676' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 13px 50%;
  border: 1px solid var(--tz-line);
  border-radius: var(--tz-radius);
  outline: none;
}
.tz-search input:focus {
  border-color: var(--tz-accent);
  box-shadow: 0 0 0 3px rgba(44, 102, 214, .15);
}
.tz-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  color: var(--tz-muted);
  cursor: pointer;
}
.tz-filter input { accent-color: var(--tz-accent); margin: 0; }
.tz-toggle-all {
  font: inherit;
  font-size: 14px;
  padding: 9px 14px;
  color: var(--tz-ink);
  background: #fff;
  border: 1px solid var(--tz-line);
  border-radius: var(--tz-radius);
  cursor: pointer;
}
.tz-toggle-all:hover { background: var(--tz-wash); }
.tz-count {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
  color: var(--tz-muted);
}
.tz-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Groups ---------- */
.tz-group { position: relative; }

/* Status rail: left edge shows the worst status inside the group */
.tz-group::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--tz-ok);
  z-index: 1;
}
.tz-group[data-tz-worst="under_maintenance"]::before   { background: var(--tz-maint); }
.tz-group[data-tz-worst="degraded_performance"]::before { background: var(--tz-degraded); }
.tz-group[data-tz-worst="partial_outage"]::before      { background: var(--tz-partial); }
.tz-group[data-tz-worst="major_outage"]::before        { background: var(--tz-major); }

/* Clickable group header with chevron */
.tz-group > .component-inner-container {
  position: relative;
  padding-left: 34px !important;
  cursor: pointer;
  user-select: none;
}
.tz-group > .component-inner-container::before {
  content: "";
  position: absolute;
  left: 13px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid var(--tz-muted);
  border-bottom: 2px solid var(--tz-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .15s ease;
}
.tz-group.tz-collapsed > .component-inner-container::before {
  transform: translateY(-50%) rotate(-45deg);
}
.tz-group > .component-inner-container:focus-visible {
  outline: 2px solid var(--tz-accent);
  outline-offset: -2px;
}

/* Native +/- indicator replaced by the chevron */
.tz-group .group-parent-indicator { display: none !important; }

/* Collapse / expand */
.tz-group.tz-collapsed .child-components-container { display: none !important; }
.tz-group:not(.tz-collapsed) .child-components-container,
.tz-filtering .tz-group.tz-match .child-components-container { display: block !important; }

/* Child rows */
.tz-group .child-components-container .component-inner-container {
  padding-left: 34px !important;
}
.tz-group .child-components-container .component-inner-container:hover {
  background: var(--tz-wash);
}

/* Count badge next to the group name */
.tz-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--tz-muted);
  background: var(--tz-wash);
  border-radius: 999px;
  vertical-align: middle;
}
.tz-badge-alert { color: #8a4b00; background: #fdf0dc; }

/* ---------- Uptime bars ---------- */
.availability-time-line-graphic rect { rx: 1.5px; ry: 1.5px; }
.legend-item-uptime-value { font-weight: 600; color: var(--tz-ink); }

/* ---------- Search states ---------- */
.tz-hidden { display: none !important; }
.tz-empty {
  margin: 12px 0;
  padding: 24px 16px;
  text-align: center;
  color: var(--tz-muted);
  border: 1px dashed var(--tz-line);
  border-radius: var(--tz-radius);
}

/* ---------- Small screens and motion ---------- */
@media (max-width: 600px) {
  .tz-toolbar { gap: 8px; }
  .tz-toggle-all { flex: 1 1 auto; }
  .tz-badge { margin-left: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .tz-group > .component-inner-container::before { transition: none; }
}

/* ---------- Intro block (added by the footer script) ---------- */
.tz-intro {
  margin: 0 0 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--tz-line);
}
.tz-intro-text {
  margin: 0 0 10px;
  max-width: none;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tz-ink);
}
.tz-intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 14px;
}
.tz-intro-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--tz-accent);
  text-decoration: none;
}
.tz-intro-links a:hover { text-decoration: underline; }
.tz-intro-links a:focus-visible { outline: 2px solid var(--tz-accent); outline-offset: 2px; }

.tz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--tz-muted);
}
.tz-legend li { display: inline-flex; align-items: center; gap: 6px; }
.tz-legend li::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--tz-ok);
}
.tz-legend li[data-tz-status="degraded_performance"]::before { background: var(--tz-degraded); }
.tz-legend li[data-tz-status="partial_outage"]::before      { background: var(--tz-partial); }
.tz-legend li[data-tz-status="major_outage"]::before        { background: var(--tz-major); }
.tz-legend li[data-tz-status="under_maintenance"]::before   { background: var(--tz-maint); }

/* ---------- Past incidents (organised by the footer script) ---------- */

/* Day headings */
.status-day .date {
  font-size: 17px !important;
  font-weight: 600;
  color: var(--tz-ink);
}

/* Days with no incidents collapse to one quiet line */
.status-day.tz-quiet-day {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0 !important;
  margin: 0 !important;
}
.status-day.tz-quiet-day .date {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 14px !important;
  font-weight: 500;
  color: var(--tz-muted);
}
.status-day.tz-quiet-day p { margin: 0; font-size: 13px; color: var(--tz-muted); }

/* Each incident: coloured left edge by impact, same palette as the components */
.tz-incident {
  margin: 12px 0 16px !important;
  padding: 2px 0 2px 14px !important;
  border-left: 3px solid var(--tz-line);
}
.tz-incident[data-tz-impact="minor"]       { border-left-color: var(--tz-degraded); }
.tz-incident[data-tz-impact="major"]       { border-left-color: var(--tz-partial); }
.tz-incident[data-tz-impact="critical"]    { border-left-color: var(--tz-major); }
.tz-incident[data-tz-impact="maintenance"] { border-left-color: var(--tz-maint); }

/* Titles: replaces the yellow impact colour */
.tz-incident .incident-title,
.tz-incident .incident-title a {
  color: var(--tz-incident-title) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  text-decoration: none;
}
.tz-incident .incident-title a:hover { color: var(--tz-accent) !important; }

/* Meta line under the title */
.tz-incident-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 6px 0 4px;
  font-size: 13px;
  color: var(--tz-muted);
}
.tz-impact {
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  border-radius: 999px;
  color: var(--tz-muted);
  background: var(--tz-wash);
}
.tz-incident[data-tz-impact="minor"] .tz-impact       { color: #7a5a00; background: #fbf1d3; }
.tz-incident[data-tz-impact="major"] .tz-impact       { color: #8a4508; background: #fce6d4; }
.tz-incident[data-tz-impact="critical"] .tz-impact    { color: #8f2219; background: #f9dcd9; }
.tz-incident[data-tz-impact="maintenance"] .tz-impact { color: #22508f; background: #dde9f8; }

.tz-updates-toggle {
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--tz-accent);
  background: none;
  border: 0;
  cursor: pointer;
}
.tz-updates-toggle:hover { text-decoration: underline; }
.tz-updates-toggle:focus-visible { outline: 2px solid var(--tz-accent); outline-offset: 2px; }

/* Update list */
.tz-incident-collapsed .tz-updates { display: none !important; }
.tz-updates { margin-top: 8px; }
.tz-updates > * { margin: 0 0 10px !important; font-size: 14px; line-height: 1.5; color: var(--tz-ink); }
.tz-updates small { display: block; margin-top: 2px; font-size: 12px; color: var(--tz-muted); }

/* ---------- Optional top bar (statuspage-header.html) ---------- */
.tz-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--tz-line);
}
.tz-topbar a { color: var(--tz-muted); text-decoration: none; }
.tz-topbar a:hover { color: var(--tz-accent); }
.tz-topbar-links { display: flex; gap: 16px; }

/* ---------- Incident categories (cards) ---------- */
.tz-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0 28px;
}
.tz-cat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  font: inherit;
  text-align: left;
  color: var(--tz-ink);
  background: #fff;
  border: 1px solid var(--tz-line);
  border-radius: 10px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.tz-cat:hover {
  border-color: var(--tz-accent);
  background: #f3f6fd;
}
.tz-cat:focus-visible { outline: 2px solid var(--tz-accent); outline-offset: 2px; }

.tz-cat-name { font-size: 15px; font-weight: 600; }

.tz-cat-count { font-size: 14px; font-weight: 500; }
.tz-cat-last  { font-size: 12px; color: var(--tz-muted); }
.tz-cat-zero .tz-cat-count { color: var(--tz-muted); font-weight: 400; }

/* Selected card: filled */
.tz-cat[aria-pressed="true"] {
  color: #fff;
  background: var(--tz-accent);
  border-color: var(--tz-accent);
  box-shadow: 0 6px 16px rgba(44, 102, 214, .28);
}
.tz-cat[aria-pressed="true"] .tz-cat-count,
.tz-cat[aria-pressed="true"].tz-cat-zero .tz-cat-count { color: #fff; }
.tz-cat[aria-pressed="true"] .tz-cat-last { color: rgba(255, 255, 255, .82); }

@media (max-width: 600px) {
  .tz-cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tz-cat { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tz-cat { transition: none; }
}

/* ---------- Overall polish ---------- */
body { color: var(--tz-ink); -webkit-font-smoothing: antialiased; }

/* Section headings */
.components-section + * h2,
.incidents-list > h2,
h2.font-largest {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -.01em;
  color: var(--tz-ink) !important;
}

/* Status banner: softer corners, calmer weight */
.page-status {
  border-radius: 10px !important;
  box-shadow: none !important;
}
.page-status .status { font-weight: 600 !important; letter-spacing: -.01em; }

/* Component list: rounded outer edge */
.components-container { border-radius: 10px; overflow: hidden; }

/* Incidents: roomier rows, separator between incidents on the same day */
.tz-incident { padding: 10px 0 10px 16px !important; }
.tz-incident + .tz-incident { margin-top: 4px !important; }
.status-day:not(.tz-quiet-day) .date {
  padding-bottom: 8px !important;
  margin-bottom: 4px !important;
}
.tz-updates {
  padding: 10px 14px;
  background: var(--tz-wash);
  border-radius: 8px;
}
.tz-updates > *:last-child { margin-bottom: 0 !important; }

/* Subscribe button: sentence case instead of spaced capitals */
.show-updates-dropdown {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* ---------- Sub-groups inside a group (e.g. Payment Methods > QR Payments) ---------- */
.tz-sub { position: relative; border-top: 1px solid var(--tz-line); }
.tz-sub::before {                    /* status rail */
  content: "";
  position: absolute;
  left: 18px; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--tz-ok);
}
.tz-sub[data-tz-worst="under_maintenance"]::before    { background: var(--tz-maint); }
.tz-sub[data-tz-worst="degraded_performance"]::before { background: var(--tz-degraded); }
.tz-sub[data-tz-worst="partial_outage"]::before       { background: var(--tz-partial); }
.tz-sub[data-tz-worst="major_outage"]::before         { background: var(--tz-major); }
.tz-sub:not(.tz-collapsed)::before { bottom: auto; height: 32px; }

.tz-sub-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  width: 100%;
  padding: 14px 20px 14px 52px;
  font: inherit;
  text-align: left;
  color: var(--tz-ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.tz-sub-head:hover { background: var(--tz-wash); }
.tz-sub-head:focus-visible { outline: 2px solid var(--tz-accent); outline-offset: -2px; }
.tz-sub-head::after {                /* chevron */
  content: "";
  position: absolute;
  left: 32px; top: 50%;
  width: 6px; height: 6px;
  border-right: 2px solid var(--tz-muted);
  border-bottom: 2px solid var(--tz-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .15s ease;
}
.tz-sub.tz-collapsed > .tz-sub-head::after { transform: translateY(-50%) rotate(-45deg); }
.tz-sub-name { font-size: 15px; font-weight: 600; }
.tz-sub-head .tz-badge { margin-left: 0; }
.tz-sub-state { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--tz-ok); }
.tz-sub[data-tz-worst="degraded_performance"] .tz-sub-state { color: #9a7300; }
.tz-sub[data-tz-worst="partial_outage"] .tz-sub-state       { color: #b35b12; }
.tz-sub[data-tz-worst="major_outage"] .tz-sub-state         { color: var(--tz-major); }
.tz-sub[data-tz-worst="under_maintenance"] .tz-sub-state    { color: var(--tz-maint); }

.tz-sub-body .component-inner-container {
  padding-left: 52px !important;
  border-top: 1px solid var(--tz-line);
}
.tz-sub.tz-collapsed > .tz-sub-body { display: none; }
.tz-filtering .tz-sub.tz-match > .tz-sub-body { display: block !important; }

/* ---------- Sub-group chips in Past Incidents ---------- */
.tz-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 22px;
}
.tz-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--tz-ink);
  background: #fff;
  border: 1px solid var(--tz-line);
  border-radius: 999px;
  cursor: pointer;
}
.tz-chip:hover { border-color: var(--tz-accent); }
.tz-chip:focus-visible { outline: 2px solid var(--tz-accent); outline-offset: 2px; }
.tz-chip-count { font-size: 12px; color: var(--tz-muted); }
.tz-chip[aria-pressed="true"] { color: var(--tz-accent); background: #eaf0fc; border-color: var(--tz-accent); }
.tz-chip[aria-pressed="true"] .tz-chip-count { color: var(--tz-accent); }

@media (max-width: 600px) {
  .tz-sub-state { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tz-sub-head::after { transition: none; }
}