/* Full-screen password gate — paired with html.site-gate-locked / .site-gate-unlocked */

html.site-gate-locked body {
  overflow: hidden;
}

html.site-gate-locked body > *:not(#site-gate) {
  visibility: hidden !important;
  pointer-events: none !important;
  user-select: none !important;
}

.site-gate[hidden] {
  display: none !important;
}

html.site-gate-locked .site-gate {
  display: flex;
}

.site-gate {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(var(--site-canvas-bg), 1);
}

.site-gate-inner {
  width: 100%;
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.site-gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-gate-label {
  font-family: "SquareSansText-Medium", "SquareSansText-Regular", helvetica, sans-serif;
  font-size: 0.875rem;
  color: rgba(var(--text-color), 0.85);
}

.site-gate-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

#site-gate-input {
  flex: 1 1 10rem;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: "SquareSansText-Regular", helvetica, sans-serif;
  font-size: 1rem;
  color: rgb(var(--text-color));
  background: rgba(var(--color-primary-white), 0.08);
  border: 1px solid rgba(var(--text-color), 0.2);
  border-radius: 8px;
  outline: none;
}

html.theme-light #site-gate-input {
  background: rgba(var(--text-color), 0.06);
  border-color: rgba(var(--text-color), 0.15);
}

#site-gate-input:focus {
  border-color: rgba(var(--text-color), 0.45);
  box-shadow: 0 0 0 2px rgba(var(--text-color), 0.12);
}

#site-gate-submit {
  flex: 0 0 auto;
  cursor: pointer;
  padding: 0.625rem 1rem;
  font-family: "SquareSansText-Medium", "SquareSansText-Regular", helvetica, sans-serif;
  font-size: 0.9375rem;
  color: rgba(var(--text-color-inverse), 1);
  background: rgba(var(--text-color), 0.92);
  border: none;
  border-radius: 8px;
}

html.theme-light #site-gate-submit {
  color: rgba(var(--color-primary-white), 1);
  background: rgba(var(--text-color), 0.88);
}

#site-gate-submit:hover {
  opacity: 0.92;
}

#site-gate-submit:active {
  opacity: 0.85;
}

.site-gate-error {
  margin: 0;
  min-height: 1.25rem;
  font-family: "SquareSansText-Regular", helvetica, sans-serif;
  font-size: 0.8125rem;
  color: #e85d5d;
}

html.theme-light .site-gate-error {
  color: #c62828;
}

.site-gate-error[hidden] {
  display: none !important;
}
