/* ==========================================================================
   PAGE / auth — LOGIN (ברוכים השבים) + FORGOT PASSWORD (שכחת סיסמה?)
   Figma: "LogIn"
   Both states live in one page — assets/js/pages/auth.js toggles between
   .auth-panel--login and .auth-panel--forgot. "LogIn Annual Plan" and
   "Sign In" are separate frames, not yet built — see README.
   Per project convention: literal Figma pixels for spacing/sizing, tokens
   for color/font. No asset exists yet for the embroidered tree
   illustration — see the placeholder note on .auth-image below.
   ========================================================================== */

.auth-shell {
  max-width: 1470px;
  min-height: 705px;
  margin: 0 auto;
  display: flex;
  direction: rtl;
  align-items: stretch;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}

.auth-shell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../../images/login/Frame-Thele.png);
    background-repeat: no-repeat;
    background-position: top center;
    background-size: auto;
    z-index: -1;
    pointer-events: none;
    background-size: contain;
    width: 100%;
    height: 100%;
}

/* --- Illustration panel ---
   NOTE: Figma shows a custom embroidered "tree of books" illustration
   here (718x600) that isn't among the current asset files. The SVG
   below is a stylized placeholder in the site's own line-art palette —
   swap in the real exported asset for a pixel-perfect match. */
.auth-image {
  /* width: 718px; */
  /* min-height: 600px; */
  flex-shrink: 0;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 0;
  top: -35px;
  left: 5px;
  z-index: -1;
  pointer-events: none;
}

.auth-image svg {
  width: 60%;
  height: auto;
}


.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

/* --- Form panel --- */
.auth-form-panel {
  flex: 1;
  min-width: 0;
  padding: 88px 110px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: right;
}

.auth-panel {
  display: none;
  flex-direction: column;
  /* gap: 24px; */
  max-width: 505px;
}

.auth-panel.is-active {
  display: flex;
}

.auth-title {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 40px;
  line-height: 36px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
  margin-bottom: 8px;
}

.auth-subtitle {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 22px;
  line-height: 24px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
  margin-bottom: 15px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field label {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 20px;
  line-height: 20px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
}

.auth-field input {
  width: 100%;
  max-width: 506px;
  height: 53px;
  border: none;
  border-radius: 8px;
  padding: 17px 24px;
  background: var(--color-auth-input-bg);
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-heading);
  text-align: right;
  direction: rtl;
}

.auth-field input:focus {
  outline: 2px solid var(--color-pink-accent);
  outline-offset: 1px;
}

.auth-forgot-link {
  align-self: flex-start;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 20px;
  line-height: 16px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.auth-submit-btn {
  width: 100%;
  max-width: 506px;
  height: 50px;
  border: none;
  border-radius: 999px;
  padding: 15px 32px;
  background: var(--color-pink-accent);
  color: var(--color-white);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0px;
  cursor: pointer;
  margin-top: 22px;
}

.auth-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 506px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-icon);
}

.auth-divider span {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
}

.auth-outline-btn {
  width: 100%;
  max-width: 505px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 100px;
  border: 1px solid var(--color-pink-accent);
  background: var(--color-auth-panel-bg);
  padding: 12px 0;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0px;
  color: var(--color-profile-text);
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 9px;
}

.auth-success-message {
  display: none;
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
  text-align: center;
}

.auth-success-message.is-visible {
  display: block;
}

.auth-countdown {
  display: none;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
  text-align: center;
}

.auth-back-link {
  align-self: center;
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 20px;
  line-height: 16px;
  letter-spacing: 0px;
  color: var(--color-text-heading);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 22px;
}

@media (max-width: 1023px) {
  .auth-shell {
    flex-direction: column;
    margin-left: var(--space-5);
    margin-right: var(--space-5);
  }

  .auth-image {
    width: 100%;
    min-height: 260px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 0;
  }

  .auth-form-panel {
    padding: 40px 32px;
  }
}

@media (max-width: 599px) {
  .auth-shell {
    min-height: 0;
    border-radius: 16px;
    margin-top: 0;
  }

  .auth-image {
    min-height: 180px;
  }

  .auth-form-panel {
    padding: 32px 20px;
  }

  .auth-title {
    font-size: 30px;
    line-height: 34px;
  }

  .auth-subtitle {
    font-size: 18px;
    line-height: 22px;
  }

  .auth-field label,
  .auth-forgot-link,
  .auth-back-link {
    font-size: 17px;
  }

  .auth-submit-btn,
  .auth-outline-btn {
    font-size: 17px;
  }
}

