/* ──────────────────────────────────────────────────────────────
   Shared components — patterns duplicated across the suite, unified.
   Depends on tokens.css + base.css.

   Naming note: tooltip classes are unified under the `tip-*` prefix
   (the Navigator previously used `nav-tip-*`). Status colours are the
   `.status-*` set. Where a page needs a variant, it adds a modifier
   class in its own per-page stylesheet rather than redefining these.
   ────────────────────────────────────────────────────────────── */

/* ── Header: maize stripe + dark bar ── */
.header-stripe {
  background: var(--michigan-maize);
  padding: 3px 20px;
  text-align: right;
}
.header-stripe span {
  font-size: 11px;
  font-weight: 700;
  color: var(--michigan-blue);
  letter-spacing: 0.4px;
}
.header-main {
  background: var(--michigan-blue);
  padding: 14px 20px;
  display: flex;
  align-items: center;
}
.header-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.header-badge {
  color: var(--michigan-maize);
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}

/* ── Card ── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow:
    0 1px 3px rgba(0, 39, 76, 0.06),
    0 2px 8px rgba(0, 39, 76, 0.04);
  position: relative;
}
.card-tight {
  padding: 14px 16px;
}

/* ── Buttons ── */
.btn-primary {
  padding: 13px 18px;
  background: var(--michigan-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  transition:
    background 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-maize {
  padding: 13px 18px;
  background: var(--michigan-maize);
  color: var(--michigan-blue);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  transition:
    background 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
}
.btn-maize:hover:not(:disabled) {
  background: var(--maize-hover);
}

.btn-outline {
  padding: 9px 16px;
  background: #fff;
  color: var(--arboretum-blue);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.btn-outline:hover {
  background: var(--bg-blue-tint);
  border-color: var(--arboretum-blue);
}

/* Copy/confirm success state, shared by outline + icon copy buttons */
.is-copied {
  background: var(--pass-bg) !important;
  border-color: var(--pass-border) !important;
  color: var(--pass-fg) !important;
}

/* ── Spinner ── */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--arboretum-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ── Tooltip system (unified `tip-*`) ── */
.tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--arboretum-blue);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  line-height: 1;
  margin-left: 5px;
  user-select: none;
  transition: background 0.12s;
  position: relative;
}
.tip-btn::after {
  content: "";
  position: absolute;
  inset: -8px;
}
.tip-btn:hover {
  background: var(--blue-hover);
}
.tip-pop {
  position: fixed;
  z-index: 99999;
  width: 280px;
  background: var(--surface-dark);
  color: var(--surface-dark-text);
  border-radius: var(--radius-md);
  padding: 0;
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  overflow: visible;
}
.tip-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding: 13px 15px;
  border-radius: var(--radius-md);
}
.tip-pop.show {
  opacity: 1;
  pointer-events: auto;
}
.tip-pop strong {
  color: var(--michigan-maize);
  font-weight: 700;
}
.tip-pop .tip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.tip-pop.below .tip-arrow {
  top: -6px;
  border-bottom: 6px solid var(--surface-dark);
}
.tip-pop.above .tip-arrow {
  bottom: -6px;
  border-top: 6px solid var(--surface-dark);
}
@media (max-width: 820px) {
  .tip-pop {
    width: 240px;
  }
}

/* ── Status pills / rows (scorecards, badges) ── */
.status-pass {
  background: var(--pass-bg);
  color: var(--pass-fg);
}
.status-warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.status-fail {
  background: var(--fail-bg);
  color: var(--fail-fg);
}

/* ── Error box ── */
.error-box {
  background: var(--error-bg);
  border: 1.5px solid var(--error-border);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--error-fg);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
