body#password {
  text-align: center;
  font-size: 18px;
}

body#password .container {
  position: absolute;
  width: 100vw;
  height: var(--vh);
  top: 0;
  left: 0;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* ————— FORM ————— */

body#password form {
  height: 1.6em;
  width: 8.5em;
  border-radius: var(--corner);
  background-color: var(--bgLight);
  transition: height var(--trans), width var(--trans);
  overflow: hidden ;
}

body#password form:has(input[type=password]:focus),
body#password form:has(input[type=password]:not(:placeholder-shown)) {
  height: 2.6em;
  width: 12em;
}

/* ————— INPUT ————— */

body#password input {
  background-color: transparent;
  border: none;
  outline: none;

  font-family: inherit;
  text-transform: inherit;
  text-align: inherit;
  color: inherit;

  cursor: pointer;
}

body#password input[type=password] {
  font-size: inherit;
  padding: 1.3em 0 0.2em;
  color: var(--highlight);
}

body#password input[type=password]::-webkit-contacts-auto-fill-button,
body#password input[type=password]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  height: 0;
  width: 0;
  margin: 0;
}

/* ————— LABEL ————— */

body#password label {
  display: block;
  position: relative;
  top: -2.1em;
  pointer-events: none;
  transition: top var(--trans), font-size var(--trans), opacity var(--trans);
}

body#password input[type=password]:focus ~ label,
body#password input[type=password]:not(:placeholder-shown) ~ label {
  top: -3em;
  font-size: 0.7em;
}

@media (hover: hover) {
  body#password input[type=password]:hover:not(:focus) ~ label {
    opacity: 0.5;
  }
}

/* ————— SUBMIT ————— */

body#password input[type=submit] {
  position: relative ;
  top: -3em;
  left: 5em;
  font-size: 1em;
  transition: top var(--trans), left var(--trans), opacity var(--trans);
  opacity: 0;
  pointer-events: none;
}

body#password input[type=password]:focus ~ input[type=submit],
body#password input[type=password]:not(:placeholder-shown) ~ input[type=submit] {
  top: -2.1em;
  left: 5em;
  opacity: 1;
  pointer-events: unset ;
}

@media (hover: hover) {
  body#password input[type=submit]:hover {
    opacity: 0.5;
  }
}

/* ————— FIREFOX ————— */

@-moz-document url-prefix() {
  body#password form {
    height: 2.6em;
    width: 12em;
  }
  body#password input[type=password] {
    width: 100%;
    padding: 1.2em 0 0.2em;
  }
  body#password input[type=submit] {
    top: -2.1em;
    left: 5em;
    opacity: 1;
    pointer-events: unset ;
  }
  body#password label {
    top: -3em;
    font-size: 0.7em;
  }
}