@font-face {
  font-family: "Hattem Regular";
  src: url("/fonts/NunitoSans_10pt-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Hattem SemiBold";
  src: url("/fonts/NunitoSans_10pt-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Hattem Password Icons";
  src: url("/fonts/icomoon768887.ttf") format("truetype");
  font-style: normal;
  font-weight: normal;
  font-display: block;
}

:root {
  color-scheme: dark;
  font-family: "Hattem Regular", sans-serif;
  font-synthesis: none;
  --background: #000000;
  --primary-text: #ffffff;
  --secondary-text: #7c7c7c;
  --field-line: #161619;
  --error: #fd3b31;
  --button-text: #000000;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--background);
}

body {
  margin: 0;
  color: var(--primary-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input {
  font: inherit;
}

.auth-page {
  width: 100%;
  max-width: 620px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--background);
}

.auth-navigation {
  height: 60px;
  display: flex;
  align-items: center;
}

.back-button {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: var(--primary-text);
  text-decoration: none;
  border-radius: 30px;
  -webkit-tap-highlight-color: transparent;
}

.back-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.auth-content {
  width: 100%;
  max-width: 570px;
  margin: 0 auto;
  padding: 25px 25px calc(105px + env(safe-area-inset-bottom, 0px));
}

h1 {
  margin: 0;
  color: var(--primary-text);
  font-family: "Hattem SemiBold", sans-serif;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.message {
  min-height: 38px;
  margin: 11px 0 77px;
  color: var(--secondary-text);
  font-family: "Hattem SemiBold", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: pre-line;
}

.message.error {
  color: var(--error);
}

.message.success {
  color: var(--primary-text);
}

#reset-form {
  display: none;
}

#reset-form.is-visible {
  display: block;
}

.field {
  position: relative;
  width: 100%;
  min-height: 54px;
  border-bottom: 2px solid var(--field-line);
}

.field + .field {
  margin-top: 25px;
}

.field input {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 6px 48px 0 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--primary-text);
  caret-color: var(--primary-text);
  font-family: "Hattem Regular", sans-serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  box-shadow: none;
  appearance: none;
}

.field input::placeholder {
  color: var(--secondary-text);
  font-family: "Hattem SemiBold", sans-serif;
  font-weight: 600;
  opacity: 1;
}

.field:has(input:user-invalid) {
  border-bottom-color: var(--error);
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 47px;
  height: 52px;
  margin: 0;
  padding: 6px 11px 6px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.password-toggle span::before {
  content: "\e901";
  display: block;
  font-family: "Hattem Password Icons";
  font-size: 26px;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  speak: never;
}

.password-toggle[aria-pressed="true"] span::before {
  content: "\e902";
}

.primary-button {
  width: 100%;
  height: 50px;
  display: grid;
  place-items: center;
  margin: 40px 0 0;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--primary-text);
  color: var(--button-text);
  font-family: "Hattem SemiBold", sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.continue-button {
  display: none;
}

.continue-button.is-visible {
  display: grid;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 621px) {
  .auth-page {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button,
  .back-button,
  .password-toggle {
    transition: opacity 120ms ease;
  }
}
