/* ============================================================
   gate.css — Full-page password gate overlay
   ============================================================ */

#pa-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #FAFAF7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#pa-gate-overlay.is-visible  { opacity: 1; }
#pa-gate-overlay.is-unlocked { opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }

.pa-gate-box {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border: 1px solid #E5E1D5;
  border-radius: 24px;
  padding: 40px 36px 32px;
  box-shadow:
    0 32px 64px -24px rgba(15, 20, 25, 0.13),
    0 4px 16px -8px rgba(15, 20, 25, 0.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.pa-gate-lock {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #EEF2E6;
  color: #5B6B4A;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.pa-gate-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0F1419;
  line-height: 1.2;
}

.pa-gate-hint {
  margin: 0 0 24px;
  font-size: 14px;
  color: #475569;
  line-height: 1.55;
}

.pa-gate-form {
  display: block;
  width: 100%;
}

.pa-gate-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 12px 16px;
  border: 1px solid #E5E1D5;
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: #0F1419;
  background: #FAFAF7;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.pa-gate-input:focus {
  border-color: #5B6B4A;
  box-shadow: 0 0 0 3px rgba(91, 107, 74, 0.14);
}

.pa-gate-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  background: #0F1419;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}

.pa-gate-btn:hover:not(:disabled) { background: #1F2937; }
.pa-gate-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pa-gate-error {
  margin: 12px 0 0;
  font-size: 13px;
  color: #B45309;
  min-height: 1.4em;
  line-height: 1.4;
}

.pa-gate-back {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s;
}

.pa-gate-back:hover { color: #475569; }

/* Shake on wrong password */
@keyframes pa-gate-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  40%       { transform: translateX( 7px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX( 4px); }
}

.pa-gate-box.shake {
  animation: pa-gate-shake 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@media (max-width: 480px) {
  .pa-gate-box { padding: 32px 24px 28px; border-radius: 20px; }
}
