/* ─── aicvagent.css — Main Stylesheet ─────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  color: #1a1a2e;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ─── NAV — LIGHT (default / RemoteHuntr) ─────────────────────────────────── */
.aicv-nav {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.aicv-brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.aicv-tagline {
  font-size: 0.82rem;
  color: #6c757d;
  letter-spacing: 0.3px;
}

/* ─── NAV — DARK (Njeri/Cleo style) ──────────────────────────────────────── */
.nav-dark .aicv-nav {
  background: rgba(var(--primary-rgb, 28, 46, 94), 0.97);
  background: var(--primary);
  border-bottom: none;
  position: fixed;
  width: 100%;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.nav-dark .aicv-brand-text {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-dark .aicv-brand-text span,
.nav-dark .aicv-brand-text i {
  color: var(--secondary);
}

.nav-dark .aicv-tagline {
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-dark .btn-primary {
  background: var(--secondary);
  border-color: var(--secondary);
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0.5rem 1.4rem;
}

.nav-dark .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* Dark nav body needs top padding so fixed nav doesn't cover content */
.nav-dark main {
  padding-top: 70px;
}

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn-primary-brand {
  background: var(--primary);
  color: #fff !important;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary-brand:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

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

.btn-secondary-brand {
  background: var(--secondary);
  color: #fff !important;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.1s;
}

.btn-secondary-brand:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-outline-primary-brand {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-outline-primary-brand:hover {
  background: var(--primary);
  color: #fff !important;
}

.text-primary-brand  { color: var(--primary) !important; }
.text-secondary-brand { color: var(--secondary) !important; }

/* ─── FLASH ───────────────────────────────────────────────────────────────── */
.flash-container {
  padding: 0.5rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* ─── CARDS ───────────────────────────────────────────────────────────────── */
.aicv-card {
  border: 1px solid #e9ecef;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

/* ─── HERO — LIGHT ────────────────────────────────────────────────────────── */
.hero-section {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #fafbff 0%, #f0f4ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  border: 1px solid rgba(var(--primary-rgb, 46,23,140), 0.3);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-heading {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.hero-subheading {
  font-size: 1.2rem;
  color: #4a5568;
  margin-bottom: 1rem;
}

.hero-body {
  font-size: 1rem;
  color: #6c757d;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── HERO — DARK (Njeri style) ───────────────────────────────────────────── */
.nav-dark .hero-section {
  background: var(--primary);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Teal line at bottom of dark hero */
.nav-dark .hero-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.nav-dark .hero-badge {
  background: rgba(80,162,167,0.15);
  border: 1px solid rgba(80,162,167,0.4);
  color: var(--secondary);
}

.nav-dark .hero-heading {
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-dark .hero-heading span {
  color: var(--secondary);
}

.nav-dark .hero-subheading {
  color: rgba(255,255,255,0.75);
}

.nav-dark .hero-body {
  color: rgba(255,255,255,0.6);
}

.nav-dark .text-primary-brand {
  color: var(--secondary) !important;
}

/* ─── FEATURES ────────────────────────────────────────────────────────────── */
.feature-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1.5rem;
  height: 100%;
  text-align: center;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.nav-dark .feature-card {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
}

.nav-dark .feature-card h5 { color: #fff; }
.nav-dark .feature-card p  { color: rgba(255,255,255,0.55); }

.feature-icon {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.feature-card h5 {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0;
}

/* ─── PRICING ─────────────────────────────────────────────────────────────── */
.pricing-section {
  background: #F7F8FA;
  padding: 60px 0;
}

.nav-dark .pricing-section {
  background: #fff;
}

.pricing-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.pricing-card {
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 2rem;
  text-align: left;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover, .pricing-card-featured {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--secondary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.pricing-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.2rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-features li {
  font-size: 0.88rem;
  color: #4a5568;
  padding: 0.3rem 0;
}

.pricing-features li i {
  color: var(--secondary);
  margin-right: 0.5rem;
}

/* ─── CHIP / BADGE ────────────────────────────────────────────────────────── */
.aicv-chip {
  background: rgba(80,162,167,0.1);
  color: var(--secondary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(80,162,167,0.2);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ─── QUESTIONNAIRE ───────────────────────────────────────────────────────── */
.progress-header {
  max-width: 700px;
  margin: 0 auto;
}

.progress-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6c757d;
}

.progress-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.progress-bar {
  background: var(--secondary);
  border-radius: 4px;
}

.step-heading {
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a1a2e;
}

/* Option Cards (radio-style) */
.option-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .option-cards { flex-direction: row; }
  .option-card { flex: 1; }
}

.option-card { cursor: pointer; display: block; }

.option-card input[type="radio"] { display: none; }

.option-card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}

.option-card input[type="radio"]:checked + .option-card-body {
  border-color: var(--secondary);
  background: rgba(80,162,167,0.06);
}

.option-icon {
  font-size: 1.4rem;
  color: var(--secondary);
  min-width: 28px;
  text-align: center;
}

.option-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.option-desc  { font-size: 0.8rem; color: #6c757d; }

.option-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  margin-top: 2px;
}

.best-value-tag {
  background: var(--secondary);
  color: #fff;
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ─── CHECKOUT ────────────────────────────────────────────────────────────── */
.checkout-icon { font-size: 3rem; color: var(--primary); }

.order-summary {
  background: #f8f9fa;
  border-radius: 4px;
  padding: 1.25rem;
  border-left: 3px solid var(--secondary);
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.order-item:last-child { border-bottom: none; }
.order-item-total { font-size: 1rem; font-weight: 700; }

.pesapal-badge {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

.what-you-get { font-size: 0.9rem; }

/* ─── CHAT ────────────────────────────────────────────────────────────────── */
.chat-page { padding: 40px 0; }

.chat-header {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.nav-dark .chat-header {
  background: var(--primary);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}

.nav-dark .chat-header .text-muted { color: rgba(255,255,255,0.55) !important; }

.coach-avatar {
  width: 44px;
  height: 44px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chat-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 24px rgba(28,46,94,0.08);
  overflow: hidden;
  position: relative;
}

.chat-container {
  height: 520px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scroll-behavior: smooth;
}

.message-wrapper { display: flex; flex-direction: column; max-width: 78%; }
.wambo-wrapper   { align-self: flex-start; }
.user-wrapper    { align-self: flex-end; }

.message-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  margin-bottom: 4px;
}

.wambo-wrapper .message-label { color: var(--secondary); }
.user-wrapper  .message-label { text-align: right; color: var(--primary); }

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  user-select: text;
  cursor: text;
}

.wambo-bubble {
  background: var(--primary-light);
  background: rgba(28,46,94,0.06);
  border: 1px solid rgba(28,46,94,0.1);
  border-left: 3px solid var(--secondary);
  color: #1a1a2e;
}

/* Override wambo bubble for dark-primary tenants */
.nav-dark .wambo-bubble {
  background: rgba(80,162,167,0.08);
  border-left: 3px solid var(--secondary);
  border-color: rgba(80,162,167,0.2);
}

.user-bubble {
  background: #fff;
  border: 1px solid #e9ecef;
  color: #1a1a2e;
}

/* Typing indicator */
.typing-wrapper { display: none; flex-direction: column; max-width: 78%; align-self: flex-start; }

.typing-bubble {
  background: rgba(80,162,167,0.08);
  border: 1px solid rgba(80,162,167,0.2);
  border-left: 3px solid var(--secondary);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  display: flex;
  gap: 5px;
  align-items: center;
}

.typing-dot {
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40%            { transform: translateY(-6px); opacity: 1; }
}

/* Input panel */
.input-panel {
  border-top: 1px solid #e9ecef;
  padding: 1rem 1.25rem;
  background: #fafafa;
}

.input-panel textarea {
  width: 100%;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.75rem;
  font-family: var(--font-family, inherit);
  font-size: 0.9rem;
  resize: none;
  transition: border-color 0.2s;
  background: #fff;
}

.input-panel textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(80,162,167,0.12);
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.4rem 0 0.75rem;
  font-size: 0.78rem;
  color: #6c757d;
}

.btn-send {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0.6rem 1.8rem;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-send:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-send:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* CV Ready CTA panel */
.cv-ready-panel {
  display: none;
  background: var(--primary);
  padding: 2rem 1.5rem;
  text-align: center;
}

.cv-ready-panel h4    { color: #fff; font-weight: 700; margin-bottom: 0.5rem; }
.cv-ready-panel p     { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 1.5rem; }

.btn-get-cv {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 0.9rem 2.5rem;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: filter 0.2s, transform 0.1s;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
}

.btn-get-cv:hover  { filter: brightness(1.12); transform: translateY(-2px); }
.btn-get-cv:active { transform: translateY(0); }

/* Loading overlay */
.chat-loading-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--primary);
  border-radius: 6px;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.chat-loading-overlay.visible { display: flex; }

.big-spinner {
  width: 64px; height: 64px;
  border: 5px solid rgba(255,255,255,0.15);
  border-top-color: var(--secondary);
  border-right-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

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

.loading-title    { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.loading-subtitle { font-size: 0.88rem; color: rgba(255,255,255,0.6); min-height: 1.4em; }

.loading-dots { margin-top: 1.25rem; }
.loading-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  margin: 0 3px;
  animation: typingBounce 1.2s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ─── PROCESSING ──────────────────────────────────────────────────────────── */
.processing-page { padding: 80px 0; text-align: center; }

.processing-spinner {
  width: 80px; height: 80px;
  border: 6px solid #e9ecef;
  border-top-color: var(--primary);
  border-right-color: var(--secondary);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 2rem;
}

.nav-dark .processing-spinner {
  border-color: rgba(255,255,255,0.1);
  border-top-color: var(--secondary);
  border-right-color: #fff;
}

/* ─── INSIGHTS ────────────────────────────────────────────────────────────── */
.success-icon { color: var(--secondary); }

.download-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 2rem 1.5rem;
  height: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.download-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: var(--secondary);
}

.download-icon { color: var(--secondary); }

.insights-section-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 6px;
  margin-bottom: 1rem;
}

.insights-content p {
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
.aicv-footer {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.nav-dark .aicv-footer {
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-dark .aicv-footer .text-muted  { color: rgba(255,255,255,0.45) !important; }
.nav-dark .aicv-footer strong       { color: var(--secondary); }

.aicv-footer-brand {
  font-weight: 700;
  color: var(--primary);
}

.nav-dark .aicv-footer-brand { color: #fff; }

/* ─── FORM CONTROLS ───────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(80,162,167,0.12);
}

.form-control.is-invalid { border-color: #dc3545; }

/* ─── BOOTSTRAP OVERRIDES ─────────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  border-radius: 3px;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* ─── ADMIN ───────────────────────────────────────────────────────────────── */
.admin-stat-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1.5rem;
  border-left: 4px solid var(--secondary);
}

.admin-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.admin-stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
}
