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

html,
body {
  font-family: Inter, sans-serif;
  min-height: 100%;
}

body {
  background-color: #e4eaf0;
  transition: background-color 0.5s ease;
}

body.default {
  background-color: #2870ed;
  background-image: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 55%);
}

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

.wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 55px;
}

.top-bar {
  height: 140px;
  width: 100%;
}

.box-logo {
  display: inline-block;
  margin-top: 42px;
  margin-left: 5%;
}

.box-logo img {
  display: block;
}

.main {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  font-size: 16px;
}

.login-box {
  background-color: #fff;
  padding: 20px 16px;
  border: 1px solid rgba(0, 0, 0, 0.0007);
  box-shadow: 0 2px 7px rgba(5, 34, 97, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 341px;
}

.box-header {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 8px;
}

.box-lang {
  font-size: 16px;
  font-weight: 700;
  color: #1a67d2;
  text-transform: uppercase;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
}

.box-lang:focus-visible {
  outline: 0.1875rem solid #135ee2;
  outline-offset: 0.0625rem;
}

.app-title {
  display: flex;
  align-items: flex-start;
  max-width: 90%;
  min-height: 26px;
  margin-bottom: 8px;
}

.login-app-logo {
  text-align: left;
  height: 64px;
  margin-right: 16px;
  flex-shrink: 0;
}

.login-app-logo img {
  max-height: 64px;
  display: block;
}

.login-app-details {
  flex: 1;
  min-width: 0;
}

.login-app-title {
  text-align: left;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  color: #21416c;
  overflow-wrap: anywhere;
}

.login-app-description {
  text-align: left;
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #21416c;
}

.nickname-input-wrapper {
  margin-top: 16px;
  margin-bottom: 16px;
}

.login-step-2 .birthday-label,
.login-step-3 .form-step-label {
  margin-top: 16px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #21416c;
}

.form-field {
  margin-bottom: 16px;
}

.form-field input {
  padding-right: 10px;
}

.card-field .field-error {
  margin-top: 8px;
}

.card-details-fields {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.card-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-field--expiry {
  flex: 1;
}

.card-field--cvv {
  flex: 0 0 88px;
}

.card-field input {
  width: 100%;
  padding-right: 10px;
}

.birthday-fields {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.birthday-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.birthday-field .field-error {
  margin-top: 8px;
}

.birthday-field--day {
  flex: 0 0 88px;
}

.birthday-field--month {
  flex: 1;
  min-width: 0;
}

.birthday-field input,
.birthday-field select {
  width: 100%;
}

.birthday-field input[type="text"] {
  padding-right: 10px;
}

select {
  font-size: 16px;
  font-weight: 400;
  color: #21416c;
  padding: 10px 36px 10px 10px;
  border: 1px solid #a3b5c9;
  border-radius: 12px;
  min-height: 48px;
  outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%2321416c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
}

select:focus {
  border-color: #1a67d2;
}

select:focus-visible {
  outline: 0.1875rem solid #135ee2;
  outline-offset: 0.0625rem;
}

select:invalid {
  color: #21416c;
}

.remember-device {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #21416c;
  cursor: pointer;
}

.remember-device input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2870ed;
  cursor: pointer;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

.btn-cancel {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 8px 12px;
  background: none;
  border: none;
  color: #e30613;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.btn-cancel:hover {
  text-decoration: underline;
}

.btn-cancel:focus-visible {
  outline: 0.1875rem solid #135ee2;
  outline-offset: 0.0625rem;
  border-radius: 4px;
}

.input-wrap.is-invalid input[type="text"],
.input-wrap.is-invalid input[type="password"] {
  border-color: #e30613;
  color: #e30613;
}

.input-wrap.is-invalid input[type="text"]:focus,
.input-wrap.is-invalid input[type="password"]:focus {
  border-color: #e30613;
}

.input-wrap.is-invalid input[type="text"]:focus-visible,
.input-wrap.is-invalid input[type="password"]:focus-visible {
  outline-color: #e30613;
}

.input-wrap.is-invalid input::placeholder {
  color: #e30613;
}

.input-wrap.is-invalid select {
  border-color: #e30613;
  color: #e30613;
}

.input-wrap.is-invalid select:focus,
.input-wrap.is-invalid select:focus-visible {
  border-color: #e30613;
  outline-color: #e30613;
}

.field-error {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #e30613;
}

.input-wrap {
  position: relative;
}

input[type="text"],
input[type="password"] {
  font-size: 16px;
  font-weight: 400;
  color: #21416c;
  width: 100%;
  padding: 10px 40px 10px 10px;
  border: 1px solid #a3b5c9;
  border-radius: 12px;
  min-height: 48px;
  outline: none;
  background: #fff;
}

input:focus {
  border-color: #1a67d2;
}

input:focus-visible {
  outline: 0.1875rem solid #135ee2;
  outline-offset: 0.0625rem;
}

input::placeholder {
  color: #21416c;
  opacity: 1;
}

.virtual-keyboard-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 23px;
  height: 23px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 7C3.44772 7 3 7.44772 3 8V16C3 16.5523 3.44772 17 4 17H20C20.5523 17 21 16.5523 21 16V8C21 7.44772 20.5523 7 20 7H4ZM1 8C1 6.34315 2.34315 5 4 5H20C21.6569 5 23 6.34314 23 8V16C23 17.6569 21.6569 19 20 19H4C2.34315 19 1 17.6569 1 16V8ZM6 9C6.55228 9 7 9.44772 7 10V10.01C7 10.5623 6.55228 11.01 6 11.01C5.44772 11.01 5 10.5623 5 10.01V10C5 9.44772 5.44772 9 6 9ZM10 9C10.5523 9 11 9.44772 11 10V10.01C11 10.5623 10.5523 11.01 10 11.01C9.44772 11.01 9 10.5623 9 10.01V10C9 9.44772 9.44772 9 10 9ZM14 9C14.5523 9 15 9.44772 15 10V10.01C15 10.5623 14.5523 11.01 14 11.01C13.4477 11.01 13 10.5623 13 10.01V10C13 9.44772 13.4477 9 14 9ZM18 9C18.5523 9 19 9.44772 19 10V10.01C19 10.5623 18.5523 11.01 18 11.01C17.4477 11.01 17 10.5623 17 10.01V10C17 9.44772 17.4477 9 18 9ZM6 13C6.55228 13 7 13.4477 7 14V14.01C7 14.5623 6.55228 15.01 6 15.01C5.44772 15.01 5 14.5623 5 14.01V14C5 13.4477 5.44772 13 6 13ZM9 13.9975C9.00138 13.4452 9.45022 12.9986 10.0025 13L14.0025 13.01C14.5548 13.0114 15.0014 13.4602 15 14.0125C14.9986 14.5648 14.5498 15.0114 13.9975 15.01L9.9975 15C9.44522 14.9986 8.99862 14.5498 9 13.9975ZM18 13C18.5523 13 19 13.4477 19 14V14.01C19 14.5623 18.5523 15.01 18 15.01C17.4477 15.01 17 14.5623 17 14.01V14C17 13.4477 17.4477 13 18 13Z' fill='%23135EE2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.btn-primary {
  display: block;
  width: 100%;
  max-width: 309px;
  min-height: 48px;
  min-width: 96px;
  margin: 0 auto 20px;
  padding: 0 14px;
  background-color: #135ee2;
  border: 2px solid #135ee2;
  border-radius: 6.25rem;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  outline: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #1657b1;
  border-color: #1657b1;
  box-shadow: 0 4px 12px -4px rgba(26, 103, 210, 0.4);
}

.btn-primary:focus-visible {
  outline: 0.1875rem solid #135ee2;
  outline-offset: 0.0625rem;
}

.btn-primary:disabled {
  background-color: #ccd7e1;
  border-color: #ccd7e1;
  cursor: not-allowed;
  box-shadow: none;
}

.login-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.footer-link {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1a67d2;
  text-decoration: none;
  border-radius: 100rem;
  cursor: pointer;
}

.footer-link:hover {
  background-image: linear-gradient(rgba(19, 94, 226, 0.05), rgba(19, 94, 226, 0.05));
}

.footer-link:focus-visible {
  outline: 0.1875rem solid #135ee2;
  outline-offset: 0.0625rem;
}

@media screen and (max-width: 600px) {
  .virtual-keyboard-icon {
    display: none;
  }

  input[type="text"],
  input[type="password"] {
    padding-right: 10px;
  }

  .btn-primary {
    max-width: 343px;
  }

  .box-logo {
    margin-left: 16px;
  }
}
