/* ==========================================================================
   VIREKA — VIO chat (/konsultasi-karya, results)
   Figma: FRAME "Opening" 537:38544, "Hasil Analisis" 534:32821 (1440 × 1017)
   Uses the dashboard shell (dashboard.css) for sidebar + topbar.
   ========================================================================== */

.chat-shell {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: start;
}

.chat {
  background: var(--white);
  border-radius: 26px;
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat__scroll { flex: 1; padding: 36px 40px 20px; overflow-y: auto; }

.msg { display: flex; gap: 16px; margin-bottom: 26px; max-width: 640px; }
.msg__avatar {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6ee0, #5b93ff);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.msg__avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg__body { padding-top: 4px; }
.msg__body p { font-size: 16px; line-height: 22px; color: #000; margin: 0 0 18px; max-width: 448px; }
.msg__body p:last-child { margin-bottom: 0; }
.msg__body p strong { font-weight: 700; }

/* User reply bubble (right-aligned) */
.msg--user { margin-left: auto; flex-direction: row-reverse; max-width: 420px; }
.msg--user .msg__body p {
  background: var(--blue-600);
  color: var(--white);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 18px;
  font-weight: 500;
  font-size: 14px;
  line-height: 19px;
}

/* Option cards — "Bagaimana Anda Ingin Memulai?" */
.chat-options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; margin: 6px 0 26px; }
.chat-option {
  border: 1px solid #dbe4fb;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-option p { font-size: 16px; line-height: 22px; margin: 0; }
.chat-option p b { display: block; margin-bottom: 6px; }
.chat-option__chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e9f0ff;
  color: #1c274c;
  font-size: 12px;
  line-height: 16px;
  border-radius: var(--radius-pill);
  padding: 8px 14px;
}
.chat-option__chip svg { width: 14px; height: 14px; }
.chat-option:hover { border-color: var(--blue-500); box-shadow: 0 8px 24px rgba(86,119,237,.12); }

/* Suggestion chips row */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 10px; }
.chip {
  border: 1px solid #ccd9f6;
  background: #f2f6ff;
  color: var(--blue-600);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 16px;
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  transition: background-color .15s ease;
}
.chip:hover { background: #e3ecff; }

/* Recommendation chip in results */
.reco-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-600);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  margin: 2px 0 18px;
}
.checklist { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.checklist li { font-size: 16px; line-height: 22px; display: flex; gap: 10px; }
.checklist li::before { content: '✅'; flex: none; }
.checklist--why li::before { content: '✓'; color: var(--green, #529658); font-weight: 700; }

/* Input bar */
.chat-input {
  border-top: 1px solid #eceef5;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-input input {
  flex: 1;
  border: 0;
  background: none;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 19px;
  color: #475569;
}
.chat-input input:focus { outline: none; }
.chat-input__attach {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #dfe3ee;
  background: var(--white);
  display: grid;
  place-items: center;
  color: #475569;
  flex: none;
}
.chat-input__attach svg { width: 18px; height: 18px; }
.chat-input__send {
  background: var(--blue-600);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-family: 'Plus Jakarta Sans', var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 24px;
  flex: none;
}
.chat-input__send:hover { background: #1250b8; }

/* Right rail — Panduan KI quick panel */
.chat-rail { display: grid; gap: 10px; position: sticky; top: 24px; }
.chat-rail__card {
  background: var(--white);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  color: #000;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-rail__card:hover { box-shadow: 0 8px 20px rgba(16,24,64,.08); }
.chat-rail__card svg { width: 18px; height: 18px; color: var(--blue-600); flex: none; }

@media (max-width: 1100px) {
  .chat-shell { grid-template-columns: 1fr; }
  .chat-rail { grid-auto-flow: column; grid-auto-columns: max-content; position: static; overflow-x: auto; }
  .chat-options { grid-template-columns: 1fr; }
}
