/* ============================================================
   Fakeradar — Reusable components (buttons, tags, cards, close, badges, segmented)
   States included: rest / hover / active / disabled.
   Depends on tokens.css.
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s4) var(--s7);          /* 12 24 */
  border: 1px solid transparent;
  border-radius: var(--r3);              /* 12 */
  font-size: 0.875rem;                   /* 14 */
  font-weight: 600;
  line-height: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn--primary   { background: var(--primary-50); color: #fff; }
.btn--primary:hover  { background: var(--primary-40); }
.btn--primary:active { background: var(--primary-30); }

.btn--secondary  { background: var(--secondary-40); color: #fff; }
.btn--secondary:hover  { background: var(--secondary-30); }
.btn--secondary:active { background: var(--secondary-30); filter: brightness(0.95); }

.btn--outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover  { border-color: var(--n-60); background: var(--fill); }
.btn--outline:active { background: var(--n-90); }

.btn[disabled], .btn--disabled {
  background: var(--fill);
  color: var(--n-60);
  border-color: var(--border);
  cursor: not-allowed;
  pointer-events: none;
}

/* large variant — mobile CTAs / touch targets */
.btn--lg {
  padding: var(--s5) var(--s8);          /* 16 32 */
  font-size: 1rem;
  border-radius: var(--r4);
}
.btn--block { width: 100%; }

/* ---------- Tag / pill (chip) ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--s3) var(--s5);          /* 8 16 */
  background: var(--fill);
  border-radius: 999px;
  font-size: 0.875rem;                   /* 14 */
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--text);
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r5);              /* 24 */
  box-shadow: var(--shadow-l);
}
.card--flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

/* ---------- Close button (pill) ---------- */
.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--n-30);
  transition: background 0.15s, border-color 0.15s;
}
.btn-close:hover { background: var(--fill); border-color: var(--n-60); }
.btn-close svg { width: 14px; height: 14px; }

/* ---------- Status badge (circular, two-tone) ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
}
.status-badge svg { width: 100%; height: 100%; }
.status-badge--success { background: var(--success-90); }
.status-badge--error   { background: var(--error-90); }
.status-badge--warning { background: var(--warning-90); }
.status-badge--ai      { background: var(--secondary-90); }

/* ---------- Segmented control (e.g. Basic / Extended) ---------- */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border-radius: var(--r5);
  padding: var(--s1);
}
.seg-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s3);
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-radius: var(--r5);
}
.seg-tab.is-active {
  background: var(--fill);
  color: var(--text);
  font-weight: 500;
}

/* ---------- Info note (circled-i + text) ---------- */
.info-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}
.info-note svg { flex-shrink: 0; margin-top: 1px; }
