/**
 * Auth screens (login / register / lost password / reset password).
 *
 * Self-contained: does NOT depend on checkout.css's `.step_card` (which
 * carries a `counter-increment` orange step badge that has no business
 * appearing on an auth screen). See woocommerce/myaccount/form-login.php
 * and the other myaccount/form-*password*.php overrides.
 *
 * A single centered card, not a split layout with a brand panel: the
 * site header/footer still wrap this section (it's not a dedicated
 * full-bleed auth page), so a tall side panel next to a small card read
 * unbalanced rather than premium — see inc/woocommerce.php's
 * wp_theme_agent_auth_shell_open() for the history.
 */
.auth_main {
  border-top: 1px solid var(--border);
}
.auth_card_wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  padding: 7rem 3rem;
}
.auth_card {
  width: 100%;
  max-width: 52rem;
  background-color: #fff;
  border-radius: 1.6rem;
  border: 1px solid #edefef;
  box-shadow: var(--shadow2);
  padding: 5rem 5.2rem 5.4rem;
}
.auth_card .head {
  text-align: center;
  margin-bottom: 2.8rem;
}
.auth_card .head h1 {
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--title);
}
.auth_card .head p {
  margin-top: 0.8rem;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text);
}

/* ---- Tabs --------------------------------------------------------------- */
.auth_tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--bg);
  border-radius: 1.1rem;
  padding: 0.5rem;
  margin-bottom: 2.8rem;
}
.auth_tab {
  display: block;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 0.8rem;
  padding: 1.25rem 0;
  transition: all 0.2s;
}
.auth_card[data-active-tab="login"] .auth_tab[data-tab="login"],
.auth_card[data-active-tab="register"] .auth_tab[data-tab="register"] {
  background-color: #fff;
  color: var(--title);
  box-shadow: var(--shadow);
}

.auth_panel {
  display: none;
}
.auth_card[data-active-tab="login"] .auth_panel[data-panel="login"],
.auth_card[data-active-tab="register"] .auth_panel[data-panel="register"] {
  display: block;
}

/* ---- Fields --------------------------------------------------------------- */
.auth_card form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.auth_card .field {
  display: block;
}
.auth_card .field_label {
  display: block;
  font-size: 1.5rem;
  font-weight: 500;
  color: #52605a;
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}
.auth_card .field_control {
  position: relative;
  display: block;
  height: 5.4rem;
}
.auth_card form input[type="text"],
.auth_card form input[type="email"],
.auth_card form input[type="password"] {
  display: block;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--title);
  padding: 0 2rem;
  height: 5.4rem;
}
.auth_card form input[type="text"]::placeholder,
.auth_card form input[type="email"]::placeholder,
.auth_card form input[type="password"]::placeholder {
  color: #9aa3a1;
}
.auth_card form input[type="text"]:focus,
.auth_card form input[type="email"]:focus,
.auth_card form input[type="password"]:focus {
  border-color: #1c6b57;
}
.auth_card .field_control:has(.pw_toggle) input {
  padding-right: 5.4rem;
}
.auth_card .pw_toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 0.7rem;
  background: url("../img/icon-eye.svg") no-repeat center / 1.9rem;
  background-color: transparent;
}
.auth_card .pw_toggle:hover {
  background-color: var(--bg);
}
.auth_card .pw_toggle.is-visible {
  background-image: url("../img/icon-eye-off.svg");
}

/* ---- Remember / lost password row ------------------------------------------ */
.auth_card .field_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.auth_card .checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}
.auth_card .checkbox input {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  background-color: #fff;
  transition: all 0.2s;
}
.auth_card .checkbox input:checked {
  border-color: #1c6b57;
  background: url("../img/gou-w2.svg") no-repeat center / 55% #1c6b57;
}
.auth_card .auth_link {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1c6b57;
  text-decoration: underline transparent;
  transition: all 0.3s;
}
.auth_card .auth_link:hover {
  text-decoration-color: currentColor;
}

/* ---- Submit / footer ------------------------------------------------------- */
.auth_card form .btn {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  line-height: 5.4rem;
}
.auth_card .hint {
  margin-top: 2.4rem;
  text-align: center;
  font-size: 1.5rem;
  color: var(--text);
}
.auth_card .back_link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--title);
  margin-bottom: 2.4rem;
}
.auth_card .back_link::before {
  content: '';
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  transform: rotate(180deg);
  background: url("../img/arrow-r.svg") no-repeat center / contain;
}
.auth_card .back_link:hover {
  color: var(--primary);
}
.auth_card p.register_note {
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.6;
}

/* ---- Success state (lost-password-confirmation) ---------------------------- */
.auth_card.success {
  text-align: center;
}
.auth_card .success_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 50%;
  background-color: #eaf7f0;
  margin-bottom: 2rem;
}
.auth_card .success_icon img {
  width: 2.4rem;
  height: 2.4rem;
}
.auth_card.success .btn {
  margin-top: 2.6rem;
}

/* ---- Notices inside the auth card ------------------------------------------
   Shape and colours come from the shared component in public.css; the card is
   narrow, so only the padding and badge size are tightened here. */
.auth_card .woocommerce-error,
.auth_card .woocommerce-message,
.auth_card .woocommerce-info {
  margin: 0 0 2rem;
  padding: 1.6rem 1.8rem 1.6rem 5.2rem;
}
.auth_card .woocommerce-error::before,
.auth_card .woocommerce-message::before,
.auth_card .woocommerce-info::before {
  left: 1.8rem;
  top: 1.6rem;
  width: 2.4rem;
  height: 2.4rem;
}
.auth_card .woocommerce-message,
.auth_card .woocommerce-info,
.auth_card .woocommerce-error li:only-child {
  min-height: 2.4rem;
}

@media screen and (max-width: 768px) {
  .auth_main {
    border-top: none;
  }
  .auth_card_wrap {
    padding: 30px 16px 50px;
  }
  .auth_card {
    max-width: 100%;
    padding: 28px 22px 32px;
    border-radius: 10px;
  }
  .auth_card .head {
    margin-bottom: 20px;
  }
  .auth_card .head h1 {
    font-size: 24px;
  }
  .auth_card .head p {
    margin-top: 6px;
    font-size: 14px;
  }
  .auth_tabs {
    margin-bottom: 20px;
  }
  .auth_card form {
    gap: 14px;
  }
  .auth_card .field_label {
    font-size: 14px;
    margin-bottom: 7px;
  }
  .auth_card form input[type="text"],
  .auth_card form input[type="email"],
  .auth_card form input[type="password"] {
    height: 48px;
    font-size: 15px;
    border-radius: 6px;
  }
  .auth_card .field_control {
    height: 48px;
  }
  .auth_card .pw_toggle {
    width: 38px;
    height: 38px;
    right: 5px;
    background-size: 17px;
  }
  .auth_card .hint {
    margin-top: 18px;
    font-size: 14px;
  }
  .auth_card .back_link {
    margin-bottom: 18px;
  }
}
@media screen and (max-width: 576px) {
  .auth_card_wrap {
    padding: 24px 12px 40px;
  }
  .auth_card .field_row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
