/* Sign in / create account: one form at a time, on the account page and in the header dialog. */
body.yzt-account-page--guest:not(.yzt-auth-register) #customer_login > .u-column2,
body.yzt-account-page--guest.yzt-auth-register #customer_login > .u-column1,
.yzt-auth-dialog:not(.yzt-auth-register) #customer_login > .u-column2,
.yzt-auth-dialog.yzt-auth-register #customer_login > .u-column1 { display: none !important; }

body.yzt-account-page--guest #customer_login,
.yzt-auth-dialog #customer_login { display: block; }
body.yzt-account-page--guest #customer_login,
body.yzt-account-page--guest .yzt-auth__head { margin-inline: auto; max-width: 27rem; }
body.yzt-account-page--guest #customer_login h2,
.yzt-auth-dialog #customer_login h2 { display: none; }

.yzt-auth__head { margin-bottom: 1.25rem; }
.yzt-auth__head h1 {
  font: 700 clamp(1.4rem, 2.2vw, 1.75rem) / 1.2 var(--wp--preset--font-family--display) !important;
  letter-spacing: -.02em;
  margin: 0 0 .35rem !important;
}
.yzt-auth__head > p { color: var(--yzt-ink-soft); font-size: .88rem; line-height: 1.5; margin: 0; }

.yzt-auth__tabs {
  background: var(--yzt-surface);
  border: 1px solid var(--yzt-hairline);
  border-radius: var(--yzt-button-radius, 5px);
  display: grid;
  gap: .25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.1rem;
  padding: .25rem;
}
.yzt-auth__tabs a {
  border-radius: calc(var(--yzt-button-radius, 5px) - 1px);
  color: var(--yzt-ink-soft);
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.2;
  padding: .6rem .5rem;
  text-align: center;
  text-decoration: none;
}
.yzt-auth__tabs a:hover { color: var(--yzt-ink); }
.yzt-auth__tabs a[aria-selected="true"] {
  background: var(--yzt-paper);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--yzt-ink) 14%, transparent);
  color: var(--yzt-ink);
}
.yzt-auth__tabs a:focus-visible,
.yzt-auth-dialog__close:focus-visible { outline: 2px solid var(--yzt-brand); outline-offset: 2px; }

.yzt-auth__switch {
  border-top: 1px solid var(--yzt-hairline);
  color: var(--yzt-ink-soft);
  font-size: .84rem;
  margin: 1.1rem 0 0;
  padding-top: 1rem;
}
.yzt-auth__switch a { color: var(--yzt-brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }

/* Dialog */
.yzt-auth-dialog {
  background: var(--yzt-paper);
  border: 1px solid var(--yzt-hairline);
  border-radius: var(--yzt-card-radius);
  box-shadow: 0 24px 64px rgb(17 24 39 / .24);
  color: var(--yzt-ink);
  max-height: calc(100dvh - 2rem);
  max-width: none;
  overflow: auto;
  padding: 0;
  width: min(27rem, calc(100vw - 2rem));
}
.yzt-auth-dialog::backdrop { background: rgb(17 24 39 / .55); }
.yzt-auth-dialog__inner { padding: 1.5rem; position: relative; }
.yzt-auth-dialog__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: var(--yzt-button-radius, 5px);
  color: var(--yzt-ink-soft);
  cursor: pointer;
  display: flex;
  font-size: 1.5rem;
  height: 2.25rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: .6rem;
  top: .6rem;
  width: 2.25rem;
}
.yzt-auth-dialog__close:hover { background: var(--yzt-surface); color: var(--yzt-ink); }
.yzt-auth-dialog__loading { color: var(--yzt-ink-soft); font-size: .9rem; margin: 0; padding: 2rem 0; text-align: center; }
.yzt-auth-dialog .yzt-auth__head { margin-right: 2rem; }
.yzt-auth-dialog .yzt-auth__tabs { margin-right: -2rem; }
.yzt-auth-dialog form { background: transparent; border: 0; margin: 0; padding: 0; }
.yzt-auth-dialog form .form-row { margin: 0 0 1rem; padding: 0; }
.yzt-auth-dialog form .form-row > label:not(.woocommerce-form__label-for-checkbox) { color: var(--yzt-ink-soft); display: block; font-size: .8rem; font-weight: 600; margin-bottom: .35rem; }
.yzt-auth-dialog form .password-input { display: block; }
.yzt-auth-dialog form input.input-text {
  background: var(--yzt-paper);
  border: 1px solid var(--yzt-hairline);
  border-radius: var(--yzt-control-radius, 5px);
  color: var(--yzt-ink);
  font: inherit;
  min-height: 2.75rem;
  padding: .55rem .75rem;
  width: 100%;
}
.yzt-auth-dialog form input.input-text:focus { border-color: var(--yzt-brand); outline: 2px solid color-mix(in srgb, var(--yzt-brand) 25%, transparent); outline-offset: 0; }
.yzt-auth-dialog form .required { color: var(--yzt-brand); text-decoration: none; }
.yzt-auth-dialog form .woocommerce-form__label-for-checkbox { align-items: center; display: flex; font-size: .84rem; gap: .5rem; margin-bottom: .9rem; }
.yzt-auth-dialog form button[type="submit"] {
  background: var(--yzt-brand);
  border: 1px solid var(--yzt-brand);
  border-radius: var(--yzt-button-radius, 5px);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  font-weight: 650;
  min-height: 2.75rem;
  padding: .6rem 1.4rem;
  width: 100%;
}
.yzt-auth-dialog form button[type="submit"]:hover { background: color-mix(in srgb, var(--yzt-brand) 84%, #000); }
.yzt-auth-dialog .woocommerce-privacy-policy-text { color: var(--yzt-ink-soft); font-size: .75rem; line-height: 1.5; }
.yzt-auth-dialog .woocommerce-privacy-policy-text p { margin: 0 0 1rem; }
.yzt-auth-dialog .woocommerce-LostPassword { font-size: .8rem; margin: .75rem 0 0; }
.yzt-auth-dialog .woocommerce-LostPassword a { color: var(--yzt-brand); }
.yzt-auth-dialog .screen-reader-text { clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; width: 1px; }

body.yzt-account-page--guest form.login button[type="submit"],
body.yzt-account-page--guest form.register button[type="submit"] { width: 100%; }

/* WooCommerce's own two-column and boxed-form styles must not leak into the dialog. */
.yzt-auth-dialog #customer_login::before,
.yzt-auth-dialog #customer_login::after { display: none; }
.yzt-auth-dialog #customer_login > div {
  flex: none !important;
  float: none !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}
.yzt-auth-dialog form.login,
.yzt-auth-dialog form.register {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.yzt-auth-dialog .yzt-auth__head { margin-bottom: 1.25rem; max-width: none; }
