/**
 * Waitlist Modal Styles - Modern Design
 * Save to: /LoopWebsite/mainpagenouser/waitlist-modal.css
 */

/* Modal Overlay */
.waitlist-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  z-index: 9998;
  backdrop-filter: blur(12px) saturate(180%);
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.waitlist-overlay.active {
  display: block;
}

/* Modal Container */
.waitlist-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 24px;
  box-shadow: 
    0 0 0 1px rgba(18, 110, 110, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 80px -20px rgba(18, 110, 110, 0.15);
  z-index: 9999;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  animation: slideUpScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.waitlist-modal.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { 
    opacity: 0;
  }
  to { 
    opacity: 1;
  }
}

@keyframes slideUpScale {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Modal Header */
.modal-header {
  padding: 40px 40px 32px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  background: linear-gradient(180deg, rgba(18, 110, 110, 0.02) 0%, transparent 100%);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(100, 116, 139, 0.08);
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: rotate(90deg);
}

.modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px 0;
  font-family: 'Figtree', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.modal-subtitle {
  font-size: 15px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

/* Modal Body */
.modal-body {
  padding: 36px 40px 40px;
  overflow-y: auto;
  max-height: calc(90vh - 180px);
}

/* Custom scrollbar */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.2);
  border-radius: 8px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.3);
}

/* Name row - side by side */
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.name-row .form-group {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 10px;
  font-family: 'Figtree', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.form-label .required {
  color: #ef4444;
  margin-left: 2px;
  font-weight: 700;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  color: #0f172a;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Figtree', system-ui, sans-serif;
  box-sizing: border-box;
  background: #ffffff;
  font-weight: 500;
}

.form-input:hover {
  border-color: #cbd5e1;
}

.form-input:focus {
  outline: none;
  border-color: #126E6E;
  background: #ffffff;
  box-shadow: 
    0 0 0 4px rgba(18, 110, 110, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-input.error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.02);
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.form-error {
  display: none;
  font-size: 13px;
  color: #ef4444;
  margin-top: 8px;
  font-weight: 500;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-error.show {
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-error.show::before {
  content: "⚠";
  font-size: 14px;
}

/* Checkbox Group */
.checkbox-group {
  margin-bottom: 28px;
}

.checkbox-wrapper {
  display: flex;
  align-items: start;
  gap: 14px;
  padding: 16px;
  background: rgba(18, 110, 110, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(18, 110, 110, 0.1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-wrapper:hover {
  background: rgba(18, 110, 110, 0.05);
  border-color: rgba(18, 110, 110, 0.2);
}

.checkbox-input {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #126E6E;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-input:hover {
  border-color: #126E6E;
}

.checkbox-input:checked {
  transform: scale(1.05);
}

.checkbox-label {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label a {
  color: #126E6E;
  text-decoration: none;
  font-weight: 700;
  position: relative;
  transition: color 0.2s ease;
}

.checkbox-label a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: #126E6E;
  transition: width 0.2s ease;
}

.checkbox-label a:hover {
  color: #0f5555;
}

.checkbox-label a:hover::after {
  width: 100%;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, #126E6E 0%, #0f5555 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Figtree', system-ui, sans-serif;
  box-shadow: 
    0 4px 14px rgba(18, 110, 110, 0.25),
    0 0 0 0 rgba(18, 110, 110, 0.4);
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 20px rgba(18, 110, 110, 0.35),
    0 0 0 4px rgba(18, 110, 110, 0.1);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 8px rgba(18, 110, 110, 0.3),
    0 0 0 4px rgba(18, 110, 110, 0.1);
}

.submit-btn:disabled {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.submit-btn:disabled::before {
  display: none;
}

.submit-btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.submit-btn.loading .spinner {
  display: block;
}

.submit-btn.loading .btn-text {
  display: none;
}

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

/* Success State */
.success-message {
  display: none;
  text-align: center;
  padding: 60px 40px;
}

.success-message.show {
  display: block;
  animation: fadeInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: white;
  font-size: 40px;
  animation: successBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 10px 30px rgba(16, 185, 129, 0.3),
    0 0 0 10px rgba(16, 185, 129, 0.1);
  position: relative;
}

.success-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid #10b981;
  border-radius: 50%;
  animation: successRipple 1s ease-out infinite;
}

@keyframes successBounce {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-20deg);
  }
  50% {
    transform: scale(1.05) rotate(5deg);
  }
  70% {
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes successRipple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.success-title {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 16px 0;
  font-family: 'Figtree', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.success-text {
  font-size: 16px;
  color: #64748b;
  line-height: 1.7;
  margin: 0;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 600px) {
  .modal-header {
    padding: 32px 28px 24px;
  }

  .modal-body {
    padding: 28px 28px 32px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-subtitle {
    font-size: 14px;
  }

  .waitlist-modal {
    width: 95%;
    border-radius: 20px;
  }

  .form-input {
    padding: 12px 16px;
  }

  .submit-btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .success-message {
    padding: 48px 28px;
  }

  .success-icon {
    width: 70px;
    height: 70px;
    font-size: 35px;
  }

  .success-title {
    font-size: 22px;
  }

  .success-text {
    font-size: 15px;
  }

  /* Stack name fields on mobile */
  .name-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .name-row .form-group {
    margin-bottom: 0;
  }
}



/* Smooth transitions for all interactive elements */
.waitlist-modal button,
.waitlist-modal input,
.waitlist-modal a {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}