/* ==========================================================================
   Woodman — Sign in & Sign up
   Logged-out account pages (sign in, create account, password reset) and the
   header sign-in popup. Loaded for logged-out visitors only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Legacy content on live's My Account page

   Page 20 on live carries WPBakery page CSS that hides `.woocommerce-form`,
   plus a row (`.neslo`) holding a standalone Google button — the old
   Google-only setup. Page content survives a theme switch, so both are
   neutralised here instead of relying on a manual page edit at launch.
   -------------------------------------------------------------------------- */
.wm-auth .woocommerce-form { visibility: visible !important; }
.wm-auth-page .vc_row.neslo { display: none !important; }

/* --------------------------------------------------------------------------
   Page chrome
   -------------------------------------------------------------------------- */

/* The card carries its own heading; keep "My account" for screen readers only. */
.wm-auth-page .page-title {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wm-auth-page .page-content { padding-top: 32px; padding-bottom: 64px; }

.wm-auth-page .woocommerce-notices-wrapper { max-width: 920px; margin: 0 auto 16px; }
.wm-auth-page .woocommerce:has(.wm-auth--single) .woocommerce-notices-wrapper { max-width: 460px; }

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.wm-auth {
  --wm-pad: 40px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  max-width: 920px;
  margin: 0 auto;
  background: var(--w);
  border: 1px solid var(--g2);
  border-radius: 20px;
  overflow: hidden;
  font-family: var(--f);
  color: var(--g8);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 24px 48px -24px rgba(17, 17, 17, .22);
}

.wm-auth--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 460px;
}

/* Brand panel ------------------------------------------------------------ */
.wm-auth__brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: var(--wm-pad) 34px;
  background: linear-gradient(160deg, var(--c) 0%, var(--cd) 100%);
  color: #fff;
  overflow: hidden;
}

/* Concentric rings — a nod to speaker cones and dash dials. */
.wm-auth__brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, .07),
    0 0 0 68px rgba(255, 255, 255, .045),
    0 0 0 102px rgba(255, 255, 255, .03);
  pointer-events: none;
}

.wm-auth__logo {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
}

.wm-auth__wordmark {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wm-auth__pitch {
  max-width: 15ch;
  margin: 22px 0 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.015em;
  text-wrap: balance;
  color: #fff;
}

.wm-auth__perks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wm-auth__perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .94);
}

.wm-auth__perks li::before {
  content: "";
  flex: 0 0 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* Main panel ------------------------------------------------------------- */
.wm-auth__main {
  position: relative;
  min-width: 0;
  padding: var(--wm-pad) 44px 32px;
}

.wm-auth__main--center { text-align: center; }

.wm-auth__icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--cl);
  color: var(--c);
}

.wm-auth__icon--ok { background: #ecfdf3; color: #16a34a; }

.wm-auth__title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  text-wrap: balance;
  color: var(--g9);
}

.wm-auth__sub {
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--g5);
}

/* Tabs ------------------------------------------------------------------- */
.wm-auth__tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 28px;
  padding: 4px;
  border-radius: 999px;
  background: var(--g1);
}

.wm-auth .wm-auth__tab {
  flex: 1 1 0;
  margin: 0;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 600 14px/1 var(--f);
  color: var(--g5);
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}

.wm-auth .wm-auth__tab:hover { color: var(--g8); }

.wm-auth .wm-auth__tab[aria-selected="true"] {
  background: var(--w);
  color: var(--g9);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .08), 0 2px 8px -2px rgba(17, 17, 17, .12);
}

.wm-auth .wm-auth__tab:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

/* Google (Nextend) ------------------------------------------------------- */
.wm-auth .wm-social .nsl-container {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

.wm-auth .wm-social .nsl-container-buttons {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  padding: 0 !important;
}

.wm-auth .wm-social .nsl-container-buttons a {
  display: block !important;
  margin: 0 !important;
  border-radius: var(--rs);
  text-decoration: none !important;
  box-shadow: none !important;
}

.wm-auth .wm-social .nsl-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100% !important;
  height: 50px;
  padding: 0 16px !important;
  border: 1.5px solid var(--g2) !important;
  border-radius: var(--rs) !important;
  background: var(--w) !important;
  box-shadow: none !important;
  transition: border-color .15s, background-color .15s;
}

.wm-auth .wm-social a:hover .nsl-button {
  border-color: var(--g3) !important;
  background: var(--g0) !important;
}

.wm-auth .wm-social a:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

.wm-auth .wm-social .nsl-button-svg-container {
  display: flex !important;
  padding: 0 !important;
}

.wm-auth .wm-social .nsl-button-svg-container svg {
  width: 20px;
  height: 20px;
}

.wm-auth .wm-social .nsl-button-label-container {
  margin: 0 !important;
  padding: 0 !important;
  font: 600 15px/1 var(--f) !important;
  letter-spacing: 0 !important;
  color: var(--g9) !important;
}

.wm-auth .wm-social .nsl-button-label-container b { font-weight: inherit; }

.wm-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--g4);
}

.wm-or::before,
.wm-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--g2);
}

/* Form ------------------------------------------------------------------- */
.wm-auth .wm-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.wm-auth .wm-form .wm-field {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.wm-auth .wm-form label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--g8);
}

.wm-auth .wm-form .required { color: var(--c); }

/* 16px stops iOS Safari zooming the page when a field is focused. */
.wm-auth .wm-form input.input-text {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid var(--g2);
  border-radius: var(--rs);
  background: var(--w);
  box-shadow: none;
  font: 400 16px var(--f);
  color: var(--g9);
  transition: border-color .15s, box-shadow .15s;
}

.wm-auth .wm-form input.input-text::placeholder { color: var(--g4); }
.wm-auth .wm-form input.input-text:hover { border-color: var(--g3); }

