/* lock.css — WP8. Full-viewport access gate (email-not-verified / pending
 * approval / rejected) + the styled 404, plus the in-app gated-feature overlays
 * (blur+nudge, profile gate). Ported verbatim from eudr-x access-lock.css with
 * gt-lock__ → ct-lock__ and the navy substitutions in spec-theme §5.2 /
 * spec-auth §10 (veil base 8,17,32; halo #3f5469→#16293d; primary
 * #1f3c54→#16293d; eyebrow #526878; title #0e1823; message #3f5469). The gate
 * pages are always light — colours are hardcoded so a dark-mode class can't
 * leak in (spec-auth §11.5). Reduced-motion is handled globally (tokens.css). */

/* ═══════════════════════════ Full-page gate ═══════════════════════════ */
.ct-lock {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  overflow-y: auto;
  font-family: var(--font-body, "Nunito", sans-serif);
}

.ct-lock__video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}

/* Navy darkening veil — heavier than the login page to signal "gate" */
.ct-lock__veil {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8, 17, 32, 0.55) 0%, rgba(8, 17, 32, 0.88) 100%),
    linear-gradient(180deg, rgba(8, 17, 32, 0.35) 0%, rgba(8, 17, 32, 0.75) 100%);
  z-index: 1;
  pointer-events: none;
}

.ct-lock__card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 40px 36px 32px;
  background: rgba(244, 247, 250, 0.97);
  border: 1px solid rgba(22, 41, 61, 0.1);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 30px 80px -20px rgba(8, 17, 32, 0.55),
    0 10px 30px -12px rgba(8, 17, 32, 0.35);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  text-align: center;
  animation: ct-lock-card-in 0.55s cubic-bezier(0.22, 0.8, 0.35, 1) both;
}

@keyframes ct-lock-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ct-lock__logo {
  display: inline-block;
  max-width: 76px;
  height: auto;
  margin-bottom: 18px;
  opacity: 0.95;
}

.ct-lock__halo {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
}

.ct-lock__halo-core {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3f5469 0%, #16293d 100%);
  display: grid;
  place-items: center;
  box-shadow:
    0 10px 24px -8px rgba(22, 41, 61, 0.55),
    0 0 0 1px rgba(22, 41, 61, 0.25) inset;
}

.ct-lock__halo-core svg {
  width: 28px;
  height: 28px;
  color: #f4f7fa;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Typography */
.ct-lock__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #526878;
  margin: 0 0 10px;
}

.ct-lock__title {
  font-family: var(--font-display, "Nunito", sans-serif);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #0e1823;
  margin: 0 0 10px;
  line-height: 1.2;
}

.ct-lock__message {
  font-size: 0.94rem;
  line-height: 1.55;
  color: #3f5469;
  margin: 0 0 18px;
}

/* Chip row — email + status share one 30px baseline */
.ct-lock__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
}

.ct-lock__email-chip,
.ct-lock__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 14px;
  margin: 0;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}

.ct-lock__email-chip {
  background: rgba(82, 104, 120, 0.1);
  border: 1px solid rgba(22, 41, 61, 0.18);
  color: #0e1823;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-lock__email-chip svg {
  width: 14px;
  height: 14px;
  color: #526878;
  flex: 0 0 auto;
}

.ct-lock__status {
  background: rgba(255, 173, 51, 0.12);
  border: 1px solid transparent;
  color: #8a5a00;
  letter-spacing: 0.02em;
}

.ct-lock__status--pending {
  background: rgba(255, 173, 51, 0.12);
  color: #8a5a00;
}

.ct-lock__status--rejected {
  background: rgba(201, 58, 58, 0.12);
  color: #8b1f1f;
}

.ct-lock__status--approved {
  background: rgba(47, 107, 52, 0.16);
  color: #2f6b34;
}

.ct-lock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: ct-lock-dot-pulse 1.8s ease-out infinite;
}

@keyframes ct-lock-dot-pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
    opacity: 0.6;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    opacity: 1;
  }
}

/* Action stack */
.ct-lock__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

