/* loader.css — Session-cookie loader overlay (default = light theme)
 *
 * The loader appears on first visit (gated by the
 * `fire2026_loader_seen` cookie). It uses the design tokens directly
 * so the same overlay renders correctly in both light and dark themes
 * — the inline FOUC-prevention script in each page's <head> sets the
 * data-theme attribute before the page paints.
 */

.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, background-color 0.3s ease;
}

.loader-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.site-hidden {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.site-hidden.show {
  opacity: 1;
}

/* Skip loader if cookie exists */
body.loader-done .loader-overlay {
  display: none;
}
body.loader-done .site-hidden {
  opacity: 1;
}

.loader-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.loader-logo-img {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 12px rgba(10, 122, 158, 0.3)) drop-shadow(0 0 24px rgba(196, 32, 80, 0.2));
}

[data-theme="dark"] .loader-logo-img {
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.3)) drop-shadow(0 0 24px rgba(255, 45, 107, 0.2));
}

.loader-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--color-cyan);
  text-transform: uppercase;
  text-shadow: 0 0 7px rgba(10, 122, 158, 0.4), 0 0 20px rgba(10, 122, 158, 0.15);
}

[data-theme="dark"] .loader-wordmark {
  text-shadow: 0 0 7px rgba(0, 229, 255, 0.6), 0 0 20px rgba(0, 229, 255, 0.3);
}

.loader-wordmark span {
  color: var(--color-pink);
  text-shadow: 0 0 7px rgba(196, 32, 80, 0.4), 0 0 20px rgba(196, 32, 80, 0.15);
}

[data-theme="dark"] .loader-wordmark span {
  text-shadow: 0 0 7px rgba(255, 45, 107, 0.6), 0 0 20px rgba(255, 45, 107, 0.3);
}

.loader-subtitle {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--color-muted);
  letter-spacing: 0.5px;
}

.loader-heading {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.chats {
  display: flex;
  gap: 16px;
}

.chat-box {
  width: 300px;
  background: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.chat-header {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.chat-header svg {
  stroke: var(--color-muted);
}

.tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
  background: var(--color-surface-2);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.chat-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(6px);
}

.msg.visible {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.user-msg {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.user-msg svg { flex-shrink: 0; margin-top: 2px; }
.user-msg svg { stroke: var(--color-muted); }

.user-msg mark {
  background: none;
  color: var(--color-text-strong);
  font-size: 14px;
  font-weight: 700;
}

.ai-msg {
  background: var(--color-abyss);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.ai-msg svg { flex-shrink: 0; margin-top: 2px; stroke: var(--color-muted); }

.ai-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-ghost);
  margin-bottom: 3px;
}

.msg-text { flex: 1; }

.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 5px; height: 5px;
  background: var(--color-ghost);
  border-radius: 50%;
  animation: bounce 1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-5px); opacity: 1; }
}

.cursor {
  display: inline-block;
  width: 1.5px;
  height: 12px;
  background: var(--color-muted);
  vertical-align: text-bottom;
  animation: blink 0.5s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.bottom-text {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-strong);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  opacity: 0;
  transition: opacity 0.6s ease;
}

[data-theme="dark"] .bottom-text {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.bottom-text.visible { opacity: 1; }

@media (max-width: 700px) {
  .chats { flex-direction: column; gap: 12px; }
  .chat-box { width: 90vw; }
}
