/* GrafMaker UI fixes — focus, motion budget, button tokens.
   Include after the page's own styles: <link rel="stylesheet" href="/assets/ui-fixes.css"> */

:root {
  --gm-btn-pad-y: 15px;
  --gm-btn-pad-x: 34px;
  --gm-dur-fast: .15s;
  --gm-dur-base: .2s;
  --gm-dur-slow: .35s;
  --gm-ease: cubic-bezier(.16, 1, .3, 1);
}

/* one padding scale for the main button, instead of per-page values */
.btn {
  transition-duration: var(--gm-dur-base);
  transition-timing-function: var(--gm-ease);
}

/* the keyboard focus ring the pages never had */
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ff6a3d;
  outline-offset: 3px;
  border-radius: inherit;
}

/* a button that is working should say so, not stay silent */
.btn[aria-busy="true"],
.btn[disabled] {
  cursor: progress;
  opacity: .72;
}

/* phones: the same button, measured for a thumb */
@media (max-width: 640px) {
  .btn-xl {
    padding: 14px 22px;
  }
}
/* the editor and the landing run 47 keyframes; respect the system setting */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
