/* Premium manual-check UI — a compact delivery toolbar + inline status pills.
   No modal, no drawer. Scoped under .qa- / #qa- so Swagger styles stay intact. */

/* ---- Compact delivery toolbar ------------------------------------------ */
.qa-summary-minimal {
  display: block;
  width: calc(100% - 52px);
  max-width: 1128px;
  box-sizing: border-box;
  margin: 8px auto 0;
  padding: 8px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px -24px rgba(15, 28, 49, .5);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #172944;
  overflow: hidden;
}

.qa-summary-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: none;
  margin: 0;
}
.qa-summary-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qa-summary-title { font-size: .8rem; font-weight: 820; letter-spacing: -.01em; color: #172944; white-space: nowrap; }
.qa-summary-sub { display: none; }

.qa-summary-actions { display: flex; gap: 5px; flex: none; flex-wrap: nowrap; }
.qa-summary-toggle,
.qa-export-button {
  flex: none;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  background: #f7f9fc;
  color: #36516f;
  font: 750 .66rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.qa-summary-toggle { border-color: #b8c9dc; background: #edf4fb; color: #264f7c; }
.qa-summary-toggle:hover,
.qa-export-button:hover { background: #fff; border-color: #91a8c2; color: #183f6b; }

/* Stats chips on dark panel. */
.qa-summary-stats {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.qa-summary-stats::-webkit-scrollbar { display: none; }
.qa-summary-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #e0e7ef;
  border-radius: 999px;
  background: #f7f9fc;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.qa-summary-stat:hover { background: #fff; border-color: #aebfd2; }
.qa-summary-stat:focus-visible,
.qa-filter-option:focus-visible,
.qa-filter-reset:focus-visible {
  outline: 2px solid #ff9f34;
  outline-offset: 2px;
}
.qa-summary-stat.is-active {
  border-color: #7896b7;
  box-shadow: inset 0 -2px 0 #f3a14b;
}
.qa-stat-label { font-size: .62rem; color: #75849a; font-weight: 650; }
.qa-stat-val { font-size: .7rem; font-weight: 820; color: #254c79; }

/* Fully Checked (Ready for QA): emphasized green chip so it reads apart from the rest. */
.qa-summary-stat.qa-stat-full {
  background: #eef9f5;
  border-color: #b9e1d2;
  box-shadow: none;
}
.qa-summary-stat.qa-stat-full .qa-stat-label { color: #24805f; }
.qa-summary-stat.qa-stat-full .qa-stat-val { color: #147251; font-size: .74rem; }

/* ---- Combined BR1 / BR2 filters ---------------------------------------- */
.qa-summary-filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: none;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid #e4eaf1;
}
.qa-summary-filterbar[hidden] { display: none; }
.qa-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.qa-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 30px;
  padding: 3px;
  border: 1px solid #dce4ee;
  border-radius: 9px;
  background: #f3f6fa;
}
.qa-filter-label {
  padding: 0 7px;
  color: #5f7088;
  font-size: .72rem;
  font-weight: 800;
}
.qa-filter-option {
  min-width: 58px;
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #708096;
  font: 700 .68rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: color .14s ease, background .14s ease;
}
.qa-filter-option:hover { color: #244d7a; background: #fff; }
.qa-filter-option.is-active {
  color: #fff;
  background: #344d70;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.qa-filter-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
}
.qa-filter-results {
  color: #748399;
  font-size: .72rem;
  font-weight: 650;
  white-space: nowrap;
}
.qa-filter-reset {
  height: 28px;
  padding: 0 9px;
  border: 1px solid #d7e0ea;
  border-radius: 7px;
  background: transparent;
  color: #53677f;
  font: 700 .68rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.qa-filter-reset:hover:not(:disabled) { border-color: #d78d3f; color: #a95e19; }
.qa-filter-reset:disabled { opacity: .38; cursor: default; }

.swagger-ui .opblock.qa-filter-hidden,
.swagger-ui .opblock-tag-section.qa-filter-empty {
  display: none !important;
}

/* ---- Inline endpoint pills (two reviewers: BR1 / BR2) ------------------- */
.qa-check-group {
  margin-inline-start: auto;   /* push the pair to the right side of the row */
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.qa-endpoint-check {
  align-self: center;
  flex: none;
  box-sizing: border-box;
  min-width: 72px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 12px "Segoe UI", system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.qa-endpoint-check.unchecked {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}
.qa-endpoint-check.unchecked:hover {
  border-color: #94a3b8;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .1);
}
.qa-endpoint-check.checked {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.qa-endpoint-check.checked:hover {
  border-color: #6ee7b7;
  box-shadow: 0 1px 4px rgba(4, 120, 87, .18);
}
.qa-endpoint-check:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(51, 85, 209, .25); }
.qa-endpoint-check.qa-busy { opacity: .55; cursor: default; }

/* ---- Toast -------------------------------------------------------------- */
.qa-toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 100000;
  max-width: 340px; padding: 10px 14px; border-radius: 9px;
  background: #0f172a; color: #fff;
  font: 600 .82rem "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.qa-toast-show { opacity: 1; transform: translateY(0); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .qa-summary-header { grid-template-columns: auto minmax(0, 1fr); }
  .qa-summary-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 640px) {
  .qa-summary-minimal { width: calc(100% - 24px); padding: 9px; }
  .qa-summary-header { grid-template-columns: 1fr; align-items: stretch; }
  .qa-summary-actions { grid-column: auto; justify-content: stretch; }
  .qa-summary-actions > button { flex: 1 1 auto; }
  .qa-summary-stat { justify-content: center; }
  .qa-summary-filterbar { align-items: stretch; flex-direction: column; }
  .qa-filter-controls { align-items: stretch; flex-direction: column; }
  .qa-filter-group { width: 100%; box-sizing: border-box; }
  .qa-filter-option { flex: 1; }
  .qa-filter-meta { justify-content: space-between; }
  .qa-check-group { margin-right: 6px; gap: 4px; }
  .qa-endpoint-check { min-width: 64px; }
}
