/**
 * @file admin-agent-integration.css
 * @description Admin Agent Integration tab styles (adm-agi-* prefix).
 * @version-history
 *   v1.0.0 -- 2026-05-24 -- Initial creation for Governance Phase C
 *   v1.1.0 -- 2026-05-24 -- Fix M8 M9 F19 F20 F21 audit findings
 *   v1.2.0 -- 2026-05-24 -- Add subsection, button row, notify button styles
 */

/* ── Section containers ── */
.adm-agi-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.adm-agi-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

/* ── Stats row ── the bespoke .adm-agi-stat-* cards were removed; this tab now
   renders its stat rows via the canonical <StatsGrid> (.adm-stat tones). ── */

/* ── Tables ── */
.adm-agi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.adm-agi-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.adm-agi-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.adm-agi-table tr:last-child td {
  border-bottom: none;
}

/* ── Stuck agent highlight ── */
.adm-agi-stuck {
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.adm-agi-stuck-agent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.adm-agi-stuck-agent:last-child {
  border-bottom: none;
}

/* ── Readiness distribution bars ── */
.adm-agi-readiness-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.adm-agi-readiness-level {
  width: 70px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.adm-agi-readiness-track {
  flex: 1;
  height: 8px;
  background: var(--bg-dim);
  border-radius: 4px;
  overflow: hidden;
}

.adm-agi-readiness-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.adm-agi-readiness-fill[data-level="expert"] { background: var(--success); }
.adm-agi-readiness-fill[data-level="full"] { background: var(--accent); }
.adm-agi-readiness-fill[data-level="standard"] { background: var(--warning); }
.adm-agi-readiness-fill[data-level="basic"] { background: var(--text-dim); }

.adm-agi-readiness-count {
  width: 30px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Mono cell (platform ID, adapter) ── */
.adm-agi-mono-sm {
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

/* ── Section footer (totals line) ── */
.adm-agi-footer {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Stuck agent detail text ── */
.adm-agi-stuck-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.adm-agi-stuck-detail {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Outdated highlight ── */
.adm-agi-outdated {
  color: var(--warning);
  font-weight: 600;
}

.adm-agi-zero {
  color: var(--text-dim);
}

/* ── Empty state text ── */
.adm-agi-empty-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Regenerate button ── */
.adm-agi-regen-btn {
  margin-top: 12px;
}

/* ── M8: Platform ID secondary text ── */
.adm-agi-platform-id {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-top: 1px;
}

/* ── M9: Stuck agents sub-section title ── */
.adm-agi-stuck-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* ── F19: Add platform form ── */
.adm-agi-add-btn {
  margin-top: 12px;
}

.adm-agi-add-form {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.adm-agi-add-form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.adm-agi-add-form-label {
  width: 130px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  flex-shrink: 0;
}

.adm-agi-add-form-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.adm-agi-add-form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.adm-agi-add-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ── F20: Stuck agent layout with suggestion + actions ── */
.adm-agi-stuck-info {
  flex: 1;
  min-width: 0;
}

.adm-agi-stuck-suggestion {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--warning);
  margin-top: 3px;
}

.adm-agi-stuck-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.adm-agi-stuck-btn {
  font-size: 0.7rem;
  padding: 4px 10px;
}

/* ── Subsection (nested inside a section, e.g. readiness inside onboarding) ── */
.adm-agi-subsection {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── Button row (side-by-side action buttons) ── */
.adm-agi-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ── Per-row notify button ── */
.adm-agi-notify-btn {
  font-size: 0.7rem;
  padding: 3px 10px;
}
