/* --- header button ------------------------------------------------ */
.iv-fab {
  margin-left: auto;
  margin-right: 55px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #7ac943, #4e9e22);
  color: #06210b;
  border: 0;
  border-radius: 30px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45),
              0 0 0 0 rgba(122, 201, 67, 0.5);
  animation: iv-fab-ring 2.6s ease-out 3;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.iv-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.iv-fab:active   { transform: translateY(0); }
.iv-fab:focus-visible { outline: 2px solid #eaeaea; outline-offset: 3px; }

/* A few slow rings on load to catch the eye, then it settles. */
@keyframes iv-fab-ring {
  0%   { box-shadow: 0 3px 12px rgba(0,0,0,0.45), 0 0 0 0   rgba(122,201,67,0.5); }
  70%  { box-shadow: 0 3px 12px rgba(0,0,0,0.45), 0 0 0 13px rgba(122,201,67,0); }
  100% { box-shadow: 0 3px 12px rgba(0,0,0,0.45), 0 0 0 0   rgba(122,201,67,0); }
}

.iv-fab-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(6, 33, 11, 0.22);
  font-size: 10px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .iv-fab { animation: none; }
}

@media (max-width: 900px) {
  .iv-fab { margin: 12px 0 0 0; justify-content: center; }
}

/* --- overlay and dialog ------------------------------------------- */
.iv-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 9999;
}
.iv-overlay.iv-open { display: flex; }

.iv-box {
  background: #0f0f0f;
  border: 1px solid #00ff88;
  border-radius: 12px;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.2);
  animation: iv-fade 0.3s ease;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

@keyframes iv-fade {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .iv-box { animation: none; }
}

.iv-head {
  position: relative;
  padding: 20px 26px 14px;
  border-bottom: 1px solid #1f1f1f;
}
.iv-head h2 {
  margin: 0;
  font-size: 19px;
  color: #00ff88;
}
.iv-status {
  margin-top: 5px;
  font-size: 13px;
  color: #bbb;
}

.iv-body {
  padding: 4px 16px 14px;
  overflow-y: auto;
}

.iv-foot {
  padding: 14px 26px;
  border-top: 1px solid #1f1f1f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- result rows --------------------------------------------------- */
.iv-section {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #7ac943;
  padding: 18px 10px 7px;
  border-bottom: 1px solid #1f1f1f;
}

.iv-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 10px;
  border-bottom: 1px solid #161616;
}
.iv-row:last-child { border-bottom: 0; }

/* Each row fades in as it is revealed. */
.iv-reveal { animation: iv-row-in 0.22s ease both; }
@keyframes iv-row-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .iv-reveal { animation: none; }
}

.iv-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  margin-top: 1px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.iv-text { flex: 1; min-width: 0; }
.iv-text b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #eaeaea;
}
.iv-text span {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.55;
  color: #999;
  font-family: Consolas, 'Courier New', monospace;
  word-break: break-all;
}

