/**
 * Advanced Form Navigation for Tessera Amoris
 * Sticky button positioning with smooth transitions and creative UX
 */

:root {
  --primary-gold: #D4AF37;
  --primary-dark: #0c1b33;
  --primary-light: #FFFFF0;
  --accent-warm: #8b7355;
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --border-light: #e8e8e8;
  --bg-light: #fafafa;
}

/* Form Navigation Container - Sticky Positioning */
.form-navigation {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: transparent;
  backdrop-filter: blur(5px);
  border-top: none;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 100;
  animation: slideUpNavigation 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpNavigation {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Navigation Buttons */
.btn-prev,
.btn-next,
.btn-submit {
  padding: 12px 28px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Previous Button */
.btn-prev {
  background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
  color: var(--accent-warm);
  border: 2px solid var(--border-light);
  min-width: 140px;
}

.btn-prev::before {
  content: '←';
  margin-right: 4px;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn-prev:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  border-color: var(--accent-warm);
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.15);
}

.btn-prev:active {
  transform: translateX(-2px) scale(0.98);
}

/* Next Button (Primary) */
.btn-next,
.btn-submit {
  background: linear-gradient(135deg, var(--primary-gold), #c9a961);
  color: var(--primary-dark);
  border: none;
  min-width: 160px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(212, 175, 138, 0.3);
}

.btn-next::after,
.btn-submit::after {
  content: '→';
  margin-left: 4px;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.btn-next:hover,
.btn-submit:hover {
  background: linear-gradient(135deg, #c9a961, #b39a52);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 138, 0.4);
}

.btn-next:active,
.btn-submit:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(212, 175, 138, 0.2);
}

/* Submit Button Variant */
.btn-submit {
  background: linear-gradient(135deg, #5cb85c, #4caf50);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.btn-submit::after {
  content: '✓';
  margin-left: 6px;
  font-size: 14px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #4caf50, #45a049);
  box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4);
}

/* Disabled State */
.btn-prev:disabled,
.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-prev:disabled:hover,
.btn-next:disabled:hover,
.btn-submit:disabled:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Ripple Effect */
.btn-prev::after,
.btn-next::before,
.btn-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.btn-prev:active::after,
.btn-next:active::before,
.btn-submit:active::before {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .form-navigation {
    flex-direction: column;
    gap: 12px;
    padding: 16px 16px;
  }

  .btn-prev,
  .btn-next,
  .btn-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 13px;
    min-width: unset;
  }

  .btn-prev::before,
  .btn-next::after,
  .btn-submit::after {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .form-navigation {
    padding: 12px 12px;
  }

  .btn-prev,
  .btn-next,
  .btn-submit {
    padding: 12px 16px;
    font-size: 12px;
    letter-spacing: 0.8px;
  }
}

/* Form Content Adjustment */
.form-content {
  padding-bottom: 120px;
  position: relative;
  overflow: visible;
}

/* Smooth Transition Between Sections */
.form-section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(40px) scale(0.97);
  transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  visibility: hidden;
  z-index: 1;
}

.form-section.active {
  position: static;
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  z-index: 10;
}

/* Accessibility */
.btn-prev:focus,
.btn-next:focus,
.btn-submit:focus {
  outline: 2px solid var(--primary-gold);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .form-navigation {
    display: none;
  }
}

