/* static/css/components/button.css */
/* Button Component */
.btn {
  /* Base button styles */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.5rem);
  
  /* Responsive sizing with clamp */
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 3vw, 1.25rem);
  border-radius: clamp(1.5rem, 4vw, 2.25rem);
  
  /* Base styling */
  border: 1px solid transparent;
  font-weight: 500;
  font-family: var(--font-family);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  
  /* Auto-sizing */
  min-width: auto;
  width: auto;
  
  /* Focus states */
  outline: none;

}

.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Primary Button (Gradient) */
.btn--primary {
  border: clamp(0.5px, 0.1vw, 1px) solid #EB1260;
  background: radial-gradient(50.91% 97.54% at 50% 2.46%, #7B1B3D 0%, #EB1260 100%);
  color: #ffffff;
  box-shadow: 0px clamp(8px, 2vw, 14px) clamp(16px, 3vw, 27px) rgba(132, 0, 255, 0.33);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0px clamp(10px, 2.5vw, 18px) clamp(20px, 4vw, 35px) rgba(132, 0, 255, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
}

/* Secondary Button (Outline) */
.btn--secondary {
  border: clamp(0.5px, 0.1vw, 1px) solid #EB1260;
  background: transparent;
  color: #EB1260;
  box-shadow: 0px clamp(8px, 2vw, 14px) clamp(16px, 3vw, 27px) rgba(132, 0, 255, 0.33);
}

.btn--secondary:hover {
  background: rgba(235, 18, 96, 0.1);
  transform: translateY(-2px);
  box-shadow: 0px clamp(10px, 2.5vw, 18px) clamp(20px, 4vw, 35px) rgba(132, 0, 255, 0.4);
}

.btn--secondary:active {
  transform: translateY(0);
}

/* Ghost Button */
.btn--ghost {
  border: none;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
}

.btn--ghost:hover {
  color: #EB1260;
  background: rgba(235, 18, 96, 0.05);
}

/* Outline Button */
.btn--outline {
  border: 1px solid var(--border-primary);
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
}

.btn--outline:hover {
  border-color: #EB1260;
  color: #EB1260;
  background: rgba(235, 18, 96, 0.05);
}

/* Icon styles */
.btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.btn__icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

/* Text styles */
.btn__text {
  font-weight: inherit;
}

/* Disabled state */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled:hover {
  transform: none;
}

/* Size variants */
.btn--sm {
  font-size: clamp(0.75rem, 2vw, 0.875rem);
  padding: clamp(0.375rem, 1.5vw, 0.5rem) clamp(0.5rem, 2vw, 0.75rem);
  gap: clamp(0.125rem, 0.5vw, 0.25rem);
}

.btn--lg {
  font-size: clamp(1rem, 3vw, 1.25rem);
  padding: clamp(0.75rem, 2.5vw, 1rem) clamp(1rem, 4vw, 1.5rem);
  gap: clamp(0.375rem, 1.5vw, 0.75rem);
}

/* Full width variant */
.btn--full {
  width: 100%;
}

/* Loading state */
.btn--loading {
  position: relative;
  color: transparent;
}

.btn--loading::after {
  content: '';
  position: absolute;
  width: 1em;
  height: 1em;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive breakpoints */
@media (min-width: 768px) {
  .btn {
      min-width: clamp(120px, 15vw, 160px);
  }
}

@media (min-width: 1024px) {
  .btn:hover {
      transform: translateY(-1px);
  }
}

/* Dark/Light theme adjustments */
[data-theme="light"] .btn--ghost {
  color: var(--text-primary);
}

[data-theme="light"] .btn--outline {
  border-color: var(--border-primary);
  color: var(--text-primary);
}