/**
 * Button Component Styles
 * Includes: Primary, secondary, outline buttons and hover states
 */

/* ==========================================================================
   PRIMARY BUTTONS
   ========================================================================== */

.cta-button,
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs, 0.5rem);
  background: var(--accent-gold, #D4AF37);
  color: var(--primary-navy, #0A2B4C);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  box-shadow: var(--shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.1));
  text-align: center;
  justify-content: center;
  text-decoration: none;
}

.cta-button:hover,
.btn-primary:hover {
  background: var(--gold-hover, #C19B2E);
  color: var(--primary-navy, #0A2B4C);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 8px rgba(0, 0, 0, 0.15));
}

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

/* ==========================================================================
   SECONDARY BUTTONS
   ========================================================================== */

.cta-button-secondary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs, 0.5rem);
  background: var(--white, #FFFFFF);
  color: var(--gold-text, #806600);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--accent-gold, #D4AF37);
  cursor: pointer;
  transition: all var(--transition-fast, 0.2s ease);
  text-align: center;
  justify-content: center;
  text-decoration: none;
}

.cta-button-secondary:hover,
.btn-secondary:hover {
  background: var(--accent-gold, #D4AF37);
  color: var(--primary-navy, #0A2B4C);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(212, 175, 55, 0.2);
}

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

/* ==========================================================================
   OUTLINE BUTTONS
   ========================================================================== */

.cta-button-outline,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs, 0.5rem);
  background-color: transparent;
  color: white;
  border: 2px solid var(--accent-gold, #D4AF37);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: var(--radius-md, 8px);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-fast, 0.3s ease);
  cursor: pointer;
  text-align: center;
  justify-content: center;
}

.cta-button-outline:hover,
.btn-outline:hover {
  background-color: var(--accent-gold, #D4AF37);
  color: var(--primary-navy, #0A2B4C);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.cta-button-outline:active,
.btn-outline:active {
  transform: translateY(0);
}

/* On dark backgrounds, use white outline */
.cta-button-outline.on-dark {
  border-color: white;
  color: white;
}

.cta-button-outline.on-dark:hover {
  background-color: white;
  color: var(--primary-navy, #0A2B4C);
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg,
.hero-cta {
  font-size: 1.125rem;
  padding: 1rem 2rem;
}

.btn-xl {
  font-size: 1.25rem;
  padding: 1.25rem 2.5rem;
}

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

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

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

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

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

/* ==========================================================================
   BUTTON GROUPS
   ========================================================================== */

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-group.center {
  justify-content: center;
}

.btn-group.right {
  justify-content: flex-end;
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn-icon i,
.btn-icon svg {
  font-size: 1.125rem;
}

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

@media (max-width: 768px) {
  .cta-button,
  .btn-primary,
  .cta-button-secondary,
  .btn-secondary,
  .cta-button-outline,
  .btn-outline {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }

  .hero-cta,
  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group > * {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cta-button,
  .btn-primary,
  .cta-button-secondary,
  .btn-secondary,
  .cta-button-outline,
  .btn-outline {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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