@charset "UTF-8";
*, *:before, *:after {
  transition: all 0.5s cubic-bezier(0.5, 0, 0.5, 1);
  transition-property: transform, opacity, background-color, border-color;
  transition-delay: 0s;
}

#app:after {
  /*the line put off states msgs*/
  /*content: attr(data-state);*/
  position: absolute;
  top: 100%;
  margin-top: 1rem;
  font-size: 5vmin;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 2vmin 5vmin;
  border-radius: 5vmin;
}

[data-show] {
  opacity: 0;
}
[data-show][data-active] {
  opacity: 1;
}

[data-state~=idle] {
  -webkit-animation: reset 1s cubic-bezier(0.5, 0, 0.5, 1) both;
          animation: reset 1s cubic-bezier(0.5, 0, 0.5, 1) both;
}
[data-state~=idle] .ui-icon {
  --bg: #E3E6F9;
  --color: var(--color-primary);
}
[data-state~=idle] .ui-password:before {
  background-color: var(--color-primary);
  transform: translateX(-100%);
}
[data-state~=idle] .ui-password:focus-within:before {
  transform: none;
}

[data-state~=validating] .ui-icon {
  --bg: #E3E6F9;
  --color: var(--color-primary);
}
[data-state~=validating] .ui-password:before {
  transform-origin: left center;
  background-color: var(--color-primary);
  -webkit-animation: password-validating 1s infinite;
          animation: password-validating 1s infinite;
}
[data-state~=validating] .ui-submit {
  opacity: 0.5;
  pointer-events: none;
}

[data-state~="idle.error"] .ui-icon {
  background-color: #FAD0D8;
  --color: var(--color-error);
  -webkit-animation: icon-error 1s cubic-bezier(0.5, 0, 0.5, 1) both;
          animation: icon-error 1s cubic-bezier(0.5, 0, 0.5, 1) both;
}
[data-state~="idle.error"] .ui-password:before {
  -webkit-animation: slide-right 0.5s cubic-bezier(0.5, 0, 0.5, 1) both;
          animation: slide-right 0.5s cubic-bezier(0.5, 0, 0.5, 1) both;
  background-color: #E2294E;
}

[data-state~=success] .ui-icon {
  --bg: var(--color-success);
  --color: var(--color-success);
}
[data-state~=success] .ui-icon:before {
  -webkit-animation: icon-bg-success 0.5s ease-out both;
          animation: icon-bg-success 0.5s ease-out both;
}
[data-state~=success] .ui-password:before {
  -webkit-animation: slide-right 0.5s cubic-bezier(0.5, 0, 0.5, 1) both;
          animation: slide-right 0.5s cubic-bezier(0.5, 0, 0.5, 1) both;
  background-color: var(--color-success);
}

[data-state]:not([data-state~=idle]) .ui-password-input {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.5;
}
[data-state]:not([data-state~=idle]) .ui-submit {
  opacity: 0.5;
}

@-webkit-keyframes password-validating {
  from {
    transform: translateX(-100%) scaleX(0.5);
  }
  to {
    transform: translateX(100%) scaleX(0.5);
  }
}

@keyframes password-validating {
  from {
    transform: translateX(-100%) scaleX(0.5);
  }
  to {
    transform: translateX(100%) scaleX(0.5);
  }
}
@-webkit-keyframes slide-right {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: none;
  }
}
@keyframes slide-right {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: none;
  }
}
@-webkit-keyframes icon-error {
  from, 85%, to {
    transform: none;
  }
  20%, 50% {
    transform-origin: right center;
    transform: translateX(-30%) scaleX(1.1);
  }
  35%, 65% {
    transform-origin: left center;
    transform: translateX(30%) scaleX(1.1);
  }
}
@keyframes icon-error {
  from, 85%, to {
    transform: none;
  }
  20%, 50% {
    transform-origin: right center;
    transform: translateX(-30%) scaleX(1.1);
  }
  35%, 65% {
    transform-origin: left center;
    transform: translateX(30%) scaleX(1.1);
  }
}
@-webkit-keyframes icon-bg-success {
  from {
    transform: scale(1);
    opacity: 0.5;
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}
@keyframes icon-bg-success {
  from {
    transform: scale(1);
    opacity: 0.5;
  }
  to {
    transform: scale(4);
    opacity: 0;
  }
}
.ui-modal {
  --color-primary: #5A52FF;
  --color-error: #E0294C;
  --color-success: #0DBE65;
  background-color: #fff;
  width: 50%;
  padding: 2rem 4rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
}

.ui-icon {
  height: 3rem;
  width: 3rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.ui-icon:before {
  content: "";
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--bg);
  will-change: transform;
}
.ui-icon > .ui-lock {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ui-icon > .ui-lock:before, .ui-icon > .ui-lock:after {
  content: "";
  position: absolute;
}
.ui-icon > .ui-lock:after {
  background-color: var(--color);
  height: 25%;
  width: 45%;
  transform: translateY(50%);
  border-radius: 2px;
}
.ui-icon > .ui-lock:before {
  width: 30%;
  height: 50%;
  border-radius: 1rem;
  border: 4px solid var(--color);
}

.ui-title {
  font-size: 1rem;
  line-height: 2rem;
}

.ui-subtitle {
  font-size: 0.75rem;
  height: 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #9A9CA2;
}
.ui-subtitle > span {
  line-height: 1rem;
  position: absolute;
  white-space: nowrap;
}
.ui-subtitle > span.ui-error {
  font-weight: bold;
  color: var(--color-error);
}

.ui-password {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
          width: 100%;
  background: none;
  border: none;
  padding-bottom: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}
.ui-password:before, .ui-password:after {
  content: "";
  position: absolute;
  height: 2px;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 1;
}
.ui-password:after {
  background-color: #E8E9F0;
  z-index: 0;
}

.ui-password-input {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: none;
  border: none;
  height: 2rem;
  width: 100%;
  text-align: center;
  font: Times, serif;
}
.ui-password-input:focus {
  outline: none;
}

.ui-submit {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  padding: 0 1.5rem;
  height: 2rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: white;
  background-color: var(--color-primary);
}
.ui-submit:active {
  transform: scale(0.9);
  transition-duration: 0.2s;
}
.ui-submit:focus {
  outline: none;
}

.ui-link {
  color: var(--color-primary);
  text-decoration: none;
}

.ui-reset {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background: none;
  border: none;
  position: absolute;
  top: 0;
  right: 0;
  padding: 1rem;
}
.ui-reset:before {
  content: "ｘ";
  color: #AAAFBD;
  font-weight: bold;
  font-size: 1.5rem;
}
.ui-reset:focus {
  outline: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  /*background-color: #CED0E0;*/
  background-image: url("backgroundimage.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 18px;
}

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