/* Auth Page Styles - Modern Split Card with Slider */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f0f2f5;
  padding: 20px;
  font-family: "Vazirmatn", sans-serif;
  --form-label-gap: 8px;
  --form-row-gap: 24px;
  --form-floating-row-gap: 24px;
  --form-stack-row-gap: 24px;
}

.auth-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 900px;
  background-color: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  min-height: 550px;
}

/* Visual Side (Left) - Slider */
.auth-visual-side {
  flex: 1;
  background: linear-gradient(135deg, #3390ec 0%, #2275c9 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

/* Decorative circles */
.auth-visual-side::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.auth-visual-side::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

/* Slider Styles */
.slider-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.slides {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px; /* Ensure space for content */
  position: relative;
}

/* Slide Animations */
.slide {
  display: none;
  opacity: 0;
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.slide.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  animation: slideEnter 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.visual-content {
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.visual-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.visual-text {
  font-size: 16px;
  line-height: 1.8;
  max-width: 90%;
  margin: 0;
  opacity: 0.95;
}

.visual-text b {
  font-weight: 800;
  color: #ffffff;
}

/* Features List Dark Theme */
.features-list-dark {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 320px;
}

.features-list-dark li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  transition: transform 0.2s;
}

.features-list-dark li:hover {
  transform: translateX(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.features-list-dark .icon {
  font-size: 20px;
}

.features-list-dark .text {
  text-align: right;
}

.features-list-dark strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: #ffffff;
}

.features-list-dark p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Dots */
.slider-dots {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.dot-container {
  position: relative;
  width: 24px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
}

.dot-progress {
  position: absolute;
  top: 0;
  right: 0; /* RTL fill */
  height: 100%;
  width: 0;
  background-color: #ffffff;
  border-radius: 2px;
}

.dot-container.active .dot-progress {
  animation: dotProgressFill 5s linear forwards; /* Matches the JS interval */
}

.dot-container:not(.active) .dot-progress {
  width: 0;
  animation: none;
}

@keyframes dotProgressFill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Form Side (Right) */
.auth-form-side {
  flex: 1;
  background-color: #ffffff;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  margin-bottom: 16px;
}

.auth-logo svg {
  display: block;
}

.auth-header h1 {
  font-size: 20px;
  color: #3390ec;
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.welcome-title {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.welcome-subtitle {
  font-size: 15px;
  color: #707579;
  margin: 0 0 32px 0;
}

.auth-floating-group {
  margin-top: 8px;
}

.auth-floating-group .floating-label {
  right: 14px;
  font-size: 14px;
  font-weight: 600;
}

.input-label {
  display: block;
  font-size: 14px;
  color: #1a1a1a;
  margin-bottom: 8px;
  font-weight: 500;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #dfe1e5;
  background-color: #ffffff;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  height: 50px;
  box-sizing: border-box;
  direction: ltr;
  text-align: left;
}

.auth-input::placeholder {
  direction: rtl;
  text-align: right;
  color: #a0a0a0;
}

.auth-input:focus {
  border-color: #3390ec;
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.1);
}

.auth-input.centered {
  text-align: center;
  letter-spacing: 5px;
  font-weight: 700;
  font-size: 18px;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  background-color: #3390ec;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(51, 144, 236, 0.2);
}

.auth-btn:hover {
  background-color: #2883d9;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(51, 144, 236, 0.3);
}

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

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

/* Helper Text */
.error-message {
  color: #e53935;
  font-size: 13px;
  margin-top: 8px;
  text-align: right;
}

.code-sent-text {
  font-size: 14px;
  color: #707579;
  margin-bottom: 24px;
  text-align: center;
}

.otp-debug-hint,
.otp-debug-code {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed #b7d8fb;
  background: #f2f8ff;
  color: #2f6fb7;
  font-size: 13px;
  text-align: center;
}

.otp-debug-code {
  direction: ltr;
}

.otp-debug-code b {
  font-size: 15px;
  letter-spacing: 2px;
  color: #1e5ea6;
}

.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 13px;
}

.timer-box {
  color: #707579;
}

.resend-link,
.edit-phone-link {
  color: #3390ec;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.resend-link:hover,
.edit-phone-link:hover {
  text-decoration: underline;
}

/* Animations */
.step {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step.active {
  display: block;
}

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

/* Responsive */
@media (max-width: 900px) {
  .auth-page {
    padding: 16px;
    align-items: flex-start;
  }

  .auth-card {
    flex-direction: column;
    max-width: 450px;
    border-radius: 20px;
    min-height: auto;
  }

  /* Visual Side on Top */
  .auth-visual-side {
    padding: 30px;
    min-height: 280px; /* Slightly taller for slider */
  }

  .slides {
    min-height: 250px;
  }

  .visual-img {
    max-width: 180px;
  }

  .visual-text {
    font-size: 14px;
    margin-top: 10px;
  }

  .features-list-dark {
    gap: 12px;
  }

  .features-list-dark li {
    padding: 10px 12px;
  }

  /* Form Side */
  .auth-form-side {
    padding: 30px;
  }

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

  .auth-header {
    margin-bottom: 24px;
    text-align: center;
  }

  .auth-header h1 {
    justify-content: center;
  }
}
