.assistant-entry,
.assistant-entry-compact {
  font: inherit;
  color: #17327c;
  border: 1px solid rgba(43, 94, 219, .22);
  background: rgba(255, 255, 255, .82);
  cursor: pointer;
}

.assistant-entry {
  width: min(100%, 490px);
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(16, 42, 108, .08);
}

.assistant-entry:hover,
.assistant-entry-compact:hover {
  border-color: rgba(43, 94, 219, .48);
  background: #fff;
}

.assistant-entry-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #2255ce;
}

.assistant-entry span:nth-child(2) { display: grid; gap: 2px; }
.assistant-entry strong { font-size: 14px; }
.assistant-entry small { color: #61708d; font-size: 12px; }
.assistant-entry > b { margin-left: auto; font-size: 18px; }

.assistant-entry-compact {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  font-weight: 650;
}

.assistant-root {
  position: fixed;
  inset: 0;
  z-index: 1200;
  visibility: hidden;
  pointer-events: none;
}

.assistant-root.is-open {
  visibility: visible;
  pointer-events: auto;
}

.assistant-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(8, 18, 42, .36);
  opacity: 0;
  transition: opacity .2s ease;
}

.assistant-root.is-open .assistant-backdrop { opacity: 1; }

.assistant-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(470px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  background: #f7f9fd;
  border-left: 1px solid #dfe5f0;
  box-shadow: -24px 0 70px rgba(9, 28, 70, .18);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
  outline: none;
}

.assistant-head { grid-row: 1; }
.assistant-context { grid-row: 2; }
.assistant-messages { grid-row: 3; }
.assistant-starters { grid-row: 4; align-items: center; }
.assistant-form { grid-row: 5; }
.assistant-disclaimer { grid-row: 6; }

.assistant-root.is-open .assistant-panel { transform: translateX(0); }

.assistant-head {
  min-height: 72px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border-bottom: 1px solid #e4e8f0;
}

