/* Website Chat — "Jacob AI" (v1.0, 2026-11-08).
   Brand: navy #0d2137 / gold #FFB224 (Cars With Jacob).
   Desktop: Gubagoo-style docked panel, 380px, bottom-right.
   Mobile (<640px): full-width bottom sheet. */

.jc-root { position: fixed; right: 16px; bottom: 16px; z-index: 99990; font-family: inherit; }
.jc-root[hidden] { display: none; }

/* launcher */
.jc-launcher {
  display: flex; align-items: center; gap: 10px;
  background: #0d2137; color: #fff; border: 2px solid #FFB224;
  border-radius: 999px; padding: 6px 16px 6px 6px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(13, 33, 55, .35);
  font-size: 15px; font-weight: 600;
}
.jc-launcher-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.jc-launcher-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #FFB224;
  box-shadow: 0 0 0 3px rgba(255, 178, 36, .35);
}
.jc-launcher-open { opacity: .92; }

/* nudge preview */
.jc-nudge {
  position: absolute; right: 0; bottom: 64px; width: 290px; max-width: calc(100vw - 32px);
  background: #fff; color: #0d2137; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(13, 33, 55, .28); border: 1px solid rgba(13, 33, 55, .08);
  padding: 12px 14px;
}
.jc-nudge-x {
  position: absolute; top: 4px; right: 8px; background: none; border: 0;
  font-size: 18px; line-height: 1; color: #8a97a5; cursor: pointer; padding: 4px;
}
.jc-nudge-main { background: none; border: 0; text-align: left; cursor: pointer; padding: 0; width: 100%; }
.jc-nudge-text { font-size: 14px; line-height: 1.45; color: #0d2137; }

/* panel */
.jc-panel {
  position: absolute; right: 0; bottom: 64px;
  width: 380px; max-width: calc(100vw - 24px);
  height: min(600px, calc(100vh - 110px));
  background: #fff; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 48px rgba(13, 33, 55, .4);
  border: 1px solid rgba(13, 33, 55, .1);
}
.jc-panel[hidden] { display: none; }

.jc-head {
  background: #0d2137; color: #fff; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; flex: 0 0 auto;
}
.jc-head-photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid #FFB224; }
.jc-head-meta { flex: 1 1 auto; min-width: 0; }
.jc-head-name { margin: 0; font-size: 17px; font-weight: 700; color: #FFB224; }
.jc-head-sub { margin: 2px 0 0; font-size: 12px; line-height: 1.35; color: rgba(255,255,255,.85); }
.jc-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 6px; }

.jc-msgs {
  flex: 1 1 auto; overflow-y: auto; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px; background: #f4f6f8;
}
.jc-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.jc-msg-photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.jc-bubble {
  background: #fff; color: #13293f; border-radius: 14px; border-bottom-left-radius: 4px;
  padding: 9px 12px; font-size: 14.5px; line-height: 1.45;
  box-shadow: 0 1px 3px rgba(13, 33, 55, .08); max-width: 82%;
  white-space: pre-wrap; word-wrap: break-word;
}
.jc-msg-user { justify-content: flex-end; }
.jc-msg-user .jc-bubble { background: #0d2137; color: #fff; border-radius: 14px; border-bottom-right-radius: 4px; }
.jc-typing { color: #8a97a5; letter-spacing: 2px; }

/* car cards slider */
.jc-cards {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.jc-card {
  flex: 0 0 218px; scroll-snap-align: start; background: #fff; border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 2px 8px rgba(13, 33, 55, .12); border: 1px solid rgba(13, 33, 55, .06);
}
.jc-card-photo { width: 100%; height: 128px; object-fit: cover; display: block; }
.jc-card-body { padding: 9px 11px 11px; }
.jc-card-title { margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; color: #0d2137; }
.jc-card-price { margin: 4px 0 0; font-size: 16px; font-weight: 800; color: #b07d0a; }
.jc-card-meta { margin: 3px 0 0; font-size: 12px; color: #5c6b7a; }

/* chips */
.jc-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 12px 2px; background: #fff; }
.jc-chips:empty { padding: 0; }
.jc-chip {
  background: #fff; color: #0d2137; border: 1.5px solid #FFB224; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.jc-chip:hover { background: #fff7e0; }

/* input row */
.jc-inputrow { display: flex; gap: 8px; padding: 10px 12px 4px; background: #fff; }
.jc-input {
  flex: 1 1 auto; border: 1.5px solid #cfd8e0; border-radius: 999px;
  padding: 10px 15px; font-size: 15px; outline: none; min-width: 0;
}
.jc-input:focus { border-color: #FFB224; }
.jc-send {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: #FFB224; color: #0d2137; border: 0; font-size: 17px; cursor: pointer;
}
.jc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.jc-fine { margin: 0; padding: 4px 12px 10px; font-size: 11px; color: #8a97a5; background: #fff; text-align: center; }

/* mobile: full-width bottom sheet */
@media (max-width: 640px) {
  .jc-root { right: 10px; bottom: 10px; left: 10px; }
  .jc-launcher { margin-left: auto; }
  .jc-panel {
    position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%;
    height: min(78vh, 640px); border-radius: 18px 18px 0 0;
  }
  .jc-nudge { bottom: 62px; right: 0; }
}

/* Vehicle pages (2026-11-11): the VDP sticky bar now stacks above the
   chat pill, so the nudge bubble rises above the whole stack — it can
   never cover the sticky bar's action button again. Nudge `bottom` is
   relative to the chat root; 136px puts its lower edge ~146-152px from
   the viewport bottom across the <=1023px breakpoints, above the bar's
   top edge (~138-144px). */
@media (max-width: 1023px) {
  body.single-vehicle .jc-nudge { bottom: 136px; }
}
