/* gate.css — OTP identity gate for the Atlantis whiteboarding site.
   Ocean-depth palette: abyss ground, aquamarine + gold accents. Uses the site's
   own type stack (Palatino display / system body) — no webfonts. */

#siteRoot[aria-hidden="true"] { display: none; }

#gate {
  position: fixed; inset: 0; z-index: 2147483647;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% 12%, #0d3f47 0%, #0a2e36 48%, #05171d 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 24px;
}

.gate-card { width: min(440px, 92vw); text-align: center; }
.gate-mark { margin: 0 auto 22px; filter: drop-shadow(0 0 26px rgba(51, 214, 194, 0.28)); }
.gate-ey {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: #33d6c2; font-weight: 600; margin-bottom: 14px;
}
.gate-card h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 600; font-size: 30px; color: #f4faf9; margin: 0 0 10px; letter-spacing: -0.01em;
}
.gate-card p { font-size: 13.5px; line-height: 1.6; color: rgba(226, 240, 238, 0.62); margin: 0 0 22px; }
.gate-card p strong { color: #f4faf9; font-weight: 600; }
.gate-hint { color: rgba(226, 240, 238, 0.45); }

.gate-card form { display: flex; gap: 8px; }
.gate-card input {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(126, 232, 220, 0.28); border-radius: 7px;
  padding: 13px 15px; color: #f4faf9; font-size: 14px; outline: none;
  transition: border-color 0.15s ease; font-family: inherit;
}
#codeInput {
  text-align: center; letter-spacing: 0.5em; font-size: 20px; font-weight: 600;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace; font-variant-numeric: tabular-nums;
}
.gate-card input::placeholder { color: rgba(226, 240, 238, 0.38); letter-spacing: normal; }
.gate-card input:focus { border-color: #33d6c2; }

.gate-card button[type="submit"] {
  background: #33d6c2; color: #05171d; border: none; border-radius: 7px;
  padding: 0 24px; height: 46px; font-weight: 700; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  transition: background 0.15s ease, transform 0.15s ease;
}
.gate-card button[type="submit"]:hover:not(:disabled) { background: #7ee8dc; transform: translateY(-1px); }
.gate-card button:disabled { opacity: 0.55; cursor: default; }

.gate-msg { color: #ffb3a0; font-size: 12.5px; margin-top: 14px; min-height: 16px; line-height: 1.5; }
.gate-msg.ok { color: #7ee8dc; }

.gate-link {
  background: none; border: none; color: rgba(226, 240, 238, 0.55);
  font-size: 12px; cursor: pointer; margin: 16px 10px 0; text-decoration: underline;
  font-family: inherit; padding: 0;
}
.gate-link:hover { color: #33d6c2; }

.gate-ft {
  margin-top: 30px; font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(226, 240, 238, 0.3);
}

.gate-card button:focus-visible, .gate-card input:focus-visible, .gate-link:focus-visible {
  outline: 2px solid #33d6c2; outline-offset: 3px;
}

@keyframes gateShake { 10%,90%{transform:translateX(-2px)} 30%,70%{transform:translateX(4px)} 50%{transform:translateX(-6px)} }
.gate-card.shake, .op-card.shake { animation: gateShake 0.4s ease; }
@media (prefers-reduced-motion: reduce) { .gate-card.shake, .op-card.shake { animation: none; } }

/* ── Operator: live roadmap update ───────────────────────────────────────── */
#opLaunch {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  background: #33d6c2; color: #05171d; border: none; border-radius: 999px;
  padding: 12px 20px; cursor: pointer; font-weight: 700;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(5, 23, 29, 0.45);
  transition: transform 0.15s ease, background 0.15s ease;
}
#opLaunch:hover { background: #7ee8dc; transform: translateY(-2px); }
#opLaunch[hidden] { display: none; }

#opModal {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(5, 23, 29, 0.82); backdrop-filter: blur(6px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
#opModal[hidden] { display: none; }
.op-card {
  width: min(760px, 95vw); max-height: 90vh; overflow-y: auto; background: #0a2e36;
  border: 1px solid rgba(126, 232, 220, 0.2); border-radius: 12px;
  padding: 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.op-card h2 {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-weight: 600; font-size: 24px; color: #f4faf9; margin: 6px 0 8px;
}
.op-card > div > p { font-size: 13.5px; line-height: 1.6; color: rgba(226, 240, 238, 0.62); margin: 0 0 16px; }

/* shared field look */
#opTranscript, #opContext, .rv-in, .rv-owner {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(126, 232, 220, 0.25);
  border-radius: 8px; color: #f4faf9; font-family: inherit; outline: none; box-sizing: border-box;
}
#opTranscript:focus, #opContext:focus, .rv-in:focus, .rv-owner:focus { border-color: #33d6c2; }

/* split input: paste | drop */
.op-split { display: flex; gap: 12px; }
.op-split > * { flex: 1 1 0; min-width: 0; }
#opTranscript { padding: 12px 14px; font-size: 13.5px; line-height: 1.5; resize: vertical; min-height: 200px; }
.op-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 6px; padding: 16px; min-height: 200px; cursor: pointer;
  border: 1.5px dashed rgba(126, 232, 220, 0.4); border-radius: 8px;
  background: rgba(51, 214, 194, 0.04); transition: background 0.15s ease, border-color 0.15s ease;
}
.op-drop:hover, .op-drop:focus-visible { border-color: #33d6c2; background: rgba(51, 214, 194, 0.09); }
.op-drop.dragover { border-color: #33d6c2; background: rgba(51, 214, 194, 0.16); }
.op-drop-ico { font-size: 26px; color: #33d6c2; line-height: 1; }
.op-drop-txt { font-size: 13.5px; color: #cfe6e4; }
.op-drop-txt b { color: #f4faf9; }
.op-drop-sub { font-size: 12px; color: #8fb0b3; font-family: "SF Mono", "Cascadia Code", Consolas, monospace; letter-spacing: 0.04em; }
.op-drop-name { font-size: 12px; color: #7ee8dc; margin-top: 4px; word-break: break-all; }
@media (max-width: 560px) { .op-split { flex-direction: column; } #opTranscript, .op-drop { min-height: 130px; } }

/* buttons — consistent across the modal */
.op-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.op-btn, .op-btn-ghost {
  height: 44px; padding: 0 22px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.op-btn { background: #33d6c2; color: #05171d; border: none; }
.op-btn:hover:not(:disabled) { background: #7ee8dc; transform: translateY(-1px); }
.op-btn-ghost { background: transparent; color: rgba(226, 240, 238, 0.85); border: 1px solid rgba(126, 232, 220, 0.35); }
.op-btn-ghost:hover:not(:disabled) { border-color: #33d6c2; color: #f4faf9; }
.op-btn:disabled, .op-btn-ghost:disabled { opacity: 0.55; cursor: default; }

/* tabs (New | Intake queue) */
.op-tabs { display: flex; gap: 6px; margin: 4px 0 18px; border-bottom: 1px solid rgba(126, 232, 220, 0.14); }
#opTabs[hidden] { display: none; }
.op-tab {
  background: none; border: none; cursor: pointer; padding: 8px 12px 10px; margin-bottom: -1px;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #8fb0b3; border-bottom: 2px solid transparent;
}
.op-tab:hover { color: #cfe6e4; }
.op-tab.is-active { color: #33d6c2; border-bottom-color: #33d6c2; }
.op-badge {
  display: inline-block; min-width: 17px; padding: 1px 5px; margin-left: 4px; border-radius: 999px;
  background: #33d6c2; color: #05171d; font-size: 10px; font-weight: 700; text-align: center;
}
.op-badge[hidden] { display: none; }

/* intake queue list */
.op-queue { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.op-queue-empty { padding: 22px 14px; text-align: center; color: #8fb0b3; font-size: 13px; border: 1px dashed rgba(126, 232, 220, 0.2); border-radius: 8px; }
.op-queue-empty code { color: #7ee8dc; font-family: "SF Mono", "Cascadia Code", Consolas, monospace; }
.op-q-item { display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid rgba(126, 232, 220, 0.16); border-radius: 8px; padding: 12px 14px; }
.op-q-main { min-width: 0; }
.op-q-title { color: #f4faf9; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-q-meta { color: #8fb0b3; font-size: 11.5px; font-family: "SF Mono", "Cascadia Code", Consolas, monospace; letter-spacing: 0.03em; margin-top: 3px; }
.op-q-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.op-q-actions .op-btn, .op-q-actions .op-btn-ghost { height: 34px; padding: 0 14px; }

/* review / edit form */
.op-review { display: flex; flex-direction: column; gap: 16px; margin-bottom: 4px; }
.rv-group { border: 1px solid rgba(126, 232, 220, 0.14); border-radius: 8px; padding: 14px; }
.rv-head { font-family: "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #33d6c2; margin-bottom: 10px; }
.rv-head .rv-theme { color: #8fb0b3; }
.rv-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rv-in { flex: 1 1 auto; padding: 9px 11px; font-size: 13px; }
.rv-owner { flex: 0 0 auto; padding: 9px 8px; font-size: 12px; }
.rv-owner option { color: #05171d; }
.rv-x { flex: 0 0 auto; width: 30px; height: 34px; border-radius: 6px; cursor: pointer; border: 1px solid rgba(126,232,220,0.25); background: transparent; color: #8fb0b3; font-size: 16px; line-height: 1; }
.rv-x:hover { border-color: #ff9a86; color: #ffb3a0; }
.rv-add { background: none; border: none; color: #33d6c2; cursor: pointer; font-family: "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 11px; letter-spacing: 0.06em; padding: 2px 0; }
.rv-add:hover { color: #7ee8dc; }
.op-regen { display: flex; gap: 8px; margin: 14px 0 4px; }
#opContext { flex: 1 1 auto; height: 40px; padding: 0 12px; font-size: 13px; }

#opLaunch:focus-visible, .op-btn:focus-visible, .op-btn-ghost:focus-visible,
#opTranscript:focus-visible, #opContext:focus-visible, .rv-in:focus-visible, .rv-owner:focus-visible {
  outline: 2px solid #33d6c2; outline-offset: 3px;
}
