/**
 * BUTTON COMPONENTS
 * Auto-Ankauf Website
 * 
 * Alle Button-Styles mit Animationen
 */

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

.btn {
  /* Base Styles */
  font-family: var(--font-primary);
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  position: relative;
  overflow: hidden;
  
  /* Prevent text selection */
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus {
  outline: 2px solid var(--color-light-gold);
  outline-offset: 2px;
}


/* ==========================================
   BUTTON KLEIN
   ========================================== */

.btn-small {
  font-size: var(--font-size-button-small);
  font-weight: var(--font-weight-medium);
  color: var(--black-color-button-font);
  background: var(--gradient-button);
  padding: 12px 24px;
  border-radius: var(--radius-md);

  /* Pulse Animation */
  animation: pulse var(--duration-pulse) ease-in-out infinite;
}

.btn-small:hover {
  transform: translateY(-2px);
}

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


/* ==========================================
   BUTTON GROß (CTA)
   ========================================== */

.btn-large {
  /* Layout */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);

  /* Sizing */
  width: 100%;
  max-width: 600px;
  min-width: 600px;
  margin: 0 auto;
  padding: 15px 30px;

  /* Styling */
  background: var(--gradient-button);
  border-radius: var(--radius-md);
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-primary);
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;

  /* Effects */
  box-shadow: 0 4px 16px rgba(205, 137, 29, 0.3);
  transition: all var(--duration-normal) var(--ease-smooth);
  animation: pulse var(--duration-pulse) ease-in-out infinite;
}

.btn-large:hover {
  transform: translateY(-2px);
}

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

.btn-large:focus {
  outline: 2px solid var(--color-light-gold);
  outline-offset: 2px;
}

/* Content wrapper */
.btn-large .btn-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

/* Icon circle */
.btn-large .btn-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-large .btn-icon svg,
.btn-large .btn-icon img {
  width: 26px;
  height: 26px;
}

/* Text block */
.btn-large .btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.btn-large-main-text {
  font-size: var(--font-size-button-large-main);
  font-weight: var(--font-weight-bold);
  color: var(--black-color-button-font);
  line-height: 1.2;
}

.btn-large-sub-text {
  font-size: var(--font-size-button-large-sub);
  font-weight: var(--font-weight-regular);
  color: var(--white-color-button-font);
  opacity: 0.8;
  line-height: 1.2;
  text-align: left;
}

/* Arrow */
.btn-large .btn-arrow {
  width: 24px;
  height: 24px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--ease-smooth);
}

.btn-large:hover .btn-arrow {
  transform: translateX(4px);
}


/* ==========================================
   HOVER SHINE EFFECT
   Von links nach rechts laufender weißer Schein
   ========================================== */

.btn-small::before,
.btn-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left var(--duration-slow) var(--ease-smooth);
}

.btn-small:hover::before,
.btn-large:hover::before {
  left: 100%;
}


/* ==========================================
   PULSE ANIMATION
   Dauerhaft scale 1 → 1.03 → 1
   ========================================== */

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}


/* ==========================================
   BUTTON VARIANTEN
   ========================================== */

/* Outline Button */
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-light-gold);
  color: var(--color-light-gold);
  animation: none; /* Kein Pulse bei Outline */
}

.btn-outline:hover {
  background: var(--gradient-button);
  color: var(--black-color-button-font);
  border-color: transparent;
}

/* Ghost Button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  backdrop-filter: blur(10px);
  animation: none; /* Kein Pulse bei Ghost */
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* ==========================================
   DISABLED STATE
   ========================================== */

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


/* ==========================================
   LOADING STATE
   ========================================== */

.btn-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-black);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .btn-large {
    padding: 16px 20px;
    min-width: unset;
    width: 100%;
  }

  .btn-large .btn-icon {
    width: 40px;
    height: 40px;
  }

  .btn-small {
    padding: 10px 20px;
  }
}

@media (max-width: 480px) {
  .btn-large {
    padding: 14px 16px;
  }
}