.ct-lock__btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.ct-lock__btn:active {
  transform: translateY(1px);
}
.ct-lock__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ct-lock__btn--primary {
  background: linear-gradient(180deg, #1f3c54 0%, #16293d 100%);
  color: #f4f7fa;
  box-shadow:
    0 10px 22px -10px rgba(22, 41, 61, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.ct-lock__btn--primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #2c4763 0%, #1a3448 100%);
  box-shadow:
    0 14px 28px -10px rgba(22, 41, 61, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.ct-lock__btn--secondary {
  background: transparent;
  color: #16293d;
  border: 1.5px solid rgba(22, 41, 61, 0.35);
}

.ct-lock__btn--secondary:hover:not(:disabled) {
  background: rgba(82, 104, 120, 0.08);
  border-color: #526878;
}

.ct-lock__btn--ghost {
  background: transparent;
  color: #3f5469;
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 600;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.ct-lock__btn--ghost:hover:not(:disabled) {
  color: #0e1823;
  text-decoration-thickness: 1.5px;
}

/* Feedback line */
.ct-lock__feedback {
  min-height: 1.2em;
  font-size: 0.8rem;
  line-height: 1.35;
  margin: 10px 0 0;
  color: #3f5469;
}

.ct-lock__feedback--error {
  color: #8b1f1f;
}
.ct-lock__feedback--ok {
  color: #2f6b34;
}

/* Footer */
.ct-lock__footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(22, 41, 61, 0.1);
  font-size: 0.78rem;
  color: #62788a;
  line-height: 1.5;
}

.ct-lock__footer a {
  color: #1a3448;
  text-decoration: none;
  font-weight: 700;
}

.ct-lock__footer a:hover {
  text-decoration: underline;
}

@media (max-width: 420px) {
  .ct-lock__card {
    padding: 32px 24px 26px;
    border-radius: 14px;
  }
  .ct-lock__title {
    font-size: 1.35rem;
  }
  .ct-lock__halo {
    width: 84px;
    height: 84px;
    margin-bottom: 16px;
  }
  .ct-lock__halo-core {
    width: 56px;
    height: 56px;
  }
}

/* ═══════════════════════════ In-app gated-feature overlays ═══════════════════════════ */
/* spec-theme §5.3 — a blurred-out container with a floating pulsing CTA. Lives
 * INSIDE the app shell (which flips), so dark-mode pins are included. */
.ct-card-blur {
  position: relative;
}
.ct-card-blur > *:not(.ct-nudge-overlay) {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
  opacity: 0.4;
  transition: filter 0.4s, opacity 0.4s;
}

.ct-nudge-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 24px;
  text-align: center;
  animation: ct-nudge-fade-in 0.5s ease;
}
.ct-nudge-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f6a7d 0%, #16293d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 16px;
  animation: ct-nudge-pulse 2s ease-in-out infinite;
}
.ct-nudge-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text, #0e1823);
  margin-bottom: 6px;
}
.ct-nudge-desc {
  font-size: 0.88rem;
  color: var(--text-muted, #3f5469);
  margin-bottom: 18px;
  max-width: 340px;
  line-height: 1.5;
}
.ct-nudge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3f6a7d 0%, #16293d 100%);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(22, 41, 61, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ct-nudge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 41, 61, 0.4);
}
.ct-nudge-arrow {
  font-size: 1.1rem;
  animation: ct-nudge-bounce-x 1s ease-in-out infinite;
}

/* Inline (non-blur) empty-state gate */
.ct-profile-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  text-align: center;
  animation: ct-nudge-fade-in 0.5s ease;
}
.ct-profile-gate-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #526878 0%, #16293d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 18px;
  animation: ct-nudge-pulse 2s ease-in-out infinite;
}
.ct-profile-gate-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary, #16293d);
  margin: 0 0 8px;
  font-family: var(--font-display);
}
.ct-profile-gate-desc {
  font-size: 0.92rem;
  color: var(--text-muted, #3f5469);
  max-width: 460px;
  line-height: 1.55;
  margin: 0 0 24px;
}

@keyframes ct-nudge-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
@keyframes ct-nudge-bounce-x {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}
@keyframes ct-nudge-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark-mode .ct-nudge-title,
body.dark-mode .ct-profile-gate-title {
  color: #e8ecf0;
}
body.dark-mode .ct-nudge-desc,
body.dark-mode .ct-profile-gate-desc {
  color: #9fadbd;
}
