/* =================================
   AUTHENTICATION PAGES
==================================== */

.auth-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-darkest) 100%);
  padding: 2rem 1rem;
  position: relative;
}

.auth-page-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(0, 173, 181, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 173, 181, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.5s ease-out;
}

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

/* =================================
   AUTH HEADER
==================================== */

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

.auth-header .step-indicator {
  display: inline-block;
  background-color: var(--accent-primary);
  color: white;
  padding: 0.375rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* =================================
   FORM ELEMENTS
==================================== */

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

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-light);
}

/* =================================
   PASSWORD INPUT WITH TOGGLE
==================================== */

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 3.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.password-toggle:hover {
  color: var(--text-secondary);
  background: var(--bg-primary) !important;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

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

.auth-submit-btn {
  width: 100%;
  padding: 1rem;
  background-color: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 173, 181, 0.3);
  margin-top: 1rem;
}

.auth-submit-btn:hover {
  background-color: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 173, 181, 0.4);
}

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

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-submit-btn.loading::after {
  content: "";
  margin-left: 0.5rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.6s linear infinite;
}

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

/* =================================
   GOOGLE SIGN IN
==================================== */

.google-signin-btn {
  width: 100%;
  padding: 1rem;
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.google-signin-btn:hover {
  background: var(--bg-primary);
  border-color: var(--border-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.google-signin-btn img {
  width: 20px;
  height: 20px;
}

/* =================================
   DIVIDER
==================================== */

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 1rem;
}

/* =================================
   LINKS
==================================== */

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.forgot-password-link {
  text-align: right;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.forgot-password-link a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

/* =================================
   MESSAGES
==================================== */

.auth-message {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-left: 4px solid;
}

.auth-message.success {
  background: rgba(40, 167, 69, 0.1);
  border-color: var(--accent-green);
  color: #155724;
}

.auth-message.error {
  background: rgba(220, 53, 69, 0.1);
  border-color: var(--accent-red);
  color: #721c24;
}

.auth-message.info {
  background: var(--accent-primary-light);
  border-color: var(--accent-primary);
  color: #004d52;
}

/* =================================
   MAP SECTION (Step 2)
==================================== */

#location-map {
  height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1rem 0;
}

.address-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.address-group textarea {
  flex: 1;
  resize: vertical;
  min-height: 80px;
}

.address-group button {
  padding: 0.875rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: none;
}

.address-group button:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
}

.map-help-text {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

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

/* iPad/Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .auth-page-wrapper {
    padding: 1.5rem;
  }

  .auth-container {
    max-width: 600px;
  }

  .auth-card {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
  }

  .auth-header h1 {
    font-size: 1.875rem;
  }

  .auth-header p {
    font-size: 0.9375rem;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.875rem 1rem;
    font-size: 15px;
  }

  .auth-submit-btn {
    padding: 1rem;
    font-size: 1rem;
  }

  .google-signin-btn {
    padding: 1rem;
    font-size: 1rem;
  }

  #location-map {
    height: 320px;
  }

  .address-group {
    gap: 0.875rem;
  }

  .address-group button {
    padding: 0.875rem 1.5rem;
  }
}

/* Small Tablets & Mobile (up to 640px) */
@media (max-width: 640px) {
  .auth-page-wrapper {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
  }

  .auth-header h1 {
    font-size: 1.75rem;
  }

  .address-group {
    flex-direction: column;
  }

  .address-group button {
    width: 100%;
  }

  #location-map {
    height: 250px;
  }
}
