/* Auth Pages Styling - Modern Cloud Theme */

/* Ensure scrolling works at the document level */
html, body {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Enable momentum scrolling on iOS */
  position: relative; /* Ensure positioning context */
}

/* Fix for mobile viewport height issues */
@supports (-webkit-touch-callout: none) {
  .auth-page-container {
    min-height: -webkit-fill-available;
  }
}

.auth-page-container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: flex-start; /* Allows content to start at the top */
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  background-attachment: fixed;
  position: relative;
  overflow-y: auto !important; /* Force scrolling */
  padding: 2rem 1rem;
  box-sizing: border-box;
  height: auto; /* Allow container to expand with content */
}

.auth-page-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%233f51b5' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  z-index: 0;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  overflow: visible; /* Changed from hidden to allow content to be scrollable */
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  margin: 2rem 0;
}

/* Remove hover transform which could interfere with scrolling */
.auth-card:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  transform: none; /* Removed transform to prevent scrolling issues */
}

.auth-header {
  background: linear-gradient(135deg, #1a3a7e 0%, #2b5ab3 100%);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: #ffffff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.auth-logo img {
  width: 60%;
  height: auto;
}

.auth-title {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

/* Make auth-body scrollable if needed */
.auth-body {
  padding: 2rem;
  overflow-y: auto;
}

.auth-form-group {
  margin-bottom: 1.5rem;
}

.auth-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.auth-input-wrapper {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  width: 1.25rem;
  height: 1.25rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  background: white;
  color: #1f2937;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.auth-input.is-invalid {
  border-color: #ef4444;
  background-color: #fee2e2;
}

.auth-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.auth-input-action {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-input-action:hover {
  color: #1f2937;
}

.auth-error {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.auth-error-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #ef4444;
}

.auth-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #1a3a7e 0%, #2b5ab3 100%);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.auth-button:hover {
  background: linear-gradient(135deg, #143070 0%, #2550a8 100%);
  transform: translateY(-2px);
}

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

.auth-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.auth-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
  transform: scale(0);
  transition: transform 0.5s ease-out;
}

.auth-button:hover::before {
  transform: scale(1);
}

.auth-social-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-social-divider::before,
.auth-social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-social-divider::before {
  margin-right: 1rem;
}

.auth-social-divider::after {
  margin-left: 1rem;
}

.auth-social-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-social-button {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  background: white;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-social-button:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.auth-social-button svg {
  width: 1.5rem;
  height: 1.5rem;
}

.auth-footer {
  text-align: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-link {
  color: #1a3a7e;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #2b5ab3;
  text-decoration: underline;
}

/* Password strength indicator */
.password-strength {
  margin-top: 0.75rem;
  overflow: visible;
  max-width: 100%;
}

.password-strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.password-strength-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
}

.password-strength-text {
  font-size: 0.75rem;
  font-weight: 600;
}

.password-strength-text.weak {
  color: #ef4444;
}

.password-strength-text.medium {
  color: #f59e0b;
}

.password-strength-text.strong {
  color: #10b981;
}

.password-strength-bar {
  height: 0.375rem;
  width: 100%;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
}

.password-strength-progress {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-progress.weak {
  background-color: #ef4444;
}

.password-strength-progress.medium {
  background-color: #f59e0b;
}

.password-strength-progress.strong {
  background-color: #10b981;
}

/* Password criteria section */
.password-criteria {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.criteria-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
}

.criteria-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.criteria-icon.valid {
  color: #10b981;
}

.criteria-icon.invalid {
  color: #9ca3af;
}

.criteria-text {
  color: #4b5563;
}

/* Success message */
.auth-success {
  text-align: center;
  padding: 2rem;
}

.auth-success-icon {
  width: 3rem;
  height: 3rem;
  color: #10b981;
  margin: 0 auto 1rem;
}

.auth-success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.auth-success-text {
  color: #4b5563;
  margin-bottom: 1.5rem;
}

.auth-success-email {
  font-weight: 600;
}

/* Cloud Loading Animation */
.cloud-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.cloud-icon-wrapper {
  width: 1.5rem;
  height: 1.5rem;
  position: relative;
}

.cloud-shape {
  position: absolute;
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 9999px;
  opacity: 0;
  animation: pulse 1.5s infinite;
}

.cloud-shape:nth-child(2) {
  animation-delay: 0.5s;
}

.cloud-shape:nth-child(3) {
  animation-delay: 1s;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .auth-page-container {
    padding: 1rem;
    align-items: flex-start;
    min-height: 100%;
    height: auto;
  }
  
  .auth-card {
    max-width: 100%;
    margin: 1rem 0;
    overflow-y: visible;
  }
  
  .auth-header {
    padding: 1.5rem;
  }
  
  .auth-body, .auth-footer {
    padding: 1.5rem;
  }
  
  .auth-body {
    max-height: none;
  }
  
  .auth-logo {
    width: 60px;
    height: 60px;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }

  /* Ensure inputs are properly sized on small screens */
  .auth-input {
    font-size: 16px; /* Prevents iOS zoom on focus */
    max-width: 100%;
  }
}

/* Handle small height screens */
@media (max-height: 700px) {
  .auth-page-container {
    align-items: flex-start;
    height: auto;
    min-height: 100%;
  }
  
  .auth-card {
    margin: 1rem 0;
  }
  
  .auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
  }
  
  .auth-header {
    padding: 1.5rem;
  }
  
  .auth-body {
    padding: 1.5rem;
    max-height: none;
  }
}

/* Additional scrolling behavior for terms label */
.terms-label {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
} 