/* Trainer Gate — Passcode Lock Overlay */

/* Blur the existing console when locked */
.fx-console.is-locked {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  transition: filter 250ms ease-out;
}

.fx-console.is-locked.is-unlocking {
  filter: blur(0);
}

/* Full-screen overlay */
.fx-trainer-gate-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  background: rgba(4, 8, 23, 0.85);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.fx-trainer-gate-overlay.is-visible {
  opacity: 1;
}

/* Modal card */
.fx-trainer-gate-modal {
  background: var(--color-card-glass, rgba(8, 15, 27, 0.82));
  border: 1px solid var(--con-border, rgba(104, 154, 255, 0.14));
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.fx-gate-lock-icon {
  width: 32px;
  height: 32px;
  color: var(--con-muted, rgba(255,255,255,0.5));
  margin-bottom: 16px;
}

.fx-gate-eyebrow {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--con-muted, rgba(255,255,255,0.5));
  margin-bottom: 8px;
}

.fx-gate-heading {
  font-family: var(--font-heading, 'Space Grotesk', 'Inter', sans-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--con-text, #e8edf5);
  margin-bottom: 8px;
}

.fx-gate-subtext {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 14px;
  color: var(--con-muted, rgba(255,255,255,0.5));
  margin-bottom: 24px;
}

.fx-gate-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  font-size: 16px;
  font-family: var(--font-body, 'Inter', sans-serif);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--con-border, rgba(104, 154, 255, 0.14));
  border-radius: 8px;
  color: var(--con-text, #e8edf5);
  outline: none;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.fx-gate-input:focus {
  border-color: var(--color-accent, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.fx-gate-error {
  font-size: 14px;
  color: #ef4444;
  min-height: 20px;
  margin-bottom: 8px;
}

.fx-gate-unlock-btn {
  width: 100%;
  height: 44px;
  background: var(--color-accent, #3b82f6);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  transition: background 150ms ease;
}

.fx-gate-unlock-btn:hover {
  background: #2563eb;
}

.fx-gate-unlock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Shake animation */
@keyframes fx-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}

.fx-input-shake {
  animation: fx-shake 0.4s ease-in-out;
}

/* Light mode overrides */
[data-theme="light"] .fx-trainer-gate-overlay {
  background: rgba(200, 210, 230, 0.85);
}

[data-theme="light"] .fx-trainer-gate-modal {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 58, 110, 0.1);
}

[data-theme="light"] .fx-gate-input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(30, 58, 110, 0.1);
  color: #1a1a2e;
}

[data-theme="light"] .fx-gate-heading {
  color: #1a1a2e;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fx-input-shake { animation: none; }
  .fx-trainer-gate-overlay { transition: none; }
  .fx-console.is-locked { transition: none; }
}
