/* Auth Modal Styles */
body.auth-modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.auth-modal-container {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s ease;
  border-radius: 8px;
}

.auth-modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

/* Auth Step */
.auth-step {
  animation: fadeIn 0.3s ease;
}

/* Auth Header */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px;
  font-family: "Work Sans", Helvetica, sans-serif;
}

.auth-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  font-family: "Montserrat", Helvetica, sans-serif;
}

#otp-phone-display {
  color: #337ab7;
  font-weight: 600;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  font-family: "Montserrat", Helvetica, sans-serif;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Montserrat", Helvetica, sans-serif;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: #337ab7;
  box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* Communication Toggle */
.communication-toggle {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 8px;
}

.toggle-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Montserrat", Helvetica, sans-serif;
}

.toggle-option svg {
  width: 18px;
  height: 18px;
}

.toggle-option.active {
  background: #ffffff;
  color: #337ab7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-option:hover:not(.active) {
  color: #374151;
}

/* OTP Inputs */
.otp-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.otp-input {
  width: 56px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-family: "Montserrat", Helvetica, sans-serif;
  transition: all 0.2s ease;
}

.otp-input:focus {
  outline: none;
  border-color: #337ab7;
  box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.1);
}

.otp-timer {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 20px;
  font-family: "Montserrat", Helvetica, sans-serif;
}

#otp-countdown {
  color: #337ab7;
  font-weight: 600;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  font-family: "Montserrat", Helvetica, sans-serif;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #337ab7;
}

/* Buttons */
.auth-button {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Montserrat", Helvetica, sans-serif;
}

.auth-button.primary {
  background: #337ab7;
  color: #ffffff;
}

.auth-button.primary:hover {
  background: #2563a8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 122, 183, 0.3);
}

.auth-button.primary:active {
  transform: translateY(0);
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Footer Links */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  font-family: "Montserrat", Helvetica, sans-serif;
}

.auth-link {
  color: #337ab7;
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.auth-link:hover {
  text-decoration: underline;
}

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

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

/* Responsive */
@media (max-width: 768px) {
  .auth-modal-container {
    padding: 32px 24px;
  }

  .auth-title {
    font-size: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .otp-input {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .otp-inputs {
    gap: 8px;
  }
}

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

  .auth-modal-container {
    padding: 24px 20px;
  }

  .auth-title {
    font-size: 18px;
  }

  .otp-input {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .communication-toggle {
    flex-direction: column;
  }

  .toggle-option {
    width: 100%;
  }
}
