/* Narrow centered column; flat layout (no card). */
.makaz-auth-flow {
  width: 100%;
  max-width: min(100%, 400px);
  margin: 0 auto 1.5em;
  padding: 0;
  min-height: 28rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.makaz-auth-flow--narrow {
  max-width: min(100%, 400px);
  margin-left: auto;
  margin-right: auto;
  min-height: 29rem;
}

.makaz-auth-flow__header {
  margin-bottom: 2.45em;
}

.makaz-auth-flow--forgot-active .makaz-auth-flow__header {
  display: none;
}

.makaz-auth-flow__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  line-height: 1.25;
  text-align: center;
}

.makaz-auth-flow__title-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  color: var(--wd-primary-color, #b01e1e);
}

.makaz-auth-flow__title-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.makaz-auth-flow__title-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.makaz-auth-step {
  display: none;
}

.makaz-auth-step.is-active {
  display: block;
  min-height: 12rem;
}

.makaz-auth-step-title {
  margin: 0 0 2.3em;
}

.makaz-auth-step-title--with-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

/* Class-based hide (reliable vs HTML [hidden] + third-party CSS). */
.makaz-auth-login-block--concealed {
  display: none !important;
}

.makaz-auth-flow--login-revealed .makaz-auth-login-block:not(.makaz-auth-login-block--concealed) {
  display: block !important;
  animation: makaz-auth-reveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#makaz-step-auth .makaz-auth-alert:not([hidden]) {
  margin: 0.75em 0 0;
}

.makaz-auth-alert:not([hidden]) {
  animation: makaz-auth-reveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.makaz-auth-login-block {
  margin: 0.5em 0 0;
  padding: 0.15em 0 0;
}

.makaz-auth-login-fallback {
  animation: makaz-auth-reveal 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.makaz-auth-flow--login-revealed .makaz-auth-email-fields .makaz-auth-inline-row .makaz-auth-button#makaz-next {
  display: none !important;
}

.makaz-auth-flow--login-revealed .makaz-auth-email-fields input#makaz-email:read-only {
  opacity: 0.9;
  cursor: default;
}

.makaz-auth-label {
  display: block;
  margin-bottom: 0.35em;
  font-weight: 600;
}

/* Email + primary action on one row (desktop); password steps stay full width below). */
.makaz-auth-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 0.75em;
}

.makaz-auth-inline-row .makaz-auth-input {
  flex: 1 1 12rem;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 0;
}

.makaz-auth-inline-row .makaz-auth-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 7.5rem;
  margin-bottom: 0;
  align-self: stretch;
}

