/* Custom Login / Create Account / Reset Password page styling.
   Shared by frontend/account/login.blade.php, register.blade.php and
   reset-password.blade.php. Reuses the shared gold/charcoal/ivory tokens
   from shop-premium-tokens.css (same palette as every other redesigned
   page this pass) so account pages read as part of the same site instead
   of the old plain white/grey card.

   Everything here is scoped under .account-auth / .field inside
   .account-auth__form, so it never touches the site-wide .field/.button
   components used elsewhere (checkout, contact, addresses). */

.account-auth {
  padding-top: 6rem;
  padding-bottom: 8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--pdp-ivory, #faf6ef);
}

.account-auth__card {
  width: 100%;
  max-width: 46rem;
  background: var(--pdp-card, #fff);
  border: 1px solid var(--pdp-line, #e8dcc8);
  border-radius: var(--pdp-radius-lg, 16px);
  box-shadow: var(--pdp-shadow-sm, 0 2px 10px rgba(43, 36, 29, 0.06));
  padding: 3.6rem 3.5rem;
  box-sizing: border-box;
}

@media screen and (max-width: 749px) {
  .account-auth__card {
    padding: 2.8rem 2rem;
  }
}

.account-auth__title {
  text-align: center;
  margin: 0 0 1.2rem;
  font-family: var(--font-heading-family, serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  color: var(--pdp-ink, #2b241d);
}

.account-auth__title::after {
  content: "";
  display: block;
  width: 5.2rem;
  height: 2px;
  margin: 1.4rem auto 0;
  background: linear-gradient(90deg, transparent, var(--pdp-gold, #b8860b), transparent);
}

.account-auth__subtitle {
  text-align: center;
  margin: 0 0 3rem;
  color: var(--pdp-ink-soft, rgba(43, 36, 29, 0.66));
}

.account-auth__form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.account-auth__name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

@media screen and (max-width: 480px) {
  .account-auth__name-row {
    grid-template-columns: 1fr;
  }
}

.account-auth__row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.8rem;
}

.account-auth__forgot {
  font-size: 1.3rem;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--pdp-gold-dark, #8a6508);
}

.account-auth__forgot:hover {
  color: var(--pdp-ink, #2b241d);
}

.account-auth__submit {
  margin-top: 0.5rem;
}

.account-auth__submit .button,
.button--full-width {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 1.3rem 2rem;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02rem;
  color: #fff;
  background: linear-gradient(135deg, var(--pdp-gold-light, #d9b25c), var(--pdp-gold, #b8860b));
  cursor: pointer;
  transition: filter 0.2s var(--pdp-ease, ease), transform 0.2s var(--pdp-ease, ease);
}

.account-auth__submit .button:hover,
.button--full-width:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

.account-auth__switch {
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 0;
  font-size: 1.4rem;
  color: var(--pdp-ink-soft, rgba(43, 36, 29, 0.66));
}

.account-auth__switch a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  color: var(--pdp-gold-dark, #8a6508);
}

/* Field styling — scoped to this form only, so the site's other .field
   usages (checkout, contact, addresses) are untouched. */
.account-auth__form .field {
  position: relative;
}

.account-auth__form .field__input {
  background: var(--pdp-ivory, #faf6ef);
  border-color: var(--pdp-line, #e8dcc8);
  color: var(--pdp-ink, #2b241d);
  transition: border-color 0.2s var(--pdp-ease, ease), background 0.2s var(--pdp-ease, ease);
}

.account-auth__form .field__input:focus,
.account-auth__form .field__input:focus-visible {
  border-color: var(--pdp-gold, #b8860b);
  background: var(--pdp-card, #fff);
}

.account-auth__form .field__label {
  color: var(--pdp-ink-faint, rgba(43, 36, 29, 0.42));
}

.account-auth__toggle-password {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  letter-spacing: 0.04rem;
  text-transform: uppercase;
  color: var(--pdp-gold-dark, #8a6508);
  padding: 0.5rem;
}

.account-auth__toggle-password:hover {
  color: var(--pdp-ink, #2b241d);
}

/* Error / success messaging */
.account-auth__errors,
.account-auth__success {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  border-radius: var(--pdp-radius-sm, 6px);
  padding: 1.3rem 1.5rem;
  font-size: 1.36rem;
  line-height: 1.5;
}

/* The class rule above has the same specificity as the browser's built-in
   [hidden] rule and loads later, so without this it would win and the
   hidden attribute would stop actually hiding the element. */
.account-auth__errors[hidden],
.account-auth__success[hidden] {
  display: none;
}

.account-auth__msg-icon {
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  margin-top: 0.1rem;
}

.account-auth__msg-body {
  flex: 1;
  min-width: 0;
}

.account-auth__errors {
  background: rgba(163, 64, 47, 0.07);
  border: 1px solid rgba(163, 64, 47, 0.28);
  color: var(--pdp-danger, #a3402f);
}

.account-auth__errors .account-auth__msg-icon {
  color: var(--pdp-danger, #a3402f);
}

.account-auth__errors ul {
  margin: 0;
  padding-left: 1.6rem;
}

.account-auth__success {
  background: rgba(63, 122, 83, 0.08);
  border: 1px solid rgba(63, 122, 83, 0.28);
  color: var(--pdp-success, #3f7a53);
}

.account-auth__success .account-auth__msg-icon {
  color: var(--pdp-success, #3f7a53);
}

.field--invalid .field__input {
  border-color: var(--pdp-danger, #a3402f) !important;
}

/* The base theme's .field is a flex row that wraps onto a second line for
   this message (see .field--with-error), inside the SAME bordered box as
   the input — but only the input itself picks up the ivory background
   above, so without this the message sits on bare white with a hard seam.
   Tinting it and giving it matching bottom corners makes the whole field
   read as one piece instead of two mismatched panels. */
.account-auth__form .field__error-message {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  font-size: 1.24rem;
  font-weight: 500;
  color: var(--pdp-danger, #a3402f);
  background: rgba(163, 64, 47, 0.06);
  border-radius: 0 0 var(--pdp-radius-sm, 6px) var(--pdp-radius-sm, 6px);
  margin: 0;
  padding: 0.7rem 1.5rem 0.75rem;
}

.account-auth__form .field__error-message::before {
  content: "!";
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--pdp-danger, #a3402f);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4rem;
  text-align: center;
}

/* Smooth transition between the login and "forgot password" views */
.account-auth__card[data-view] {
  transition: opacity var(--duration-default, 0.2s) ease;
}
