/* === Projctr Gate – Foldr-style modal ==================================== */

/* Same positioning as Foldr admin login modal */
.foundry-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 10010; /* above app shell */
}

/* Scrim matches Foldr’s blurred overlay */
.foundry-gate-modal .scrim {
  position: absolute;
  inset: 0;
  background: ##f3f5f2;
  backdrop-filter: blur(6px) saturate(120%);
opacity: 0.8;
}

/* Blue card: mirror #adminLoginModal .card */
.foundry-gate-modal .card {
  position: absolute;
  background: #2253f4;
  color: #f3f5f2;
  border-radius: 32px;
  width: min(560px, 92vw);
  padding: 32px 28px;
  margin: 0 auto;
  top: 50%;
  box-shadow: 0 20px 60px rgba(17, 23, 41, 0.35);
  animation: splashFadeIn 0.25s ease forwards;
  transition: border-color 0.2s ease;
}

/* Reuse existing keyframe if not already defined */
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(-46%) scale(0.98); }
  to   { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* Error border state (same as Foldr login-error) */
.foundry-gate-modal .card.login-error {
  border: 2px solid rgb(255, 55, 95);
}

/* Header = Foldr modal header */
.foundry-gate-modal header {
  margin: 0 0 12px 0;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #f3f5f2;
}

/* Section just wraps the field stack */
.foundry-gate-modal section {
  margin-top: 4px;
}

/* Field + label + input, like #adminLoginModal .field */
.foundry-gate-modal .field label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.85);
}

.foundry-gate-input,
.foundry-gate-modal input[type="password"] {
  width: 100%;
  height: 48px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f5f2;
  font-size: 18px;
  appearance: none;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid rgba(243, 245, 242, 0.5);
  outline: none;
  padding: 0 14px;
}

.foundry-gate-input::placeholder {
  color: rgba(243, 245, 242, 0.5);
}

/* Remember-row, styled in the same family as Foldr helpers */
.foundry-gate-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.80);
}

.foundry-gate-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffffff;
}

/* Error text line under field */
.foundry-gate-error {
  margin-top: 6px;
  font-size: 13px;
  color: rgb(255, 99, 132);
}

/* Footer buttons – same grid as Foldr modal footer */
.foundry-gate-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* Primary gate button matches Foldr .btn.brand */
.foundry-gate-btn,
.foundry-gate-modal .btn.brand {
  height: 48px;
  padding: 0 18px;
  border-radius: 99px;
  background: #ffffff;
  color: #2253f4;
  border: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  font-size: 14px;
  cursor: pointer;
}

/* Optional: support secondary .btn (if you ever add Cancel later) */
.foundry-gate-modal .btn:not(.brand) {
  color: #f3f5f2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  border-radius: 99px;
  padding: 10px 16px;
  height: 48px;
}

/* Fade-out hook (used in done()) */
.foundry-gate-fade {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

/* Optional: small tweaks for gate text/error */
.foundry-gate-modal .foundry-gate-message {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.foundry-gate-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.foundry-gate-error {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #ff3b30;
}