
:root {
  --m-ease:cubic-bezier(0.2, 0.8, 0.2, 1);
  --m-ease-soft:cubic-bezier(0.32, 0.72, 0, 1);
  --m-ease-in:cubic-bezier(0.4, 0, 1, 1);
}

@media (prefers-reduced-motion:no-preference) {
  @view-transition {
    navigation:auto;
  }
}

::view-transition-old(root) {
  animation:mVtOut 0.16s var(--m-ease-in) both;
}

::view-transition-new(root) {
  animation:mVtIn 0.26s var(--m-ease) both;
}

@keyframes mVtOut {
  to {
    opacity:0;
  }
}

@keyframes mVtIn {
  from {
    opacity:0;
  }
}

html {
  background:var(--bg);
}

body.auth-page .auth-container {
  animation:mAuthIn 0.42s var(--m-ease) both;
}

body.auth-page .auth-header {
  animation:mFadeDown 0.38s var(--m-ease) 0.03s both;
}

body.auth-page .auth-subtitle {
  animation:none;
}

body.auth-page .auth-step.active form > :not(.error-message):not(.form-honey) {
  animation:mRise 0.36s var(--m-ease) both;
  animation-delay:calc(0.05s + var(--m-i, 8) * 0.028s);
}

body.auth-page .auth-step.active form > :nth-child(1) {
  --m-i:0;
}
body.auth-page .auth-step.active form > :nth-child(2) {
  --m-i:1;
}
body.auth-page .auth-step.active form > :nth-child(3) {
  --m-i:2;
}
body.auth-page .auth-step.active form > :nth-child(4) {
  --m-i:3;
}
body.auth-page .auth-step.active form > :nth-child(5) {
  --m-i:4;
}
body.auth-page .auth-step.active form > :nth-child(6) {
  --m-i:5;
}
body.auth-page .auth-step.active form > :nth-child(7) {
  --m-i:6;
}
body.auth-page .auth-step.active form > :nth-child(8) {
  --m-i:7;
}

body.auth-page .auth-site-footer {
  animation:mFade 0.4s ease 0.2s both;
}

body.auth-page .auth-step.active {
  animation:mStepIn 0.28s var(--m-ease) both;
}

body.auth-page .auth-step.exiting {
  display:block;
  pointer-events:none;
  animation:mStepOut 0.16s var(--m-ease-in) both;
}

body.auth-page .form-input {
  transition:
    border-color 0.2s ease,
    box-shadow 0.28s var(--m-ease),
    background-color 0.2s ease;
}

body.auth-page .form-input:focus {
  transform:none;
}

body.auth-page .form-input[aria-invalid="true"] {
  border-color:color-mix(in srgb, var(--red) 65%, transparent);
  box-shadow:0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent);
}

body.auth-page .form-input--phone {
  font-variant-numeric:tabular-nums;
  letter-spacing:0.01em;
}

body.auth-page .btn {
  transition:
    transform 0.35s var(--m-ease-soft),
    box-shadow 0.35s var(--m-ease),
    filter 0.2s ease,
    opacity 0.2s ease;
}

body.auth-page .btn-primary:hover {
  transform:translateY(-1px);
}

body.auth-page .btn:active {
  transform:scale(0.985);
  transition-duration:0.12s;
}

body.auth-page .btn:focus-visible,
body.auth-page .form-field-action:focus-visible,
body.auth-page .auth-footer-link:focus-visible,
body.auth-page .form-consent input:focus-visible {
  outline:2px solid var(--accent-2);
  outline-offset:3px;
}

body.auth-page .btn.is-loading {
  opacity:0.85;
  cursor:progress;
}

body.auth-page .btn.is-loading::after {
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin-left:10px;
  vertical-align:-2px;
  border:2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color:currentColor;
  border-radius:50%;
  animation:spin 0.8s linear infinite;
}

body.auth-page .error-message.show {
  animation:mErrorIn 0.22s var(--m-ease) both;
}

.form-field {
  position:relative;
}

.form-input--with-action {
  padding-right:52px;
}