/* A small link on a row that has a downloadable file behind it. */
.iv-dl {
  display: inline-block;
  vertical-align: middle;
  margin-top: 3px;
  margin-left: 12px;
  padding: 2px 9px;
  border: 1px solid #2f6a1c;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #7ac943;
  text-decoration: none;
  cursor: pointer;
  transition: 0.15s;
}
.iv-dl:before { content: '\2193'; margin-right: 5px; }
.iv-dl:hover  { background: #7ac943; color: #0b0b0b; border-color: #7ac943; }

.iv-dl-busy {
  border-color: #1e88e5;
  color: #6ab0f3;
  cursor: default;
}
.iv-dl-busy:hover { background: none; color: #6ab0f3; border-color: #1e88e5; }
.iv-dl-done { border-color: #7ac943; background: rgba(122, 201, 67, 0.12); }
.iv-dl-fail { border-color: #e5534b; color: #e5534b; }
.iv-dl-fail:hover { background: none; color: #e5534b; border-color: #e5534b; }
/* The arrow only makes sense on the idle button. */
.iv-dl-busy:before, .iv-dl-done:before, .iv-dl-fail:before { content: none; }

.iv-pill {
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* Status colours, shared by the icon and the pill */
.iv-pass { background: rgba(122, 201, 67, 0.15);  color: #7ac943; }
.iv-fail { background: rgba(229, 83, 75, 0.15);   color: #e5534b; }
.iv-warn { background: rgba(217, 164, 65, 0.15);  color: #d9a441; }
.iv-skip { background: rgba(140, 140, 140, 0.15); color: #8c8c8c; }
.iv-info { background: rgba(160, 160, 160, 0.13); color: #aaa;    }

/* --- verdict and footer buttons ------------------------------------ */
.iv-verdict { font-size: 14px; font-weight: 700; }
.iv-verdict.iv-ok  { color: #7ac943; }
.iv-verdict.iv-bad { color: #e5534b; }
.iv-verdict.iv-na  { color: #d9a441; }
.iv-counts {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: #888;
}

.iv-actions { display: flex; gap: 10px; }

.iv-action {
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid #00ff88;
  background: #00ff88;
  color: #0b0b0b;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  display: inline-block;
}
.iv-action:hover { background: #00cc6a; border-color: #00cc6a; }

.iv-action.iv-ghost {
  background: transparent;
  color: #00ff88;
}
.iv-action.iv-ghost:hover { background: #00ff88; color: #0b0b0b; }

/* --- the "setup needed" / "not installed" panel --------------------- */
.iv-notice {
  margin: 16px 6px;
  padding: 20px 22px;
  border-radius: 10px;
  background: rgba(217, 164, 65, 0.08);
  border: 1px solid rgba(217, 164, 65, 0.35);
  text-align: center;
}
.iv-notice-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #d9a441;
  margin-bottom: 8px;
}
.iv-notice p {
  margin: 0 auto 14px;
  max-width: 62ch;
  font-size: 13.5px;
  line-height: 1.7;
  color: #bbb;
}
.iv-hint { display: block; margin-top: 12px; font-size: 12.5px; color: #999; }
/* --- pending state and reveal ------------------------------------- */

/* Progress counter beside the status line */
.iv-progress {
  margin-left: 10px;
  padding: 1px 8px;
  border-radius: 20px;
  background: rgba(122, 201, 67, 0.12);
  color: #7ac943;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}
.iv-progress:empty { display: none; }

/* A row that has not resolved yet. Blue, matching the desktop Diagnose
   dialog, which shows a running check as a blue pill. */
.iv-checking { background: rgba(30, 136, 229, 0.16); color: #6ab0f3; }

.iv-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6ab0f3;
  display: block;
  animation: iv-pulse 0.9s ease-in-out infinite;
}
@keyframes iv-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1); }
}

/* The moment a row resolves: a small settle, not a bounce */
.iv-settle { animation: iv-settle-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes iv-settle-in {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

/* Nothing to show while the row is CHECKING, so the row does not nudge */
.iv-detail:empty { display: none; }

/* Failures keep a left edge so they stay findable when scrolling back */
.iv-row-fail { box-shadow: inset 2px 0 0 #e5534b; }

@media (prefers-reduced-motion: reduce) {
  .iv-dot    { animation: none; opacity: 0.6; }
  .iv-settle { animation: none; }
}

/* --- progress bar under the header -------------------------------- */
/* The machine this ran on - context, not a check, so it sits quietly in the
   top right of the header rather than among the results. */
.iv-os {
  position: absolute;
  top: 22px;
  right: 26px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 45%;
  font-size: 11.5px;
  color: #777;
  font-family: Consolas, 'Courier New', monospace;
  text-align: right;
}
.iv-os:empty { display: none; }
.iv-os-ico {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #262626;
  color: #999;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.iv-bar {
  height: 2px;
  background: #1a1a1a;
  overflow: hidden;
}
.iv-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #7ac943;
  transition: width 0.25s ease;
}
.iv-bar.iv-done i { background: #00ff88; }
.iv-bar.iv-bad i  { background: #e5534b; }

/* --- outcome shown on the dialog edge ------------------------------ */
/* The border colour answers "did it pass?" before any text is read. */
.iv-box.iv-ok-box {
  border-color: #00ff88;
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.28);
}
.iv-box.iv-bad-box {
  border-color: #e5534b;
  box-shadow: 0 0 28px rgba(229, 83, 75, 0.25);
}

/* --- the verdict arriving ------------------------------------------ */
.iv-verdict.iv-show { animation: iv-verdict-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes iv-verdict-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- buttons are inert while checks are running --------------------- */
.iv-action[disabled] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .iv-bar i        { transition: none; }
  .iv-verdict.iv-show { animation: none; }
}
