/* ============================================
   MACEOTOMASYON - Button Components
   ============================================ */

/* ========== BASE BUTTON ========== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: var(--leading-none);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  border: var(--border-medium) solid transparent;
}

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

.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Ripple Effect Container */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: transform var(--duration-slow) var(--ease-out), 
              opacity var(--duration-normal) var(--ease-out);
}

.btn:active::before {
  opacity: 1;
  transform: scale(2.5);
  transition: transform 0ms;
}

/* ========== BUTTON VARIANTS ========== */

/* Primary Button - Gradient with glow */
.btn--primary {
  background: var(--gradient-primary);
  color: var(--neutral-0);
  border-color: var(--primary-600);
  box-shadow: 0 4px 14px rgba(0, 82, 204, 0.3);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-600) 100%);
  box-shadow: 0 6px 20px rgba(0, 82, 204, 0.4);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 82, 204, 0.3);
}

/* Secondary Button - Outlined */
.btn--secondary {
  background: transparent;
  color: var(--primary-500);
  border-color: var(--primary-500);
}

.btn--secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary-600);
  color: var(--primary-600);
}

.btn--secondary:active {
  background: var(--primary-100);
}

/* Ghost Button - Text only */
.btn--ghost {
  background: transparent;
  color: var(--primary-500);
  border-color: transparent;
  padding-inline: var(--space-4);
}

.btn--ghost:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

.btn--ghost:active {
  background: var(--primary-100);
}

/* Accent Button - Orange CTA */
.btn--accent {
  background: var(--gradient-accent);
  color: var(--neutral-900);
  border-color: var(--accent-600);
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3);
}

.btn--accent:hover {
  background: linear-gradient(135deg, var(--accent-300) 0%, var(--accent-500) 100%);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
  transform: translateY(-2px);
}

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

/* Light Button - For dark backgrounds */
.btn--light {
  background: var(--neutral-0);
  color: var(--primary-600);
  border-color: var(--neutral-0);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn--light:hover {
  background: var(--neutral-100);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Dark Button */
.btn--dark {
  background: var(--neutral-900);
  color: var(--neutral-0);
  border-color: var(--neutral-800);
}

.btn--dark:hover {
  background: var(--neutral-800);
  transform: translateY(-2px);
}

/* ========== BUTTON SIZES ========== */

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  gap: var(--space-1);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
  gap: var(--space-3);
}

.btn--xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
  border-radius: var(--radius-xl);
  gap: var(--space-3);
}

/* ========== ICON BUTTONS ========== */

.btn--icon {
  padding: var(--space-3);
  aspect-ratio: 1;
  border-radius: var(--radius-full);
}

.btn--icon.btn--sm {
  padding: var(--space-2);
}

.btn--icon.btn--lg {
  padding: var(--space-4);
}

/* Button with icon */
.btn__icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* ========== BUTTON STATES ========== */

/* Loading State */
.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 1.25em;
  height: 1.25em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: var(--radius-full);
  animation: spin var(--duration-slow) linear infinite;
}

.btn--primary.is-loading::after,
.btn--accent.is-loading::after,
.btn--dark.is-loading::after {
  border-color: var(--neutral-0);
  border-right-color: transparent;
}

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

/* ========== BUTTON GROUP ========== */

.btn-group {
  display: inline-flex;
  gap: 0;
}

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.btn-group .btn:not(:first-child) {
  margin-left: -2px;
}

/* ========== FLOATING ACTION BUTTON ========== */

.fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--neutral-0);
  box-shadow: var(--shadow-xl), var(--shadow-primary-glow);
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all var(--duration-normal) var(--ease-out);
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-2xl), 0 0 50px rgba(0, 82, 204, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

/* WhatsApp FAB */
.fab--whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(37, 211, 102, 0.4);
}

.fab--whatsapp:hover {
  box-shadow: var(--shadow-2xl), 0 0 50px rgba(37, 211, 102, 0.6);
}

/* ========== SCROLL TO TOP BUTTON ========== */

.scroll-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--neutral-800);
  color: var(--neutral-0);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--duration-normal) var(--ease-out);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--primary-500);
  transform: translateY(-4px);
}
