@font-face {
  font-family: 'Avenir Next Cyr';
  src: url('fonts/AvenirNextCyr-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Avenir Next Cyr';
  src: url('fonts/AvenirNextCyr-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --snap-yellow: #FFFC00;
  --snap-black: #000000;
  --snap-white: #FFFFFF;
  --snap-blue: #0095F6;
  --snap-blue-light: #4DB5F9;
  --gray-label: #737373;
  --gray-border: #dbdbdb;
  --radius: 12px;
  --radius-btn: 8px;
  --font: 'Avenir Next Cyr', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  color: var(--snap-black);
  background: #F7F7F7;
  -webkit-font-smoothing: antialiased;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

.content {
  flex: 1;
  padding: 48px 12px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-box {
  width: min(100%, 560px);
  min-height: 0;
  aspect-ratio: 1 / 1.05;
  padding: 20px 20px 10px;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
  background: var(--snap-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  transition: aspect-ratio 0.2s ease;
}

.login-box--has-error {
  aspect-ratio: auto;
  padding-bottom: 20px;
}

.password-reject-error {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: rgb(225, 20, 61);
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  transition: visibility 0.2s ease, height 0.2s ease, margin 0.2s ease, padding 0.2s ease;
}
.password-reject-error.is-visible {
  visibility: visible;
  height: auto;
  overflow: visible;
  margin: 2px 0 14px;
  padding: 0 12px;
}

.form-error {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 400;
  color: rgb(204, 0, 0);
  margin: 0;
  padding: 0 12px;
  width: 100%;
  display: block;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: center;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}
.form-error.is-visible {
  visibility: visible;
  height: auto;
  overflow: visible;
  margin: 8px 0 12px;
}

.logo {
  width: 56px;
  height: 56px;
  margin-top: -8px;
  margin-bottom: 14px;
  flex-shrink: 0;
  color: var(--snap-black);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.title {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 1;
  min-height: 0;
}

.label {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  color: rgb(101, 107, 115);
  margin-bottom: 2px;
  display: block;
}

.input {
  width: 100%;
  padding: 14px 12px;
  min-height: 44px;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  color: var(--snap-black);
  background: var(--snap-white);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.input::placeholder {
  color: #a8a8a8;
}

.input:hover {
  border-color: #b3b3b3;
}

.input:focus {
  outline: none;
  border: 2px solid #000000;
  padding: 13px 11px;
}

.input.input--email-state {
  background-color: #f0f0f0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  color: #737373;
}

.link-phone {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: rgb(0, 150, 229);
  text-decoration: none;
  margin: 12px 0 4px;
  align-self: center;
}

.link-phone:hover {
  color: var(--snap-blue-light);
}

.btn-next {
  position: relative;
  width: auto;
  align-self: center;
  min-width: 90px;
  padding: 12px 20px;
  margin-top: 6px;
  background: #0CADFE;
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 24px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-next:hover {
  background: #09a0ed;
}

.btn-next:active {
  transform: scale(0.98);
}

.btn-next-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
  flex-shrink: 0;
}

.btn-next.is-loading .btn-next-text {
  visibility: hidden;
  opacity: 0;
}

.btn-next.is-loading .btn-next-spinner {
  display: inline-block;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
}

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

.register-prompt {
  font-family: var(--font);
  margin: 32px 0 0;
  font-size: 16px;
  font-weight: 300;
  color: rgb(22, 25, 28);
  text-align: center;
}

.link-register {
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  color: rgb(22, 25, 28);
  text-decoration: none;
  margin-left: 2px;
}

.link-register:hover {
  text-decoration: underline;
}

@media (min-width: 380px) {
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.page-password .login-box--password {
  aspect-ratio: auto;
  min-height: 0;
  max-width: 560px;
  padding: 20px 20px 24px;
  justify-content: flex-start;
  gap: 0;
  border: 1px solid var(--gray-border);
  border-radius: 6px;
}

.page-password .title--password {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 14px;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.account-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid #eee;
  border-radius: 6px;
  box-sizing: border-box;
}

.account-value {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: rgb(22, 25, 28);
}

.link-account {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: #3898FE;
  text-decoration: none;
}

.link-account:hover {
  color: #2d7dd6;
}

.form--password .label {
  font-size: 12px;
  font-weight: 600;
  color: rgb(101, 107, 115);
}

.form--password {
  width: 100%;
  flex-shrink: 0;
}

.input-wrap-password {
  position: relative;
  width: 100%;
}

.input--password {
  padding-right: 44px;
  background: #F7F7F7;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #737373;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-password:hover {
  color: var(--snap-black);
}

.link-forgot {
  display: block;
  text-align: center;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: rgb(15, 173, 255);
  text-decoration: none;
  margin: 14px 0 20px;
}

.link-forgot:hover {
  color: rgb(12, 150, 220);
}

.form--password .btn-next {
  margin-top: 0;
}

.page-sms .sms-intro {
  font-family: var(--font);
  font-size: 14px;
  color: rgb(101, 107, 115);
  text-align: center;
  margin: 0 0 20px;
}