.wm-auth .wm-form input.input-text:focus {
  outline: none;
  border-color: var(--c);
  box-shadow: 0 0 0 4px var(--cg);
}

.wm-auth .wm-form input.input-text:user-invalid { border-color: var(--rd); }

/* Show / hide password */
.wm-auth .wm-pass {
  position: relative;
  display: block;
}

/* WooCommerce's frontend script (woocommerce.js) adds its own icon toggle to
   password fields, in one of two ways:
     - inputs with `woocommerce-Input` inside `.woocommerce` get wrapped in a
       NEW span.password-input  (the account page);
     - any other password input under `.woocommerce` gets `password-input`
       added to its EXISTING parent span — here, .wm-pass itself (the popup,
       on pages whose <body> carries the `woocommerce` class).
   Either way it appends a button styled only by WooCommerce's stylesheet,
   which the theme does not load, so it renders 0px tall yet stays focusable:
   an invisible tab stop. Its inline-block line box also adds 24px under the
   field. The theme's labelled Show/Hide control replaces it, so remove the
   button and flatten only a span NESTED inside .wm-pass — never .wm-pass
   itself, which anchors the theme's toggle. */
.wm-auth .wm-pass > .password-input { display: contents; }
.wm-auth .show-password-input { display: none !important; }

.wm-auth .wm-form .wm-pass input.input-text { padding-right: 78px; }

.wm-auth .wm-pass__toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 58px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font: 600 12.5px/1 var(--f);
  letter-spacing: .02em;
  color: var(--g6);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .15s, color .15s;
}

.wm-auth .wm-pass__toggle:hover {
  background: var(--g1);
  color: var(--g9);
}

.wm-auth .wm-pass__toggle:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 1px;
}

/* Remember me + Forgot password */
.wm-form__row--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.wm-auth .wm-form .wm-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--g6);
  cursor: pointer;
}

.wm-auth .wm-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--c);
  cursor: pointer;
}

.wm-auth .wm-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: 600 14px var(--f);
  color: var(--c);
  text-decoration: none;
  cursor: pointer;
}

.wm-auth .wm-link:hover {
  color: var(--cd);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wm-auth .wm-link:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
  border-radius: 4px;
}

.wm-link--back::before { content: "\2190\00a0"; }

/* Primary button */
.wm-auth .wm-form .wm-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin: 4px 0 0;
  padding: 0 24px;
  border: 0;
  border-radius: var(--rs);
  background: var(--c);
  font: 700 15.5px/1 var(--f);
  letter-spacing: .01em;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(255, 106, 13, .65);
  transition: background-color .15s, transform .1s, box-shadow .15s;
}

.wm-auth .wm-form .wm-btn:hover { background: var(--cd); }
.wm-auth .wm-form .wm-btn:active { transform: translateY(1px); }

.wm-auth .wm-form .wm-btn:focus-visible {
  outline: 3px solid rgba(255, 106, 13, .35);
  outline-offset: 2px;
}

/* Submitting — the button keeps its name/value, so it is never disabled
   (a disabled submit button drops `login` / `register` from the POST and
   WooCommerce would ignore the request). */
.wm-auth .wm-form .wm-btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.wm-auth .wm-form .wm-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wm-spin .7s linear infinite;
}

@keyframes wm-spin { to { transform: rotate(360deg); } }

/* Supporting text */
.wm-hint {
  margin: 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--g0);
  font-size: 13px;
  line-height: 1.5;
  color: var(--g5);
}

.wm-auth .woocommerce-privacy-policy-text p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--g4);
}

.wm-auth .woocommerce-privacy-policy-text a {
  color: var(--g6);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wm-auth__switch {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--g1);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--g5);
}

.wm-auth__switch:empty { display: none; }

/* Registration honeypot — off-screen, never focusable. */
.wm-hp {
  position: absolute !important;
  top: auto;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Header popup
   -------------------------------------------------------------------------- */
.wm-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.wm-modal[hidden] { display: none; }

.wm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .22s ease;
}

.wm-modal__dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity .22s ease, transform .22s ease;
}

.wm-modal.is-open .wm-modal__backdrop { opacity: 1; }

.wm-modal.is-open .wm-modal__dialog {
  opacity: 1;
  transform: none;
}

.wm-auth--modal { --wm-pad: 36px; }

.wm-modal .wm-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--g1);
  color: var(--g7);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.wm-modal .wm-modal__close:hover {
  background: var(--g2);
  color: var(--g9);
}

.wm-modal .wm-modal__close:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 2px;
}

body.wm-modal-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .wm-auth {
    --wm-pad: 32px;
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
  }

  .wm-auth__brand { display: none; }
  .wm-auth__main { padding: var(--wm-pad) 32px 28px; }
}

@media (max-width: 560px) {
  .wm-auth-page .page-content { padding-top: 16px; padding-bottom: 40px; }

  .wm-auth {
    --wm-pad: 26px;
    border-radius: 18px;
  }

  .wm-auth__main { padding: var(--wm-pad) 20px 22px; }
  .wm-auth__title { font-size: 23px; }

  /* Popup becomes a bottom sheet. */
  .wm-modal {
    place-items: end stretch;
    padding: 0;
  }

  .wm-modal__dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    transform: translateY(40px);
  }

  .wm-modal.is-open .wm-modal__dialog { transform: none; }
  .wm-auth--modal .wm-auth__main { padding-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .wm-modal__backdrop,
  .wm-modal__dialog,
  .wm-auth .wm-auth__tab,
  .wm-auth .wm-form .wm-btn { transition: none !important; }

  .wm-auth .wm-form .wm-btn.is-loading::after { animation-duration: 1.6s; }
}
