/** Password Gate for Private Pages
 *
 *  Styled to match Zensical's own modal surfaces (see the built-in consent
 *  dialog) using the theme's CSS custom properties, so it stays 1:1 across
 *  light and dark color schemes with no hardcoded colors.
 */

.pk-gate {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--md-default-bg-color--light);
  -webkit-backdrop-filter: blur(.2rem);
  backdrop-filter: blur(.2rem);
}

.pk-gate__form {
  width: 100%;
  max-width: 24rem;
  padding: 1.5rem;
  color: var(--md-default-fg-color);
  background-color: var(--md-default-bg-color);
  border: 0;
  border-radius: .8rem;
  box-shadow: var(--md-shadow-z3);
}

.pk-gate__form h1 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.pk-gate__form p {
  margin: .5rem 0;
  font-size: .875rem;
  color: var(--md-default-fg-color--light);
}

.pk-gate__input {
  width: 100%;
  box-sizing: border-box;
  margin: .75rem 0 0;
  padding: .55rem .8rem;
  font-size: .875rem;
  font-family: var(--md-text-font);
  color: var(--md-default-fg-color);
  background-color: var(--md-code-bg-color);
  border: .1rem solid var(--md-default-fg-color--lightest);
  border-radius: .2rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* Updated Focus State */
.pk-gate__input:focus {
  outline: none;
  border-color: #fa862d;
  box-shadow: 0 0 0 .15rem rgba(250, 134, 45, 0.25);
}

.pk-gate__controls {
  margin-top: .75rem;
}

.pk-gate__controls .md-button {
  width: 100%;
  margin: 0;
}

.pk-gate__form .pk-gate__error {
  margin: .5rem 0 0;
  font-size: .8125rem;
  color: #d52a2a;
}