/* CoWButton.vue and its default large UButton layout. */
.cow-button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  border: 0;
  border-radius: 9999px;
  padding: 0.875rem 1.25rem;
  font: 600 15px/1.5 Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
}

.cow-button--square {
  padding: 0.625rem;
}

.cow-button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.cow-button :is(.button-icon, .track-control-icon) {
  width: 1.25rem;
  height: 1.25rem;
}

/* Every variant shares one motion, the same as the design system's pill
   button: hover lifts the button 4px while its ledge grows by 4px, so the
   ledge's bottom edge stays put; press sinks it onto a 1px ledge. A variant
   only sets its colours and ledge through the --cb-* variables. */
.cow-button {
  --cb-ledge-h: 4px;
  --cb-shadow: 10px 16px -10px;
  --cb-shadow-hover: 14px 20px -10px;
  position: relative;
  box-shadow: var(--cb-inset), 0 var(--cb-ledge-h) 0 0 var(--cb-ledge),
    0 var(--cb-shadow) var(--cb-glow);
  transition: transform 0.08s ease, box-shadow 0.08s ease,
    background-color 0.2s ease;
  will-change: transform;
}

.cow-button:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow: var(--cb-inset),
    0 calc(var(--cb-ledge-h) + 4px) 0 0 var(--cb-ledge),
    0 var(--cb-shadow-hover) var(--cb-glow);
}

.cow-button:active:not(:disabled) {
  transform: translateY(calc(var(--cb-ledge-h) - 1px));
  box-shadow: var(--cb-inset), 0 1px 0 0 var(--cb-ledge);
}

/* Primary — purple with a darker bottom ledge */
.cow-button--primary {
  --cb-ledge-h: 5px;
  --cb-shadow: 12px 18px -8px;
  --cb-shadow-hover: 16px 22px -8px;
  --cb-inset: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --cb-ledge: #7e22ce;
  --cb-glow: rgba(126, 34, 206, 0.45);
  color: #fff !important;
  background-color: #a855f7 !important;
}

.cow-button--primary:hover {
  background-color: #9f4ff5 !important;
}

/* Secondary — neutral surface with a subtle ledge, light + dark */
.cow-button--secondary {
  --cb-inset: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
  --cb-ledge: #cbd5e1;
  --cb-glow: rgba(15, 23, 42, 0.35);
  color: #0f172a !important;
  background-color: #ffffff !important;
}

.cow-button--secondary:hover {
  background-color: #f8fafc !important;
}

.cow-button--dark {
  --cb-inset: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --cb-ledge: #030712;
  --cb-glow: rgba(3, 7, 18, 0.45);
  color: #fff !important;
  background-color: #111827 !important;
}

.cow-button--dark:hover {
  background-color: #1f2937 !important;
}

.cow-button:disabled {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .cow-button:hover:not(:disabled) {
    transform: none;
  }
}
