/*
 * Đăng nhập (M10/D10), Đăng ký (M10c/D10b), Quên mật khẩu. Đặc tả: docs/plans/11-dac-ta-wireframe.md 2.6, 2.7.
 * Phụ thuộc: shop.css
 */

/* Mobile: nền trắng, không header */
.tg-shop--auth {
  background: var(--color-surface);
}

.tg-auth__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-1) var(--space-2);
}

.tg-auth__help {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-2);
  color: var(--color-brand);
  font-size: var(--text-14);
  font-weight: var(--weight-semibold);
}

.tg-auth__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5) var(--space-8);
}

.tg-auth__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-3xl);
  background: var(--color-brand);
  color: var(--color-text-on-dark);
  --icon-size: 28px;
}

.tg-auth__title {
  font-size: var(--text-24);
  font-weight: var(--weight-bold);
}

.tg-auth__lead {
  color: var(--color-text-muted);
  font-size: var(--text-14);
}

/* Lợi ích: icon tick trong vòng tròn 18px nền xanh nhạt */
.tg-auth__benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  font-size: var(--text-meta);
  list-style: none;
}

.tg-auth__benefits li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tg-auth__tick {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-round);
  background: var(--color-brand-soft);
  color: var(--color-brand);
  --icon-size: 12px;
  --icon-stroke: 3;
}

.tg-auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.tg-auth__form .tg-field__label {
  color: var(--color-text);
  font-size: var(--text-15);
  font-weight: var(--weight-semibold);
}

.tg-auth__form .tg-input {
  min-height: 50px;
}

.tg-auth__form .tg-field__error a {
  color: inherit;
  font-weight: var(--weight-semibold);
  text-decoration: underline;
}

.tg-auth__forgot {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--color-brand);
  font-size: var(--text-14);
  font-weight: var(--weight-semibold);
}

.tg-auth__checks {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-meta);
}

.tg-auth__checks .tg-check {
  align-items: flex-start;
  padding-block: var(--space-2-5);
  font-size: var(--text-meta);
}

.tg-auth__checks .tg-check input {
  margin-top: 1px;
}

.tg-auth__checks a {
  color: var(--color-brand);
  text-decoration: underline;
}

.tg-auth__submit {
  min-height: 52px;
  font-size: var(--text-16);
}

.tg-auth__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  font-size: var(--text-14);
  text-align: center;
}

.tg-auth__switch {
  color: var(--color-brand);
  font-weight: var(--weight-bold);
}

.tg-auth__guest {
  display: inline-flex;
  align-items: center;
  gap: var(--space-0-5);
  min-height: var(--tap-min);
  color: var(--color-text-secondary);
  font-weight: var(--weight-bold);
  --icon-size: 16px;
}

.tg-auth__legal {
  color: var(--color-text-muted);
  font-size: var(--text-meta);
}

.tg-auth__legal a {
  color: var(--color-text-muted);
  text-decoration: underline;
}

/* Quên mật khẩu (form của Woo) */
.tg-lost-password {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 460px;
  margin-inline: auto;
  padding: var(--space-5);
}

.tg-lost-password__note {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-size: var(--text-14);
}

.tg-lost-password__note a {
  color: var(--color-brand);
  font-weight: var(--weight-semibold);
}

/* =========================================================
   Desktop: dải gradient xanh, giới thiệu bên trái, thẻ form bên phải
   ========================================================= */
@media (min-width: 1024px) {
  .tg-shop--auth {
    padding-block: 0;
    background: var(--color-bg);
  }

  .tg-auth__band {
    padding-block: var(--space-10);
    background: linear-gradient(120deg, var(--color-brand) 0%, var(--color-brand-strong) 100%);
  }

  .tg-auth__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-10);
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .tg-auth__intro {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    max-width: 520px;
    color: var(--color-text-on-dark);
  }

  .tg-auth__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: var(--radius-hero);
    background: var(--color-surface);
    color: var(--color-brand);
    --icon-size: 44px;
  }

  .tg-auth__headline {
    font-size: var(--text-34);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
  }

  .tg-auth__intro .tg-auth__benefits {
    gap: var(--space-3);
    font-size: var(--text-16);
  }

  .tg-auth__intro .tg-auth__tick {
    width: 24px;
    height: 24px;
    background: var(--glass-bg-strong);
    color: var(--color-text-on-dark);
    --icon-size: 14px;
  }

  .tg-auth__card {
    flex: none;
    width: 420px;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-float);
  }

  .tg-auth--register .tg-auth__card {
    width: 460px;
    border-radius: var(--radius-3xl);
  }

  .tg-auth__form .tg-input {
    min-height: 46px;
  }

  .tg-auth__form .tg-field__label {
    font-size: var(--text-14);
  }

  .tg-auth__submit {
    min-height: 46px;
  }

  .tg-auth--register .tg-auth__submit {
    min-height: 48px;
  }

  .tg-lost-password {
    margin-block: var(--space-8);
    border: 1px solid var(--color-border-warm);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
  }
}

/* Mobile: trang ngắn hơn màn hình thì phần dưới vẫn trắng như wireframe */
@media (max-width: 1023px) {
  body:has(.tg-shop--auth) {
    background: var(--color-surface);
  }
}

/* Desktop: dải xanh chạm footer (footer chung có margin-top) */
@media (min-width: 1024px) {
  .tg-shop--auth + .tg-footer {
    margin-top: 0;
  }
}
