/* ==========================================================================
   gates.css — Part F account-friction components (FR-2 gate, FR-4 nudge).
   Light daisyUI theme only (no dark mode, per estate standard). All state
   changes are class toggles (CSP: class-not-inline; no inline styles).
   Components: .dj-comment-gate (composer-visible account wall),
   .dj-join-nudge (shared minor-friction nudge), .dj-gate-left-hint
   (chat meter pre-warning).
   ========================================================================== */

.dj-hidden { display: none !important; }

/* ---- Comment gate (composer stays visible + writable) ------------------ */
.dj-comment-gate { margin-top: 1.25rem; }

.dj-comment-gate .dj-comment-draft {
  width: 100%;
  resize: vertical;
}

.dj-gate-bar {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid oklch(85% 0.02 255);
  border-radius: 0.9rem;
  background: oklch(97.5% 0.008 255);
}

.dj-gate-lead {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: oklch(35% 0.02 255);
}
.dj-gate-lead strong { color: oklch(25% 0.03 255); }

.dj-gate-start {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.dj-gate-start .dj-gate-email {
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 22rem;
}

.dj-gate-step2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}
.dj-gate-step2 .dj-gate-name { flex: 1 1 12rem; max-width: 18rem; }
.dj-gate-step2 .dj-gate-year { flex: 0 1 7rem; }
.dj-gate-step2 .dj-gate-code { flex: 0 1 9rem; letter-spacing: 0.25em; }

.dj-gate-msg {
  margin: 0.6rem 0 0;
  min-height: 1.1rem;
  font-size: 0.82rem;
  color: oklch(45% 0.05 160);
}
.dj-gate-msg.dj-gate-err { color: oklch(50% 0.19 27); }

.dj-gate-fine {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: oklch(52% 0.015 255);
}

/* Signed-in composer identity line ("Commenting as …") */
.dj-gate-as {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: oklch(52% 0.015 255);
}
.dj-gate-as strong { color: oklch(30% 0.03 255); }

/* ---- Chat meter pre-warning (roomstate guest_left) ---------------------- */
.dj-gate-left-hint {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: oklch(48% 0.09 65);
}

/* ---- Shared join nudge (FR-4) ------------------------------------------- */
.dj-join-nudge {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding: 0.7rem 1rem;
  border: 1px solid oklch(85% 0.02 255);
  border-radius: 0.8rem;
  background: oklch(97.5% 0.008 255);
}
.dj-join-nudge-text {
  margin: 0;
  flex: 1 1 14rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: oklch(35% 0.02 255);
}

/* ---- FR-3 onboarding question stacks (.dj-onboard, chips not forms) ----- */
.dj-onboard {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid oklch(85% 0.02 255);
  border-radius: 1rem;
  background: oklch(97.5% 0.008 255);
}

.dj-onb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.dj-onb-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: oklch(30% 0.03 255);
}

.dj-onb-card { border: 0; margin: 0; padding: 0.25rem 0 0; }
.dj-onb-q {
  padding: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: oklch(25% 0.03 255);
}
.dj-onb-hint {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: oklch(52% 0.015 255);
}

.dj-onb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.dj-onb-chip { position: relative; }
.dj-onb-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.dj-onb-chip span {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border: 1px solid oklch(80% 0.02 255);
  border-radius: 999px;
  background: oklch(100% 0 0);
  font-size: 0.84rem;
  font-weight: 600;
  color: oklch(35% 0.02 255);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.dj-onb-chip span:hover { border-color: oklch(60% 0.12 255); }
.dj-onb-chip input:checked + span {
  background: oklch(48% 0.18 258);
  border-color: oklch(48% 0.18 258);
  color: oklch(100% 0 0);
}
.dj-onb-chip input:focus-visible + span {
  outline: 2px solid oklch(48% 0.18 258);
  outline-offset: 2px;
}

.dj-onb-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.7rem;
  font-size: 0.86rem;
  color: oklch(35% 0.02 255);
  cursor: pointer;
}

.dj-onb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.dj-onb-step {
  margin-left: auto;
  font-size: 0.74rem;
  color: oklch(60% 0.015 255);
}

.dj-onb-msg {
  margin: 0.5rem 0 0;
  min-height: 1rem;
  font-size: 0.82rem;
  color: oklch(45% 0.05 160);
}

@media (max-width: 480px) {
  .dj-gate-bar { padding: 0.85rem 0.9rem; }
  .dj-gate-start .dj-gate-email { max-width: none; }
  .dj-onboard { padding: 0.85rem 0.9rem; }
}
