/*
 * Native adaptation of Magic UI's InteractiveHoverButton (MIT).
 * Copyright (c) Magic UI. Retain original/LICENSE.md with distribution.
 * Source: https://21st.dev/@dillionverma/components/interactive-hover-button
 * Upstream expanding dot + departing label + arriving label are preserved; decorative arrow removed by brand direction.
 */
.cu-button {
  --cu-paper: #f8f2e8;
  --cu-ink: #36271e;
  --cu-engaged: var(--cu-scroll, 0);
  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  min-width: 180px;
  min-height: 54px;
  max-width: 100%;
  padding: 12px 26px;
  border: 1px solid #36271e55;
  border-radius: 999px;
  background: var(--cu-paper);
  color: var(--cu-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease-out;
}
.cu-button:focus-visible { --cu-engaged: 1; outline: 3px solid #a75c37; outline-offset: 5px; }
.cu-button:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.975); }
.cu-button__rest { display: flex; align-items: center; justify-content: center; gap: 12px; }
.cu-button__dot {
  display: block; flex: 0 0 8px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--cu-ink);
  transform: scale(calc(1 + var(--cu-engaged) * 100.8));
}
.cu-button__label { display: inline-block; transform: translateX(calc(var(--cu-engaged) * 48px)); opacity: calc(1 - var(--cu-engaged)); }
.cu-button__arrival {
  position: absolute; z-index: 1; inset: 0;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--cu-paper);
  transform: translateX(calc((1 - var(--cu-engaged)) * 48px));
  opacity: var(--cu-engaged);
}

.cu-button__dot,.cu-button__label,.cu-button__arrival { transition: transform 300ms cubic-bezier(.22,1,.36,1), opacity 300ms ease-out; }
.cu-button:focus-visible .cu-button__dot,.cu-button:focus-visible .cu-button__label,.cu-button:focus-visible .cu-button__arrival { transition: none; }
.cu-button__busy { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 12px; }
.cu-button__spinner { width: 15px; height: 15px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: cu-button-spin 800ms linear infinite; }
.cu-button[aria-busy="true"] { --cu-engaged: 0; cursor: wait; }
.cu-button[aria-busy="true"] .cu-button__rest,.cu-button[aria-busy="true"] .cu-button__arrival { visibility: hidden; }
.cu-button[aria-busy="true"] .cu-button__busy { display: flex; }
.cu-button:disabled:not([aria-busy="true"]),.cu-button[aria-disabled="true"]:not([aria-busy="true"]) { --cu-engaged: 0; opacity: .45; cursor: not-allowed; }
.cu-button__accessible { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes cu-button-spin { to { transform: rotate(360deg); } }
@media (hover:hover) and (pointer:fine) {
  .cu-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) { --cu-engaged: 1; }
}
@media (hover:none) and (pointer:coarse) {
  .cu-button__dot,.cu-button__label,.cu-button__arrival { transition: none; }
}
@media (prefers-reduced-motion:reduce) {
  .cu-button__spinner { animation: none; }
  .cu-button { transition-duration: 0s; }
}
/* On touch, keep both labels aligned and clip the light ink to the expanding
   dot. A partially scrolled wipe must never translate or fade readable text. */
@media (hover:none) and (pointer:coarse){
  .cu-button__rest{gap:0}
  .cu-button__dot{position:absolute;left:26px;top:calc(50% - 4px)}
  .cu-button__label{transform:none;opacity:1}
  .cu-button__arrival{transform:none;opacity:1;clip-path:circle(calc(4px + var(--cu-engaged) * 403.2px) at 30px 50%)}
}
