/* ============================================================
   StuderaHP Shared Components — single source of truth
   Loaded globally by functions.php (after tokens.css).
   Use these classes for NEW markup instead of inventing
   page-scoped BEM buttons/cards (hpX__button, hpX__card, …).
   Everything is token-driven — never hardcode colors/radii here.
   ============================================================ */

/* ---------- Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);            /* 40px */
  padding: 0 var(--btn-px);            /* 20px */
  border: 1px solid transparent;
  border-radius: var(--btn-radius);    /* 10px */
  font: 600 14px/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Size modifiers */
.btn--sm  { min-height: var(--btn-h-sm); padding: 0 14px; font-size: 13px; }
.btn--lg  { min-height: 50px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn--block { width: 100%; }

/* Primary — flat brand blue (app / dashboard standard) */
.btn--primary {
  background: var(--blue-600);
  color: #fff;
}
.btn--primary:hover  { background: var(--blue-700); color: #fff; }
.btn--primary:visited { color: #fff; }

/* CTA — brand gradient (marketing hero standard) */
.btn--cta {
  background: linear-gradient(135deg, var(--blue-600) 0%, #2f76ff 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}
.btn--cta:hover {
  color: #fff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}
.btn--cta:visited { color: #fff; }

/* Secondary — white with border */
.btn--secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}
.btn--secondary:hover { border-color: var(--border-strong); background: var(--bg); }

/* Ghost — transparent, muted text */
.btn--ghost {
  background: transparent;
  color: var(--ink-muted);
}
.btn--ghost:hover { background: var(--bg); color: var(--ink); }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);          /* 16px */
  box-shadow: var(--shadow-md);
  padding: 24px;
}
.card--lg {
  border-radius: var(--r-xl);          /* 24px */
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.card--flat { box-shadow: var(--shadow-sm); }

/* ---------- Pill / badge (radius:999px allowed ONLY here) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font: 600 12px/1 var(--font-ui);
  background: var(--blue-50);
  color: var(--blue-700);
}
