/* ═══════════════════════════════════════════════════════════════════════════
   JAMA UX REDESIGN — Entrepreneurship OS
   Applied on top of clajama-app.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Welcome Overlay: wo-card, wo-title, wo-sub, wo-suggestions, wo-btn ── */

.wo-card {
  max-width: 520px;
  width: 100%;
  background: rgba(7, 10, 16, 0.95);
  border: 1px solid var(--accent-border);
  border-radius: 24px;
  padding: 40px 32px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(196, 169, 110, 0.06), 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: wo-card-in 0.4s ease 0.1s both;
}

@keyframes wo-card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wo-pulse-ring {
  position: absolute;
  top: 48px;
  left: 50%;
  width: 80px;
  height: 80px;
  margin-left: -40px;
  border-radius: 50%;
  border: 1px solid rgba(196, 169, 110, 0.10);
  animation: wo-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wo-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.wo-jama-icon {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, rgba(196, 169, 110, 0.18), rgba(196, 169, 110, 0.05));
  border: 2px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  box-shadow: 0 0 24px rgba(196, 169, 110, 0.10);
}

.wo-title {
  font-size: 28px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.wo-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.wo-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.wo-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(11, 13, 18, 0.60);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  font-family: inherit;
}

.wo-btn:hover {
  border-color: var(--accent-border);
  background: rgba(196, 169, 110, 0.06);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.wo-btn:active {
  transform: translateY(0);
}

.wo-btn-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 2px;
}

.wo-btn-text {
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}

.wo-btn-desc {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
}

.wo-opportunity-strip {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.wo-opp-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(196, 169, 110, 0.04);
  border: 1px solid rgba(196, 169, 110, 0.06);
}

.wo-opp-icon {
  font-size: 13px;
  line-height: 1;
}

.wo-opp-text {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}

.wo-skip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s;
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.wo-skip:hover {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent);
}
  margin-left: auto;
  margin-right: auto;
}

.welcome-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.welcome-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 13, 18, 0.60);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
}

.welcome-chip:hover {
  border-color: var(--accent-border);
  background: rgba(196, 169, 110, 0.06);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.welcome-chip:active {
  transform: translateY(0);
}

.welcome-chip-icon {
  font-size: 18px;
  line-height: 1;
}

.welcome-chip-label {
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}

.welcome-chip-desc {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
}

.welcome-start {
  width: 100%;
  justify-content: center;
  font-size: 15px;
}

/* ── Chat Header ── */

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 10, 16, 0.60);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.chat-header-avatar {
  flex-shrink: 0;
}

.jama-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(196, 169, 110, 0.15), rgba(196, 169, 110, 0.05));
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.jama-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(196, 169, 110, 0.15), rgba(196, 169, 110, 0.05));
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-header-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.3);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-header-actions {
  display: flex;
  gap: 6px;
}

.chat-header-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.chat-header-btn:hover {
  border-color: var(--accent-border);
  background: rgba(196, 169, 110, 0.06);
  color: var(--text-primary);
}

/* ── Thinking / Loading States ── */

.chat-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  animation: thinking-fadein 0.3s ease;
}

@keyframes thinking-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.thinking-steps {
  display: flex;
  gap: 8px;
  align-items: center;
}

.thinking-step {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(196, 169, 110, 0.04);
  border: 1px solid transparent;
  transition: all 0.3s;
}

.thinking-step.active {
  border-color: var(--accent-border);
  color: var(--accent);
  background: rgba(196, 169, 110, 0.08);
}

.thinking-step.completed {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.15);
}

.chat-thinking-text {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Chat Timestamps ── */

.chat-timestamp {
  font-size: 10px;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.6;
}

/* ── Chat Links ── */

.chat-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.15s;
}

.chat-link:hover {
  border-bottom-color: var(--accent);
}

/* ── Quick action label ── */

.qa-label {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

/* ── Quick Actions Bar (Returning Users) ── */

.quick-actions-bar {
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 10, 16, 0.40);
}

.quick-actions-label {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.quick-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.qa-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 13, 18, 0.50);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.qa-chip:hover {
  border-color: var(--accent-border);
  background: rgba(196, 169, 110, 0.06);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.qa-chip:active {
  transform: scale(0.96);
}

/* ── Chat Area Layout ── */
/* Chat area layout handled by clajama-app.css (.chat-messages inside .main-content grid) */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

/* ── Mobile Spacing Fix ── */

@media (max-width: 639px) {
  .chat-messages {
    padding: 12px 14px;
  }

  .chat-header {
    padding: 8px 14px;
    gap: 8px;
  }

  .wo-card {
    padding: 28px 20px 20px;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    overflow-y: auto;
    max-width: 100%;
  }

  .wo-title {
    font-size: 24px;
  }

  .wo-suggestions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .wo-btn {
    padding: 12px 14px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .wo-btn-desc {
    display: none;
  }

  .wo-opportunity-strip {
    flex-wrap: wrap;
    gap: 6px;
  }

  .wo-opp-item {
    padding: 4px 10px;
  }

  .quick-actions-bar {
    padding: 12px 14px;
  }

  .quick-chips {
    gap: 6px;
  }

  .qa-chip {
    padding: 6px 12px;
    font-size: 11px;
  }

  .chat-msg {
    max-width: 92%;
  }

  .chat-bubble {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* Fix iOS viewport */
  .chat-area {
    height: -webkit-fill-available;
    height: 100dvh;
    min-height: 0;
  }
}

@media (max-width: 639px) and (orientation: landscape) {
  /* Landscape mobile: no special overrides needed beyond clajama-app.css */
}

/* ── Tablet (640-1023px) ── */
/* Tablet overrides handled by clajama-app.css */

/* iOS 100vh fix handled in clajama-app.css */