.assistant-head > div:nth-child(2) { display: grid; gap: 1px; }
.assistant-head span { color: #71809a; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.assistant-head h2 { margin: 0; color: #102044; font-size: 19px; line-height: 1.15; }

.assistant-brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(145deg, #29b9ed, #1749e8 68%, #102fc4);
}

.assistant-brand-mark::before,
.assistant-brand-mark::after {
  content: '';
  position: absolute;
  left: 7px;
  bottom: 6px;
  width: 31px;
  height: 31px;
  border: 1.5px solid rgba(255,255,255,.62);
  border-radius: 50%;
}

.assistant-brand-mark::after { left: 14px; bottom: 13px; width: 17px; height: 17px; }
.assistant-brand-mark span { position: absolute; right: 7px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

.assistant-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  color: #263652;
  background: transparent;
  font: 400 29px/1 Onest, sans-serif;
  cursor: pointer;
}

.assistant-close:hover { background: #edf1f8; }

.assistant-context {
  margin: 12px 16px 0;
  padding: 9px 11px;
  color: #344461;
  background: #edf3ff;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.4;
}

.assistant-context strong { color: #153e9f; }

.assistant-messages {
  min-height: 0;
  padding: 18px 16px 8px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.assistant-welcome {
  max-width: 350px;
  padding: 16px;
  color: #263653;
  background: #fff;
  border: 1px solid #e3e8f1;
  border-radius: 15px 15px 15px 5px;
  box-shadow: 0 6px 20px rgba(23, 50, 105, .05);
}

.assistant-welcome strong { display: block; margin-bottom: 5px; color: #14264a; }
.assistant-welcome p { margin: 0; font-size: 14px; line-height: 1.55; }

.assistant-message { display: flex; margin: 0 0 15px; }
.assistant-message.is-user { justify-content: flex-end; }
.assistant-message-body { max-width: 88%; }
.assistant-message.is-user .assistant-message-body { padding: 10px 13px; color: #fff; background: #2156d1; border-radius: 15px 15px 5px 15px; }
.assistant-message.is-assistant .assistant-message-body { width: 100%; }
.assistant-message p { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-answer { max-width: 390px; padding: 13px 14px; color: #253755; background: #fff; border: 1px solid #e2e7f0; border-radius: 15px 15px 15px 5px; }
.assistant-answer.is-error { color: #8f2e35; background: #fff7f7; border-color: #f0d6d8; }

.assistant-typing { display: inline-flex; gap: 5px; padding: 14px 16px; background: #fff; border: 1px solid #e2e7f0; border-radius: 15px 15px 15px 5px; }
.assistant-typing i { width: 6px; height: 6px; border-radius: 50%; background: #7890bd; animation: assistantPulse 1s infinite alternate; }
.assistant-typing i:nth-child(2) { animation-delay: .15s; }
.assistant-typing i:nth-child(3) { animation-delay: .3s; }

@keyframes assistantPulse { to { opacity: .28; transform: translateY(-2px); } }

.assistant-results { display: grid; gap: 9px; margin-top: 9px; }
.assistant-result-card { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 11px; padding: 10px; color: inherit; background: #fff; border: 1px solid #e1e7f0; border-radius: 12px; text-decoration: none; }
.assistant-result-card:hover { border-color: #9eb5eb; box-shadow: 0 6px 18px rgba(25, 55, 120, .07); }
.assistant-result-photo { width: 62px; height: 62px; overflow: hidden; border-radius: 9px; background: #e9eef7; }
.assistant-result-photo img { width: 100%; height: 100%; object-fit: cover; }
.assistant-result-photo span { width: 100%; height: 100%; display: grid; place-items: center; color: #2156d1; font-weight: 800; }
.assistant-result-copy { min-width: 0; display: grid; align-content: center; gap: 3px; }
.assistant-result-copy small { color: #6d7c95; font-size: 11px; }
.assistant-result-copy strong { color: #15284b; font-size: 13px; line-height: 1.35; }
.assistant-result-copy p { color: #687792; font-size: 11px; line-height: 1.35; }
.assistant-result-meta { display: flex; flex-wrap: wrap; gap: 7px; color: #38558d; font-size: 11px; }

.assistant-comparison { margin-top: 9px; overflow-x: auto; border: 1px solid #dfe5ef; border-radius: 12px; background: #fff; }
.assistant-comparison table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 11px; }
.assistant-comparison th,
.assistant-comparison td { padding: 9px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #edf0f5; }
.assistant-comparison th { color: #52627f; background: #f8f9fc; }
.assistant-comparison td:first-child { color: #64738c; font-weight: 650; }
.assistant-comparison a { color: #174bbf; font-weight: 700; text-decoration: none; }

.assistant-review-snippets { display: grid; gap: 7px; margin-top: 8px; }
.assistant-review-snippet { padding: 10px 11px; background: #fff; border-left: 3px solid #efb139; border-radius: 5px 10px 10px 5px; }
.assistant-review-snippet header { display: flex; justify-content: space-between; gap: 8px; color: #52627e; font-size: 11px; }
.assistant-review-snippet p { margin-top: 5px; color: #3d4e69; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.assistant-sources { margin-top: 9px; padding: 9px 10px; display: grid; gap: 3px; color: #60708d; background: #f1f5fb; border-radius: 9px; font-size: 11px; }
.assistant-sources a { width: fit-content; color: #174bbf; font-weight: 700; text-decoration: none; }
.assistant-feedback { margin-top: 8px; display: flex; align-items: center; gap: 5px; color: #78869e; font-size: 11px; }
.assistant-feedback > button { width: 32px; height: 30px; border: 1px solid #d7dfec; border-radius: 8px; background: #fff; cursor: pointer; }
.assistant-feedback-reasons { display: flex; flex-wrap: wrap; gap: 5px; }
.assistant-feedback-reasons button { min-height: 30px; padding: 5px 8px; border: 1px solid #d7dfec; border-radius: 8px; color: #3f5273; background: #fff; font: 600 10px/1.2 Onest, sans-serif; cursor: pointer; }
.assistant-feedback button:hover { border-color: #9eb5eb; }
.assistant-feedback-done { color: #56705f; }

.assistant-followups,
.assistant-starters { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.assistant-followups { margin-top: 9px; padding-bottom: 2px; }
.assistant-starters { padding: 8px 16px 10px; }
.assistant-followups::-webkit-scrollbar,
.assistant-starters::-webkit-scrollbar { display: none; }
.assistant-followup,
.assistant-starter {
  flex: 0 0 auto;
  max-width: 260px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #ccd7eb;
  border-radius: 999px;
  color: #244991;
  background: #fff;
  font: 600 12px/1.3 Onest, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.assistant-form {
  margin: 0 14px;
  padding: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 7px;
  background: #fff;
  border: 1px solid #cbd5e5;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(19, 44, 96, .08);
}

.assistant-form:focus-within { border-color: #4371dc; box-shadow: 0 0 0 3px rgba(49, 99, 216, .12); }
.assistant-form textarea { width: 100%; min-height: 42px; max-height: 120px; padding: 10px 9px; resize: none; border: 0; outline: 0; color: #192945; background: transparent; font: 400 14px/1.45 Onest, sans-serif; }
.assistant-form button { min-width: 42px; height: 42px; padding: 0 13px; border: 0; border-radius: 10px; color: #fff; background: #2156d1; font: 700 12px Onest, sans-serif; cursor: pointer; }
.assistant-form button b { display: none; }
.assistant-form button:disabled { opacity: .55; cursor: wait; }
.assistant-disclaimer { margin: 7px 18px 13px; color: #7d899e; font-size: 10px; line-height: 1.35; text-align: center; }

@media (max-width: 760px) {
  .assistant-entry { margin-top: 15px; }
  .assistant-entry small { display: none; }
  .assistant-entry-compact { width: 100%; }
  .assistant-panel { width: 100%; border-left: 0; transform: translateY(100%); }
  .assistant-root.is-open .assistant-panel { transform: translateY(0); }
  .assistant-head { min-height: 62px; padding: max(9px, env(safe-area-inset-top)) 13px 9px; }
  .assistant-messages { padding: 14px 12px 7px; }
  .assistant-starters { padding-inline: 12px; }
  .assistant-form { margin-inline: 10px; }
  .assistant-form button { width: 42px; padding: 0; }
  .assistant-form button span { display: none; }
  .assistant-form button b { display: inline; font-size: 18px; }
  .assistant-disclaimer { margin-bottom: max(9px, env(safe-area-inset-bottom)); }
  .assistant-message-body { max-width: 94%; }
  .assistant-answer { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-backdrop,
  .assistant-panel { transition: none; }
  .assistant-typing i { animation: none; }
}