.makaz-auth-input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.75em;
  box-sizing: border-box;
  padding: 0.65em 0.85em;
  font-size: 1em;
  line-height: 1.4;
  color: var(--wd-title-color, #242424);
  background-color: var(--bgcolor-white, #fff);
  border: 1px solid var(--brdcolor-gray-300, #e0e0e0);
  border-radius: var(
    --wd-form-brd-radius,
    var(--makaz-input-corner-radius, var(--btn-accented-brd-radius, var(--btn-default-brd-radius, 0px)))
  );
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.makaz-auth-input:hover {
  border-color: var(--brdcolor-gray-500, #ccc);
}

.makaz-auth-input:focus {
  border-color: var(--wd-primary-color, #b01e1e);
  outline: 2px solid var(--wd-primary-color, #b01e1e);
  outline-offset: 2px;
}

.makaz-password-input-wrap {
  position: relative !important;
  display: block !important;
  margin-bottom: 0.75em;
}

.makaz-password-input-wrap .makaz-auth-input {
  margin-bottom: 0;
  padding-right: 3rem !important;
}

.makaz-auth-flow .makaz-password-toggle,
.makaz-password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 0.55rem !important;
  z-index: 5 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.25rem !important;
  height: 2.25rem !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: var(--wd-text-color, #666) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  transform: translateY(-50%) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.makaz-auth-flow .makaz-password-toggle:hover,
.makaz-auth-flow .makaz-password-toggle:focus,
.makaz-password-toggle:hover,
.makaz-password-toggle:focus {
  color: var(--wd-primary-color, #b01e1e) !important;
  background: transparent !important;
  outline: none;
}

.makaz-password-toggle svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  color: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}

/* Layout only: colors, radius, shadows come from Woodmart `.btn` / `.btn-accent` (theme options). */
.makaz-auth-flow .makaz-auth-button.btn {
  width: 100%;
}

.makaz-auth-flow .makaz-auth-inline-row .makaz-auth-button.btn {
  width: auto;
}

.makaz-auth-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.makaz-auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0.5em 0 0.65em;
}

.makaz-auth-actions {
  margin-bottom: 0.75em;
}

.makaz-auth-help {
  margin: 0 0 0.75em;
  opacity: 0.72;
  line-height: 1.45;
}

.makaz-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.makaz-auth-row .makaz-auth-button {
  width: auto;
  min-width: 180px;
}

.makaz-set-password-spacer {
  display: block !important;
  width: 100% !important;
  height: 2rem !important;
  min-height: 2rem !important;
  flex: 0 0 2rem !important;
}

/* Errors: inline text only (no banner / success styles). */
.makaz-auth-alert {
  display: none;
  margin: 0 0 0.75em;
  padding: 0;
  font-size: 0.95em;
  line-height: 1.4;
  border: none;
  background: transparent;
}

.makaz-auth-alert:not([hidden]) {
  display: block;
}

.makaz-auth-alert.is-error {
  color: #b91c1c;
}

.makaz-auth-field-error {
  margin: -0.35em 0 0.75em;
  color: #b91c1c;
  font-size: 0.95em;
  line-height: 1.4;
}

.makaz-auth-field-error[hidden] {
  display: none !important;
}

.makaz-auth-inline-row .makaz-auth-field-error {
  flex: 1 0 100%;
  order: 2;
  margin: -0.4em 0 0;
}

.woocommerce-password-strength {
  position: relative;
  margin: -0.35em 0 0.75em;
  padding-top: 0.85em;
  font-size: 0.95em;
  line-height: 1.4;
}

.woocommerce-password-strength::before,
.woocommerce-password-strength::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 6px;
  border-radius: 999px;
}

.woocommerce-password-strength::before {
  width: 100%;
  background: var(--brdcolor-gray-300, #e5e7eb);
}

.woocommerce-password-strength::after {
  width: 0;
  background: #b91c1c;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.woocommerce-password-strength.short,
.woocommerce-password-strength.bad {
  color: #b91c1c;
}

.woocommerce-password-strength.score-0::after {
  width: 20%;
}

.woocommerce-password-strength.score-1::after,
.woocommerce-password-strength.score-2::after {
  width: 45%;
  background: #b91c1c;
}

.woocommerce-password-strength.good {
  color: #a16207;
}

.woocommerce-password-strength.score-3::after {
  width: 70%;
  background: #a16207;
}

.woocommerce-password-strength.strong {
  color: #15803d;
}

.woocommerce-password-strength.score-4::after {
  width: 100%;
  background: #15803d;
}

.woocommerce-password-strength[hidden] {
  display: none !important;
}

.makaz-auth-alert.is-info {
  color: var(--wd-title-color, #242424);
  opacity: 0.92;
}

.makaz-auth-alert.is-registration-sent {
  display: flex;
  align-items: center;
  gap: 1.05em;
  width: min(100%, 520px);
  margin: 1rem auto 0;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 1;
  animation: makaz-auth-message-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.makaz-auth-alert__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  color: var(--wd-primary-color, #b01e1e);
  background: rgba(176, 30, 30, 0.1);
  background: color-mix(in srgb, var(--wd-primary-color, #b01e1e) 12%, transparent);
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(176, 30, 30, 0.24);
  animation: makaz-auth-icon-pop 0.5s cubic-bezier(0.18, 1.35, 0.35, 1) 0.08s both,
    makaz-auth-icon-pulse 1.65s ease-out 0.28s 2;
}

.makaz-auth-alert__icon svg {
  display: block;
  width: 32px;
  height: 32px;
}

.makaz-auth-alert__text {
  min-width: 0;
}

.makaz-auth-alert.is-info strong {
  font-weight: 700;
}

.makaz-expired-link-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 410px);
  margin: 0 auto;
  padding: 0.35rem 0 0.5rem;
  text-align: center;
  animation: makaz-auth-message-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.makaz-expired-link-state__message {
  margin: 0;
  color: var(--wd-primary-color, #b01e1e);
  font-size: 1.06rem;
  line-height: 1.45;
}

.makaz-link-checking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 11rem;
  text-align: center;
}

.makaz-link-checking__spinner {
  --size: 30px;
  --first-block-clr: var(--wd-primary-color, #950606);
  --second-block-clr: #000;
  width: 100px;
  height: 100px;
  position: relative;
  margin-bottom: 0.35rem;
}

.makaz-link-checking__spinner::after,
.makaz-link-checking__spinner::before {
  box-sizing: border-box;
  position: absolute;
  content: "";
  width: var(--size);
  height: var(--size);
  top: 50%;
  left: 50%;
  background: var(--first-block-clr);
  box-shadow: 0 0.45rem 1.2rem rgba(0, 0, 0, 0.12);
  animation: makaz-link-checking-up 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite;
}

.makaz-link-checking__spinner::after {
  top: calc(50% - var(--size));
  left: calc(50% - var(--size));
  background: var(--second-block-clr);
  animation: makaz-link-checking-down 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite;
}

.makaz-link-checking__text {
  margin: 0;
  color: #3c4043;
  text-align: center;
}

.makaz-expired-retro {
  position: relative;
  width: 17.8rem;
  height: 14.4rem;
  margin: 0 auto 1.05rem;
  color: var(--wd-primary-color, #b01e1e);
  animation: makaz-expired-retro-in 0.42s cubic-bezier(0.18, 1.25, 0.35, 1) both;
}

.makaz-expired-retro__antenna {
  position: absolute;
  top: 1.65rem;
  left: 50%;
  width: 5.1rem;
  height: 3rem;
  transform: translateX(-50%);
}

.makaz-expired-retro__antenna::before,
.makaz-expired-retro__antenna::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0.2rem;
  height: 4.7rem;
  background: #2f2f2f;
  border-radius: 999px;
  transform-origin: bottom center;
}

.makaz-expired-retro__antenna::before {
  transform: rotate(-32deg);
}

.makaz-expired-retro__antenna::after {
  transform: rotate(32deg);
}

.makaz-expired-retro__set {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  display: grid;
  grid-template-columns: 1fr 3.6rem;
  gap: 0.62rem;
  width: 15.1rem;
  height: 8.75rem;
  padding: 0.62rem;
  background: var(--wd-primary-color, #b01e1e);
  border: 2px solid #251515;
  border-radius: 1rem;
  box-shadow: inset 0.18rem 0.18rem rgba(255, 255, 255, 0.16), 0 0.55rem 1.4rem rgba(0, 0, 0, 0.12);
  transform: translateX(-50%);
}

.makaz-expired-retro__set::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 8px);
  opacity: 0.26;
  pointer-events: none;
}

.makaz-expired-retro__screen {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-width: 0;
  overflow: hidden;
  color: #f8f4ef;
  background:
    repeating-radial-gradient(#000 0 0.0001%, #ffffff 0 0.0002%) 50% 0/2500px 2500px,
    repeating-conic-gradient(#000 0 0.0001%, #ffffff 0 0.0002%) 60% 60%/2500px 2500px;
  background-blend-mode: difference;
  border: 2px solid #211313;
  border-radius: 0.72rem;
  animation: makaz-expired-screen-noise 0.2s infinite alternate;
}

.makaz-expired-retro__screen::before,
.makaz-expired-retro__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.makaz-expired-retro__screen::before {
  display: none;
}

.makaz-expired-retro__screen::after {
  display: none;
}

.makaz-expired-retro__screen-text {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.25rem 0.48rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  animation: makaz-expired-screen-flicker 1.1s steps(2) infinite;
}

.makaz-expired-retro__stitches {
  position: relative;
  z-index: 1;
  color: var(--wd-primary-color, #b01e1e);
  filter: brightness(1.4);
  font-size: 0.86rem;
  letter-spacing: 0.2em;
}

.makaz-expired-retro__side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  background: rgba(255,255,255,0.14);
  border: 2px solid #251515;
  border-radius: 0.65rem;
}

.makaz-expired-retro__knob {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid #251515;
  border-radius: 999px;
  background: #f8f4ef;
  box-shadow: inset 0.12rem 0.12rem rgba(0,0,0,0.14);
}

.makaz-expired-retro__knob--small {
  width: 0.82rem;
  height: 0.82rem;
}

.makaz-expired-retro__vents {
  display: grid;
  gap: 0.22rem;
}

.makaz-expired-retro__vents span {
  display: block;
  width: 1.35rem;
  height: 0.13rem;
  background: #251515;
  border-radius: 999px;
}

.makaz-expired-retro__base {
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  width: 11.5rem;
  height: 0.32rem;
  background: #251515;
  border-radius: 999px;
  transform: translateX(-50%);
}

.makaz-auth-button.is-loading {
  position: relative;
  color: transparent !important;
}

.makaz-auth-button.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: rgba(0, 0, 0, 0.55);
  animation: makaz-spin 0.8s linear infinite;
}

.makaz-auth-flow .makaz-auth-button.btn-accent.is-loading::after {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

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

@keyframes makaz-auth-message-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes makaz-auth-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes makaz-auth-icon-pop {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-8deg);
  }
  62% {
    opacity: 1;
    transform: scale(1.08) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes makaz-auth-icon-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(176, 30, 30, 0.22);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(176, 30, 30, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(176, 30, 30, 0);
  }
}

@keyframes makaz-link-checking-down {
  0%, 100% {
    transform: none;
  }
  25% {
    transform: translateX(100%);
  }
  50% {
    transform: translateX(100%) translateY(100%);
  }
  75% {
    transform: translateY(100%);
  }
}

@keyframes makaz-link-checking-up {
  0%, 100% {
    transform: none;
  }
  25% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(-100%) translateY(-100%);
  }
  75% {
    transform: translateY(-100%);
  }
}

@keyframes makaz-expired-retro-in {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.94) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes makaz-expired-screen-noise {
  100% {
    background-position: 50% 0, 60% 50%;
  }
}

@keyframes makaz-expired-screen-noise-mobile {
  100% {
    background-position: 0 2px, 50% 45%, 0 0;
  }
}

@keyframes makaz-expired-scanline {
  0% {
    transform: translateY(-75%);
  }
  100% {
    transform: translateY(75%);
  }
}

@keyframes makaz-expired-screen-flicker {
  0%, 100% {
    opacity: 0.95;
    transform: translateX(0);
  }
  50% {
    opacity: 0.78;
    transform: translateX(1px);
  }
}

@media (max-width: 767px) {
  .makaz-auth-flow {
    min-height: 26rem;
  }

  .makaz-auth-flow--narrow {
    min-height: 27rem;
  }

  .makaz-auth-row {
    flex-direction: column;
    align-items: stretch;
  }

  .makaz-auth-row .makaz-auth-button {
    width: 100%;
    min-width: 0;
  }

  .makaz-auth-inline-row {
    flex-direction: column;
    align-items: stretch;
  }

  .makaz-auth-inline-row .makaz-auth-input,
  .makaz-auth-inline-row .makaz-auth-button {
    width: 100%;
    flex: 1 1 auto;
  }

  .makaz-auth-inline-row .makaz-auth-input {
    order: 1;
  }

  .makaz-auth-inline-row .makaz-auth-field-error {
    order: 2;
  }

  .makaz-auth-inline-row .makaz-auth-button {
    order: 3;
  }

  .makaz-expired-retro__screen {
    background:
      repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 4px),
      radial-gradient(circle at 50% 45%, rgba(255,255,255,0.18), transparent 42%),
      #241f1f;
    background-blend-mode: normal;
    animation: makaz-expired-screen-noise-mobile 0.22s steps(2) infinite;
  }

  .makaz-expired-retro__screen::before {
    display: block;
    background: linear-gradient(transparent 48%, rgba(255,255,255,0.1) 50%, transparent 52%);
    animation: makaz-expired-scanline 1.4s linear infinite;
  }

  .makaz-expired-retro__screen::after {
    display: block;
    background: repeating-radial-gradient(circle, rgba(255,255,255,0.24) 0 1px, transparent 1px 4px);
    opacity: 0.1;
    mix-blend-mode: screen;
  }
}

@media (min-width: 768px) {
  .makaz-expired-retro__screen {
    background:
      repeating-radial-gradient(#000 0 0.0001%, #ffffff 0 0.0002%) 50% 0/2500px 2500px,
      repeating-conic-gradient(#000 0 0.0001%, #ffffff 0 0.0002%) 60% 60%/2500px 2500px;
    background-blend-mode: difference;
    animation: makaz-expired-screen-noise 0.2s infinite alternate;
  }

  .makaz-expired-retro__screen::before,
  .makaz-expired-retro__screen::after {
    display: none;
  }
}

/* Woodmart Shop Layout (Elementor my_account_auth): native Register widget is redundant with Makaz flow. */
body.woocommerce-account:not(.logged-in) .wd-el-my-account-register {
  display: none !important;
}

/* Login widget still prints “Login” heading; Makaz block has its own title. */
body.woocommerce-account:not(.logged-in) .wd-el-my-account-login > .wd-login-title {
  display: none;
}
