/* Bộ nút dùng chung cho mọi trang (R56). Chỉ thêm "cảm giác bấm"; KHÔNG đổi màu, cỡ hay bố cục của từng trang.
   Dùng :where() (độ ưu tiên 0) nên CSS riêng của trang luôn thắng nếu trang đã tự định nghĩa; dùng thuộc tính `scale` riêng (không đụng `transform`). */
:where(button, .btn, [role="button"], input[type="button"], input[type="submit"], a.btn) {
  transition: scale .12s ease, filter .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, opacity .16s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
:where(button, .btn, [role="button"], input[type="button"], input[type="submit"], a.btn):not(:disabled):not([aria-disabled="true"]):hover { filter: brightness(1.06); }
:where(button, .btn, [role="button"], input[type="button"], input[type="submit"], a.btn):not(:disabled):not([aria-disabled="true"]):active { scale: .97; filter: brightness(.96); }
/* viền khi dùng bàn phím (Tab) — chỉ hiện khi cần, không hiện khi chuột bấm */
:where(button, .btn, [role="button"], input[type="button"], input[type="submit"], a.btn, select, summary):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .6);
  outline-offset: 2px;
}
:where(button, .btn, [role="button"], input[type="button"], input[type="submit"]):is(:disabled, [aria-disabled="true"]) { cursor: not-allowed; }
:where(button, .btn, [role="button"], input[type="button"], input[type="submit"])[aria-busy="true"] { cursor: progress; pointer-events: none; opacity: .75; }
/* xung nhẹ lan ra khi bấm (buttons.js thêm lớp .fx-pulse; không đổi bố cục vì chỉ dùng box-shadow) */
.fx-pulse { animation: fxPulse .42s ease-out; }
@keyframes fxPulse { from { box-shadow: 0 0 0 0 rgba(59, 130, 246, .45); } to { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); } }
/* nút sao chép vừa chép xong: nhấp nháy dấu ✓ (buttons.js) */
.fx-copied { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) {
  :where(button, .btn, [role="button"], input[type="button"], input[type="submit"], a.btn) { transition: none; }
  :where(button, .btn, [role="button"], input[type="button"], input[type="submit"], a.btn):active { scale: 1 !important; }
  .fx-pulse { animation: none; }
}