.form-field-action {
  position:absolute;
  top:50%;
  right:4px;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  translate:0 -50%;
  border:0;
  border-radius:10px;
  background:transparent;
  color:var(--text-faint);
  cursor:pointer;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.form-field-action:hover {
  color:var(--text);
  background:color-mix(in srgb, var(--text) 6%, transparent);
}

.form-field-icon {
  width:20px;
  height:20px;
  grid-area:1 / 1;
  transition:
    opacity 0.2s ease,
    scale 0.25s var(--m-ease);
}

.form-field-action[aria-pressed="false"] .form-field-icon--hide,
.form-field-action[aria-pressed="true"] .form-field-icon--show {
  opacity:0;
  scale:0.7;
}

.pw-rules {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:10px 0 0;
  padding:0;
  list-style:none;
}

.pw-rules li {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px 4px 8px;
  border-radius:999px;
  font-size:12.5px;
  font-weight:600;
  color:var(--text-faint);
  background:color-mix(in srgb, var(--text) 5%, transparent);
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

.pw-rules li::before {
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
  opacity:0.6;
  transition:
    scale 0.3s var(--m-ease-soft),
    opacity 0.25s ease;
}

.pw-rules li.is-ok {
  color:var(--green);
  background:var(--green-soft);
}

.pw-rules li.is-ok::before {
  opacity:1;
  scale:1.25;
}

.form-consents {
  display:grid;
  gap:10px;
  margin:18px 0 20px;
}

.form-consents .form-consent {
  margin:0;
}

body.auth-page .form-consent input[type="checkbox"] {
  appearance:none;
  -webkit-appearance:none;
  position:relative;
  flex-shrink:0;
  width:22px;
  height:22px;
  margin:0;
  border:1.5px solid var(--line-accent);
  border-radius:7px;
  background:var(--input-bg);
  cursor:pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s var(--m-ease);
}

body.auth-page .form-consent input[type="checkbox"]::after {
  content:"";
  position:absolute;
  inset:0;
  background:var(--on-accent, #fff);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E")
    center / 15px no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E")
    center / 15px no-repeat;
  opacity:0;
  scale:0.6;
  transition:
    opacity 0.18s ease,
    scale 0.3s var(--m-ease-soft);
}

body.auth-page .form-consent input[type="checkbox"]:checked {
  border-color:transparent;
  background:var(--accent);
  box-shadow:0 4px 14px var(--accent-glow);
}

body.auth-page .form-consent input[type="checkbox"]:checked::after {
  opacity:1;
  scale:1;
}

body.auth-page .form-consent:hover input[type="checkbox"]:not(:checked) {
  border-color:var(--line-strong);
}

body.auth-page .form-consent input[type="checkbox"][aria-invalid="true"] {
  border-color:color-mix(in srgb, var(--red) 75%, transparent);
  box-shadow:0 0 0 4px color-mix(in srgb, var(--red) 16%, transparent);
}

body.auth-page .form-consent .form-consent-text {
  padding-top:1px;
}

.form-honey {
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

body.auth-page.is-leaving .auth-container {
  animation:mAuthOut 0.18s var(--m-ease-in) both;
}

body.auth-page.is-leaving .auth-site-footer,
body.auth-page.is-leaving .cookie-consent-bar {
  transition:opacity 0.14s ease;
  opacity:0;
}

@keyframes mAuthIn {
  from {
    opacity:0;
    transform:translateY(14px) scale(0.985);
  }
}

@keyframes mAuthOut {
  to {
    opacity:0;
    transform:translateY(-8px) scale(0.985);
  }
}

@keyframes mFadeDown {
  from {
    opacity:0;
    transform:translateY(-10px);
  }
}

@keyframes mRise {
  from {
    opacity:0;
    transform:translateY(12px);
  }
}

@keyframes mFade {
  from {
    opacity:0;
  }
}

@keyframes mStepIn {
  from {
    opacity:0;
    transform:translateY(10px);
  }
  to {
    opacity:1;
    transform:none;
  }
}

@keyframes mStepOut {
  from {
    opacity:1;
  }
  to {
    opacity:0;
    transform:translateY(-6px);
  }
}

@keyframes mErrorIn {
  from {
    opacity:0;
    transform:translateY(-4px);
  }
}

@media (prefers-reduced-motion:reduce) {
  body.auth-page .auth-container,
  body.auth-page .auth-header,
  body.auth-page .auth-step.active,
  body.auth-page .auth-step.active form > *,
  body.auth-page .auth-site-footer,
  body.auth-page .error-message.show {
    animation:none !important;
  }

  body.auth-page .auth-step.exiting {
    display:none;
  }

  body.auth-page .btn,
  body.auth-page .btn:active,
  body.auth-page .btn-primary:hover {
    transform:none;
  }
}
