/* ToneGrid — tenant theme (demo.tonegrid.pro) */
:root {
  /* ── Brand tokens ── */
  --brand-primary:       #5856d6;
  --brand-button-text:   #FFFFFF;
  --brand-accent:        #FFA500;
  --brand-secondary:     #151515;

  /* ── Aliases used by older pages ── */
  --primary:             #5856d6;
  --color-primary:       #5856d6;
  --color-primary-hover: color-mix(in srgb, #5856d6 85%, #000 15%);
  --color-primary-muted: color-mix(in srgb, #5856d6 15%, transparent);
  --color-accent:        #FFA500;
}

/* ── Universal brand-button overrides ────────────────────────────────────────
   Targets every primary action button pattern across admin + artist pages.
   Excludes ghost/outline/cancel/danger variants.
   !important needed to win over page-level <style> blocks.
   ──────────────────────────────────────────────────────────────────────────── */
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn),
.btn-primary,
.btn-save,
.btn-submit,
.submit-btn,
.edit-btn.primary,
.edit-btn-primary,
.action-btn.primary,
.pill-btn.active {
  background:   #5856d6 !important;
  color:        #FFFFFF !important;
  border-color: #5856d6 !important;
}

.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):hover,
.btn-primary:hover,
.btn-save:hover,
.btn-submit:hover,
.submit-btn:hover,
.edit-btn.primary:hover,
.edit-btn-primary:hover,
.action-btn.primary:hover,
.pill-btn.active:hover {
  background: color-mix(in srgb, #5856d6 85%, #000 15%) !important;
  color:      #FFFFFF !important;
}

/* ── House-style interaction polish for primary action buttons ───────────────
   Colour is owned by the block above (with !important); this only adds the
   standard motion every primary button should share: a smooth transition, a
   hover lift with a brand-tinted shadow, a pressed state, and a keyboard-only
   focus ring. Intentionally NO !important — width / radius / sizing stay under
   each page's control. The .pill-btn / tab / stepper accents are excluded so
   navigation chrome doesn't lift. See admin/login.php for the reference use. */
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn),
.btn-primary,
.btn-save,
.btn-submit,
.submit-btn,
.edit-btn.primary,
.edit-btn-primary,
.action-btn.primary {
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):hover,
.btn-primary:hover,
.btn-save:hover,
.btn-submit:hover,
.submit-btn:hover,
.edit-btn.primary:hover,
.edit-btn-primary:hover,
.action-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -6px color-mix(in srgb, #5856d6 55%, transparent);
}
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):active,
.btn-primary:active,
.btn-save:active,
.btn-submit:active,
.submit-btn:active,
.edit-btn.primary:active,
.edit-btn-primary:active,
.action-btn.primary:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.28);
}
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):focus-visible,
.btn-primary:focus-visible,
.btn-save:focus-visible,
.btn-submit:focus-visible,
.submit-btn:focus-visible,
.edit-btn.primary:focus-visible,
.edit-btn-primary:focus-visible,
.action-btn.primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--tg-bg, #0d0d0d), 0 0 0 4px color-mix(in srgb, #5856d6 78%, #fff);
}
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):disabled,
.btn-primary:disabled,
.btn-save:disabled,
.btn-submit:disabled,
.submit-btn:disabled,
.edit-btn.primary:disabled,
.edit-btn-primary:disabled,
.action-btn.primary:disabled {
  transform: none;
  box-shadow: none;
}

/* ── Reusable loading state ───────────────────────────────────────────────────
   Add class="is-loading" (and disable the button) in JS while an async action
   is in flight; remove it when done. Draws a spinner in the current label
   colour, so it adapts to whatever text colour the brand token sets. Pattern is
   opt-in (a class, never :disabled) so validation-disabled buttons don't spin. */
.is-loading {
  cursor: progress;
}
.is-loading::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 9px;
  vertical-align: -2px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  animation: tg-btn-spin .6s linear infinite;
}
@keyframes tg-btn-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn),
.btn-primary,
.btn-save,
.btn-submit,
.submit-btn,
.edit-btn.primary,
.edit-btn-primary,
.action-btn.primary,
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):hover,
.btn-primary:hover,
.btn-save:hover,
.btn-submit:hover,
.submit-btn:hover,
.edit-btn.primary:hover,
.edit-btn-primary:hover,
.action-btn.primary:hover,
.btn:not(.btn-ghost):not(.btn-outline):not(.btn-cancel):not(.cancel):not(.btn-danger):not(.act-btn):active,
.btn-primary:active,
.btn-save:active,
.btn-submit:active,
.submit-btn:active,
.edit-btn.primary:active,
.edit-btn-primary:active,
.action-btn.primary:active {
    transition: none;
    transform: none;
  }
  .is-loading::before { animation-duration: 1.4s; }
}

/* Active tab underline / stepper accent */
.tab-btn.active { border-bottom-color: #5856d6 !important; }
.stepper a.active { background: #5856d6 !important; }

