/* 🌱 TRAIN A CHILD - AUTH PAGES STYLES */

/* ============================================ */

/* AUTH PAGES CONTAINER */

/* ============================================ */

.auth-page {
  display: none;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

.auth-page.active {
  display: block;
}

/* ============================================ */

/* AUTH CONTAINER */

/* ============================================ */

.auth-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* ============================================ */

/* LEFT SIDE - BRANDING */

/* ============================================ */

.auth-left {
  flex: 1;
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #4CAF50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

.auth-left-content {
  text-align: center;
  color: white;
  z-index: 1;
  position: relative;
  max-width: 400px;
}

.logo-container {
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease-out;
}

.auth-logo {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.brand-subtitle {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 300;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.decorative-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.decorative-dots span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: bounce 2s ease-in-out infinite;
}

.decorative-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.decorative-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

/* ============================================ */

/* RIGHT SIDE - FORM */

/* ============================================ */

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--background);
  min-height: 100vh;
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.8s ease-out;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* REMOVED: Mobile logo display */

.mobile-logo {
  display: none !important;
}

.auth-form-wrapper {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px var(--shadow);
  border: 1px solid var(--border-color);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* FIXED: Better header content spacing that works on all devices */

.auth-header-content {
  margin-bottom: 1.5rem;
  padding-top: 0;
  flex-shrink: 0;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
  line-height: 1.3;
}

.auth-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

/* ============================================ */

/* FORM STYLES */

/* ============================================ */

.auth-form {
  margin-bottom: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

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

/* Label with icons */

.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.label-icon {
  color: var(--primary-solid);
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

/* Input with border radius */

.form-control {
  padding: 0.875rem 1rem;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  width: 100%;
}

.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.form-control:focus {
  border-color: #2E7D32;
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
  outline: none;
}

/* Improved password toggle positioning */

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 10;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.password-toggle:hover {
  color: #2E7D32;
  background: rgba(46, 125, 50, 0.1);
  border-radius: 4px;
}

/* ============================================ */

/* FORM EXTRAS */

/* ============================================ */

.form-extras {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-check {
  display: flex;
  align-items: center;
  background: none !important;
  border: none !important;
}

.form-check-input {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.form-check-input:checked {
  background-color: #2E7D32;
  border-color: #2E7D32;
}

.form-check-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.forgot-link {
  color: #2E7D32;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.forgot-link:hover {
  color: #1B5E20;
  text-decoration: underline;
}

/* ============================================ */

/* SUBMIT BUTTON */

/* ============================================ */

.auth-submit {
  height: 46px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ============================================ */

/* DIVIDER */

/* ============================================ */

.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0;
  flex-shrink: 0;
}

.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  background: var(--card-bg);
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

/* ============================================ */

/* SOCIAL LOGIN */

/* ============================================ */

.social-login {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.social-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  height: auto;
  min-height: 46px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.social-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.social-btn:hover {
  border-color: #2E7D32;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

.social-btn span {
  white-space: nowrap;
}

@media (max-width: 400px) {
  .social-btn {
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
  }
}

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

/* ============================================ */

/* AUTH FOOTER */

/* ============================================ */

.auth-footer {
  text-align: center;
  flex-shrink: 0;
  padding-bottom: 0.5rem;
}

.auth-footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
  white-space: nowrap;
}

@media (max-width: 375px) {
  .auth-footer p {
    font-size: 0.8rem;
  }
}

.form-check-label a,
.auth-footer p a {
  color: #2E7D32;
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.form-check-label a:hover,
.auth-footer p a:hover {
  color: #1B5E20;
  text-decoration: underline;
}

.auth-link {
  color: #2E7D32;
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.auth-link:hover {
  color: #1B5E20;
  text-decoration: underline;
}

/* ============================================ */

/* ANIMATIONS */

/* ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================ */

/* UNIVERSAL MOBILE RESPONSIVE DESIGN */

/* FIXED: Using fixed header approach */

/* Tablet and smaller desktop */

@media (max-width: 1024px) {
  .brand-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 1024px) {
  .brand-subtitle {
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) {
  .auth-logo {
    max-width: 100px;
  }
}

/* Mobile devices - Fixed header approach */

@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }
}

/* Treat green container as fixed header */

@media (max-width: 768px) {
  .auth-left {
    flex: 0 0 auto;
    height: 180px;
    padding: 1rem 1.5rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    min-height: 180px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }
}

@media (max-width: 768px) {
  .auth-left-content {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .logo-container {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 768px) {
  .auth-logo {
    max-width: 80px;
  }
}

@media (max-width: 768px) {
  .brand-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 768px) {
  .brand-subtitle {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 768px) {
  .decorative-dots {
    display: none;
  }
}

/* Form container with guaranteed spacing */

@media (max-width: 768px) {
  .auth-right {
    flex: 1;
    padding: 0;
    overflow: visible;
    min-height: auto;
    position: relative;
    padding-top: 200px;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .auth-form-container {
    max-width: 100%;
    min-height: 0;
    padding: 1rem;
    padding-top: 3rem;
  }
}

@media (max-width: 768px) {
  .auth-form-wrapper {
    padding: 1.25rem;
    box-shadow: none;
    border: none;
    background: transparent;
    min-height: 0;
    margin-top: 0;
  }
}

/* Header content always visible */

@media (max-width: 768px) {
  /* Removed specific padding hacks - handled by global fixed header layout */

  @media (max-width: 768px) {
    .auth-title {
      font-size: 1.25rem;
      margin-bottom: 0.5rem;
      position: relative;
      top: 0;
    }
  }



  @media (max-width: 768px) {
    .auth-description {
      font-size: 0.8rem;
      position: relative;
      top: 0;
    }
  }

  @media (max-width: 768px) {
    .form-group {
      margin-bottom: 1rem;
    }
  }

  @media (max-width: 768px) {
    .form-control {
      height: 44px;
      padding: 0.75rem 1rem;
      font-size: 0.85rem;
    }
  }

  @media (max-width: 768px) {
    .auth-submit {
      height: 44px;
      font-size: 0.9rem;
    }
  }



  @media (max-width: 768px) {
    .form-label {
      font-size: 0.85rem;
    }
  }

  @media (max-width: 768px) {
    .label-icon {
      font-size: 0.85rem;
    }
  }

  /* Extra small mobile devices - Samsung, iPhone SE, etc. */

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-left {
      height: 22dvh;
      padding: 0.75rem 1rem;
      min-height: 150px;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-form-container {
      padding-top: 1.25rem;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-logo {
      max-width: 70px;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .brand-title {
      font-size: 1.1rem;
      margin-bottom: 0.25rem;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .brand-subtitle {
      font-size: 0.75rem;
      margin-bottom: 0.5rem;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-right {
      padding: 0;
      min-height: 78dvh;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-form-wrapper {
      padding: 1rem;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-title {
      font-size: 1.1rem;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .auth-header-content {
      margin-bottom: 1rem;
    }
  }

  @media (max-width: 375px) and (max-height: 700px) {
    .form-extras {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
    }
  }

  /* Very small height devices */

  @media (max-height: 600px) {
    .auth-left {
      height: 20dvh;
      padding: 0.5rem 1rem;
    }
  }

  @media (max-height: 600px) {
    .auth-right {
      min-height: 80dvh;
    }
  }

  @media (max-height: 600px) {
    .auth-form-container {
      padding-top: 1rem;
    }
  }

  @media (max-height: 600px) {
    .auth-header-content {
      margin-bottom: 0.75rem;
    }
  }

  @media (max-height: 600px) {
    .form-group {
      margin-bottom: 0.75rem;
    }
  }

  @media (max-height: 600px) {
    .auth-form {
      margin-bottom: 0.5rem;
    }
  }

  /* ============================================ */

  /* LANDSCAPE MODE FIX - Universal compatibility */

  /* ============================================ */

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-container {
      flex-direction: row;
      height: 100dvh;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-left {
      height: auto;
      flex: 0 0 35%;
      border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
      padding: 1rem;
      min-height: auto;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-right {
      flex: 1;
      overflow-y: auto;
      padding: 1rem;
      min-height: auto;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-form-container {
      padding: 1rem;
      padding-top: 1rem;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .brand-title {
      font-size: 1.1rem;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .brand-subtitle {
      font-size: 0.75rem;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-form-wrapper {
      padding: 1rem;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-logo {
      max-width: 60px;
    }
  }

  @media (max-width: 768px) and (orientation: landscape) {
    .auth-header-content {
      margin-bottom: 1rem;
    }
  }

  /* Samsung Fold and other foldables */

  @media (max-width: 280px) {
    .auth-left {
      height: 20dvh;
      padding: 0.5rem;
    }
  }

  @media (max-width: 280px) {
    .auth-logo {
      max-width: 60px;
    }
  }

  @media (max-width: 280px) {
    .brand-title {
      font-size: 1rem;
    }
  }

  @media (max-width: 280px) {
    .brand-subtitle {
      font-size: 0.7rem;
    }
  }

  @media (max-width: 280px) {
    .auth-right {
      padding: 0;
    }
  }

  @media (max-width: 280px) {
    .auth-form-container {
      padding: 0.5rem;
      padding-top: 1rem;
    }
  }

  @media (max-width: 280px) {
    .auth-form-wrapper {
      padding: 0.75rem;
    }
  }

  @media (max-width: 280px) {
    .auth-title {
      font-size: 1rem;
    }
  }

  @media (max-width: 280px) {
    .auth-description {
      font-size: 0.75rem;
    }
  }

  /* Hide scroll to top button on auth pages */
  .scroll-to-top {
    display: none !important;
  }