:root {
  --login-cyan: #11c9dc;
  --login-blue: #177fb8;
  --login-navy: #173b5c;
  --login-error: #d64242;
}

body.is-login-open {
  overflow: hidden;
}

.login-modal {
  position: fixed;
  z-index: 200;
  inset: 0;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.login-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 25, 42, .68);
  backdrop-filter: blur(2px);
}

.login-modal__dialog {
  position: relative;
  width: min(356px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  overflow: auto;
  color: #1f3850;
  border: 1px solid rgba(17, 201, 220, .9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(0, 25, 55, .32);
  text-align: left;
  transform: translateY(14px) scale(.975);
  transition: transform 180ms ease;
}

.login-modal.is-open .login-modal__dialog {
  transform: translateY(0) scale(1);
}

.login-modal__dialog .login-modal__header {
  position: relative;
  height: 58px;
  min-height: 58px;
  padding: 0 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #14d4df 0%, #1688be 100%);
}

.login-modal__header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: .04em;
}

.login-modal__dismiss {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.login-modal__dismiss:hover,
.login-modal__dismiss:focus-visible {
  background: rgba(255, 255, 255, .16);
}

.login-form {
  padding: 22px 22px 24px;
}

.login-field {
  display: block;
  margin-bottom: 16px;
}

.login-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--login-navy);
  font-size: 15px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: #17364f;
  border: 1px solid #bdceda;
  border-radius: 7px;
  outline: none;
  background: #f9fcfe;
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-field input:focus {
  border-color: #149fc6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 159, 198, .16);
}

.login-field input[aria-invalid="true"] {
  border-color: var(--login-error);
  box-shadow: 0 0 0 3px rgba(214, 66, 66, .1);
}

.login-modal__dialog .login-feedback {
  min-height: 22px;
  margin: -2px 0 12px;
  color: var(--login-error);
  font-size: 14px;
  line-height: 22px;
  text-align: center;
}

.login-modal__dialog .login-feedback.is-success {
  color: #168457;
  font-weight: 700;
}

.login-submit {
  width: 100%;
  min-height: 50px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #13cadc 0%, #187db6 100%);
  box-shadow: 0 7px 16px rgba(20, 128, 178, .22);
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  transition: filter 150ms ease, transform 150ms ease;
}

.login-submit:hover,
.login-submit:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
}

@media (max-height: 520px) {
  .login-modal {
    padding-top: 8px;
    padding-bottom: 8px;
    place-items: center;
    overflow: hidden;
  }

  .login-modal__dialog {
    max-height: calc(100svh - 16px);
    margin: 0;
  }

  .login-modal__dialog .login-modal__header {
    height: 52px;
    min-height: 52px;
  }

  .login-form {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .login-field {
    margin-bottom: 8px;
  }

  .login-field > span {
    margin-bottom: 4px;
  }

  .login-field input {
    height: 46px;
  }

  .login-modal__dialog .login-feedback {
    min-height: 18px;
    margin-bottom: 8px;
    line-height: 18px;
  }

  .login-submit {
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-modal,
  .login-modal__dialog,
  .login-field input,
  .login-submit {
    transition: none;
  }
}
