/* ============================================
   INTERVIEW BOT — chat UI styles
   Loads AFTER style.css (uses --accent etc. from there)
   ============================================ */

.interview-body {
  background: radial-gradient(ellipse at top, #1a1a1a 0%, #0d0d0d 60%);
  background-attachment: fixed;
  min-height: 100vh;
  color: #f4eddf;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  margin: 0;
}

.iv-app {
  max-width: 720px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh; /* dynamic viewport for mobile address bar */
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

/* ===== HEADER ===== */
.iv-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216,194,138,0.10);
}
.iv-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f4eddf;
}
.iv-brand-logo {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(216,194,138,0.3);
}
.iv-brand-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.iv-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  max-width: 280px;
}
.iv-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(216,194,138,0.10);
  border-radius: 3px;
  overflow: hidden;
}
.iv-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d8c28a, #b8a26a);
  border-radius: 3px;
  transition: width 300ms ease;
}
.iv-progress-text {
  font-size: 12px;
  color: #8a8268;
  letter-spacing: 0.5px;
  white-space: nowrap;
  font-weight: 500;
}

/* ===== CHAT AREA ===== */
.iv-chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.iv-chat::-webkit-scrollbar { width: 6px; }
.iv-chat::-webkit-scrollbar-thumb { background: rgba(216,194,138,0.25); border-radius: 3px; }
.iv-msg {
  display: flex;
  gap: 10px;
  animation: iv-bubble-in 250ms ease-out;
}
@keyframes iv-bubble-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.iv-msg-bot { align-items: flex-end; }
.iv-msg-user { justify-content: flex-end; }

.iv-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(216,194,138,0.1);
  border: 1px solid rgba(216,194,138,0.2);
  flex-shrink: 0;
}
.iv-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 78%;
  font-size: 15px;
  line-height: 1.55;
  word-wrap: break-word;
}
.iv-msg-bot .iv-bubble {
  background: #1a1a1a;
  border: 1px solid rgba(216,194,138,0.15);
  color: #f4eddf;
  border-bottom-left-radius: 4px;
}
.iv-msg-user .iv-bubble {
  background: linear-gradient(135deg, #d8c28a, #c2ad75);
  color: #1a1400;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}
.iv-bubble-text strong { font-weight: 700; }
.iv-bubble-text em { color: #8a8268; font-style: italic; }

/* ===== TYPING INDICATOR ===== */
.iv-typing .iv-bubble {
  padding: 14px 18px;
  display: flex;
  gap: 6px;
}
.iv-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d8c28a;
  opacity: 0.4;
  animation: iv-dot-bounce 1.4s infinite;
}
.iv-dot:nth-child(2) { animation-delay: 0.2s; }
.iv-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes iv-dot-bounce {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ===== COMPOSER (bottom input area) ===== */
.iv-composer {
  flex-shrink: 0;
  padding: 14px 16px 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(216,194,138,0.10);
  max-height: 50vh;
  overflow-y: auto;
}
.iv-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.iv-input-row input,
.iv-input-row textarea {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid rgba(216,194,138,0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: #f4eddf;
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 200ms;
  min-height: 44px;
  resize: none;
}
.iv-input-row input:focus,
.iv-input-row textarea:focus {
  border-color: #d8c28a;
}
.iv-input-row textarea {
  min-height: 64px;
}
.iv-btn {
  background: linear-gradient(135deg, #d8c28a, #b8a26a);
  color: #1a1400;
  border: none;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  min-width: 70px;
  transition: filter 150ms;
  white-space: nowrap;
}
.iv-btn:hover { filter: brightness(1.08); }

/* Big prominent start button with pulse */
.iv-btn-start {
  width: 100%;
  padding: 20px 32px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px;
  min-height: 64px !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 24px rgba(216, 194, 138, 0.30);
  animation: iv-start-pulse 1.6s ease-in-out infinite;
}
.iv-btn-start:hover {
  animation-play-state: paused;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(216, 194, 138, 0.45);
}
@keyframes iv-start-pulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(216, 194, 138, 0.30), 0 0 0 0 rgba(216, 194, 138, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 12px 32px rgba(216, 194, 138, 0.50), 0 0 0 14px rgba(216, 194, 138, 0);
    transform: scale(1.02);
  }
}
@media (prefers-reduced-motion: reduce) { .iv-btn-start { animation: none; } }

.iv-btn-outline {
  background: transparent;
  color: #d8c28a;
  border: 1px solid rgba(216,194,138,0.4);
  font-weight: 600;
}
.iv-btn-outline:hover {
  background: rgba(216,194,138,0.08);
  border-color: #d8c28a;
}

/* ===== CHOICE BUTTONS ===== */
.iv-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iv-choice {
  background: transparent;
  border: 1px solid rgba(216,194,138,0.30);
  color: #f4eddf;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 180ms;
  min-height: 44px;
}
.iv-choice:hover {
  background: rgba(216,194,138,0.08);
  border-color: #d8c28a;
  transform: translateX(2px);
}
.iv-choice:active { transform: scale(0.98); }

/* ===== INSIGHT CARD (post-submit) ===== */
.iv-insight-card {
  background: linear-gradient(135deg, rgba(216,194,138,0.08), rgba(216,194,138,0.02));
  border: 1px solid rgba(216,194,138,0.30);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 4px 0;
}
.iv-insight-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: #d8c28a;
  font-weight: 600;
  margin-bottom: 12px;
}
.iv-insight-text {
  font-size: 15px;
  line-height: 1.7;
  color: #f4eddf;
  margin-bottom: 14px;
}
.iv-insight-reco {
  font-size: 14px;
  color: #d8c28a;
  font-weight: 500;
  padding-top: 12px;
  border-top: 1px solid rgba(216,194,138,0.15);
}

/* ===== CTA BUTTONS (3 channels) ===== */
.iv-cta-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.iv-cta-label {
  font-size: 14px;
  color: #b0a890;
  text-align: center;
  margin-bottom: 4px;
}
.iv-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iv-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(216,194,138,0.40);
  color: #d8c28a;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 200ms;
}
.iv-cta-btn:hover {
  background: rgba(216,194,138,0.10);
  border-color: #d8c28a;
  color: #f4eddf;
}
.iv-cta-meta {
  text-align: center;
  font-size: 12px;
  color: #8a8268;
  margin-top: 8px;
}

/* ===== RESTART BUTTON ===== */
.iv-restart {
  text-align: center;
  margin-top: 16px;
}
.iv-restart-link {
  background: none;
  border: none;
  color: #8a8268;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
}
.iv-restart-link:hover { color: #d8c28a; }

/* ===== ERROR STATE ===== */
.iv-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.35);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 10px;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
  .iv-header { padding: 12px 14px; }
  .iv-brand-text { font-size: 16px; }
  .iv-progress-wrap { max-width: 180px; }
  .iv-chat { padding: 16px 12px; }
  .iv-bubble { max-width: 84%; font-size: 14.5px; }
  .iv-composer { padding: 12px 12px 16px; }
  .iv-cta-btn { font-size: 14px; }
}
