/* Elia chat — Solid North branded layout */

:root {
  --jam-navy: #00001c;
  --jam-navy-rgb: 0, 0, 28;
  --jam-yellow: #ffdb03;
  --jam-yellow-rgb: 255, 219, 3;
  --jam-yellow-hot: #ffe44d;
  --jam-orange: #c60e0e;
  --jam-orange-rgb: 198, 14, 14;
  --jam-orange-dark: #a80c0d;
  --jam-red: #c60e0e;
  --jam-red-dark: #9d0b0b;
  --jam-line: rgba(0, 0, 28, 0.12);
  --jam-drawer-w: 28rem;
  --jam-canvas: #faf6e8;
  --jam-composer-well: #ffffff;
  --jam-seat-booked: #a6a6a6;
  --jam-seat-avail: #3c3c3c;
  --jam-seat-selected: #c60e0e;
}

/* When chat is open: pull Elementor/theme sticky headers under the drawer.
   Their z-index (e.g. 9999999999) otherwise clamps equal to ours and wins by paint order. */
body.jam-chat-open .elementor-location-header,
body.jam-chat-open .elementor-location-header .elementor-element,
body.jam-chat-open [data-elementor-type="header"],
body.jam-chat-open [data-elementor-type="header"] .elementor-element,
body.jam-chat-open .elementor-sticky--active,
body.jam-chat-open .elementor-sticky,
body.jam-chat-open header.elementor,
body.jam-chat-open .site-header,
body.jam-chat-open #masthead,
body.jam-chat-open .e-con.e-parent[data-settings*="sticky"] {
  z-index: 1 !important;
}

body.jam-chat-open .jam-chat-backdrop {
  z-index: 2147483646 !important;
}

body.jam-chat-open .jam-chat-fab,
body.jam-chat-open .jam-chat-drawer {
  z-index: 2147483647 !important;
}

body.jam-chat-open .jam-chat-modal {
  z-index: 2147483647 !important;
}

/* Floating FAB — above Elementor sticky header (z-index ~9999999999) */
.jam-chat-fab {
  position: fixed;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2147483001;
  font-family: "Poppins", sans-serif;
  overflow: visible;
  pointer-events: none;
}

.jam-chat-fab > * {
  pointer-events: auto;
}

body.jam-chat-open .jam-chat-fab {
  display: none;
}

body.jam-chat-open {
  overflow: hidden;
  touch-action: none;
}

.jam-chat-fab__btn {
  width: 5.75rem;
  height: 5.75rem;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  line-height: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.jam-chat-fab--coming-soon .jam-chat-fab__btn {
  width: 6.25rem;
  height: 6.25rem;
}

.jam-chat-fab__btn:focus,
.jam-chat-fab__btn:focus-visible,
.jam-chat-fab__btn:active {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.jam-chat-fab__btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

.jam-chat-fab__btn:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

/* Nudge — white speech bubble (Coming Soon / BookNa) */
.jam-chat-nudge {
  --jam-nudge-bg: #ffffff;
  position: absolute;
  right: 0.35rem;
  bottom: calc(100% + 0.35rem);
  width: max-content;
  max-width: min(15.5rem, calc(100vw - 1.5rem));
  padding: 0.7rem 1.15rem 0.75rem;
  background: var(--jam-nudge-bg);
  color: #141414;
  border: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  border-radius: 1.35rem;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-align: left;
  z-index: 2;
  animation: jam-chat-nudge-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: bottom right;
}

.jam-chat-nudge[hidden] {
  display: none !important;
}

.jam-chat-nudge::after {
  content: "";
  position: absolute;
  right: 1.55rem;
  bottom: -11px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 11px 0 11px;
  border-color: var(--jam-nudge-bg) transparent transparent transparent;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.06));
  pointer-events: none;
}

.jam-chat-nudge__title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #111;
}

.jam-chat-nudge__body {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a1a;
  max-width: none;
}

.jam-chat-nudge__cta {
  display: inline-block;
  margin-top: 0.45rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--jam-orange) !important;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
  box-shadow: none !important;
}

.jam-chat-fab--coming-soon .jam-chat-nudge__body {
  margin-bottom: 0;
}

@keyframes jam-chat-nudge-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Backdrop — click outside chat to close (lighter on desktop) */
.jam-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.jam-chat-backdrop[hidden] {
  display: none !important;
}

.jam-chat-backdrop.is-open {
  opacity: 1;
}

@media (max-width: 32rem) {
  .jam-chat-backdrop {
    background: rgba(0, 0, 0, 0.8);
  }
}

/* Drawer sheet */
.jam-chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147483002;
  display: flex;
  flex-direction: column;
  width: var(--jam-drawer-w);
  max-width: 100vw;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--jam-canvas);
  box-shadow: none;
  font-family: "Poppins", sans-serif;
  transform: translateX(100%);
  transition: transform 0.5s ease;
  overflow: hidden;
  gap: 0;
}

.jam-chat-drawer[hidden] {
  display: none !important;
}

.jam-chat-drawer.is-open {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .jam-chat-drawer {
    transition: none;
  }
}

@media (max-width: 32rem) {
  .jam-chat-drawer {
    width: 100%;
    max-width: 100%;
    height: var(--jam-vvh, 100dvh);
    max-height: var(--jam-vvh, 100dvh);
    top: var(--jam-vvt, 0px);
    bottom: auto;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: 0;
  }
}

/* Header — brand red with yellow accent bar (Solid North section language) */
.jam-chat-drawer__head {
  position: relative;
  flex-shrink: 0;
  padding: 1.25rem 3rem 1rem 1rem;
  background: linear-gradient(135deg, var(--jam-orange), var(--jam-orange-dark));
  color: #fff;
  overflow: hidden;
  border: 0;
  box-shadow: inset 0 -4px 0 0 var(--jam-yellow);
}

.jam-chat-drawer__hatch {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    -32deg,
    transparent,
    transparent 14px,
    rgba(255, 255, 255, 0.35) 14px,
    rgba(255, 255, 255, 0.35) 15px
  );
}

.jam-chat-drawer__head-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jam-chat-drawer__avatar-wrap {
  position: relative;
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.jam-chat-drawer__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.jam-chat-drawer__id {
  min-width: 0;
  flex: 1;
}

.jam-chat-drawer__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

@media (min-width: 640px) {
  .jam-chat-drawer__title {
    font-size: 1.125rem;
  }
}

.jam-chat-drawer__subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 640px) {
  .jam-chat-drawer__subtitle {
    font-size: 0.875rem;
  }
}

.jam-chat-drawer__new {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.25rem;
  padding: 0 0.75rem !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-radius: 0.75rem !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-drawer__new:hover {
  background: var(--jam-yellow) !important;
  color: var(--jam-navy) !important;
  border-color: var(--jam-yellow) !important;
}

.jam-chat-drawer__new:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.jam-chat-drawer__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #fff !important;
  opacity: 0.9;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem;
}

.jam-chat-drawer__close:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  opacity: 1;
}

/* Disclaimer — soft yellow tint (not full brand yellow) */
.jam-chat-drawer__disclaimer {
  flex-shrink: 0;
  margin: 0;
  padding: 0.5rem 1rem;
  background: #fff3c4;
  border-bottom: 1px solid rgba(0, 0, 28, 0.08);
  color: rgba(0, 0, 28, 0.75);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

@media (min-width: 640px) {
  .jam-chat-drawer__disclaimer {
    font-size: 0.75rem;
  }
}

/* Chat body */
.jam-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: var(--jam-canvas);
}

.jam-chat__log {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--jam-navy-rgb), 0.3) transparent;
}

.jam-chat__log::-webkit-scrollbar {
  width: 6px;
}

.jam-chat__log::-webkit-scrollbar-thumb {
  background: rgba(var(--jam-navy-rgb), 0.3);
  border-radius: 999px;
}

.jam-chat__scroll-anchor {
  height: 1px;
  flex: none;
}

/* Today pill */
.jam-chat__day {
  align-self: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  font-size: 0.6875rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Rows */
.jam-chat__row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: 100%;
}

.jam-chat__row--user {
  align-items: flex-end;
}

.jam-chat__row--bot,
.jam-chat__row--error {
  align-items: flex-start;
}

.jam-chat__msg {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: 85%;
}

.jam-chat__row--bot .jam-chat__msg:has(.jam-chat__trips),
.jam-chat__row--bot .jam-chat__msg:has(.jam-chat__options) {
  max-width: 100%;
  width: 100%;
}

.jam-chat__row--bot .jam-chat__bubble-col:has(.jam-chat__trips),
.jam-chat__row--bot .jam-chat__bubble-col:has(.jam-chat__options) {
  width: 100%;
  flex: 1 1 auto;
}

.jam-chat__row--user .jam-chat__msg {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.jam-chat__pic {
  width: 2rem;
  height: 2rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  outline: 1px solid rgba(0, 0, 0, 0.05);
  flex: none;
}

.jam-chat__bubble-col {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  min-width: 0;
}

.jam-chat__row--user .jam-chat__bubble-col {
  align-items: flex-end;
}

.jam-chat__row--bot .jam-chat__bubble-col,
.jam-chat__row--error .jam-chat__bubble-col {
  align-items: flex-start;
}

.jam-chat__bubble {
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  background: #fff;
  border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  color: #111827;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.625;
  white-space: pre-wrap;
  word-break: break-word;
}

.jam-chat__bubble--bot {
  border-bottom-left-radius: 0.375rem;
}

.jam-chat__bubble--user {
  background: var(--jam-red);
  color: #fff;
  border-bottom-right-radius: 0.375rem;
}

.jam-chat__bubble--error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border-bottom-left-radius: 0.375rem;
}

.jam-chat__bubble a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.jam-chat__bubble--user a {
  color: #fff;
}

.jam-chat__bubble .jam-chat__inline-cta {
  display: inline !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--jam-orange) !important;
  font: inherit !important;
  font-weight: 700 !important;
  line-height: inherit !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  box-shadow: none !important;
  cursor: pointer;
}

.jam-chat__bubble .jam-chat__inline-cta:hover,
.jam-chat__bubble .jam-chat__inline-cta:focus,
.jam-chat__bubble .jam-chat__inline-cta:active {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--jam-orange-dark) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: underline !important;
}

.jam-chat__time {
  font-size: 0.625rem;
  font-weight: 500;
  color: #9ca3af;
  padding: 0 0.15rem;
}

.jam-chat__row--bot .jam-chat__time,
.jam-chat__row--error .jam-chat__time {
  margin-left: 2.5rem;
}

/* Bus loading — bus oversized, sits in front of the bubble */
.jam-chat__bubble--loading {
  position: relative;
  overflow: visible;
  width: max-content;
  max-width: 100%;
  margin: 0.85rem 0;
  padding: 0.85rem 1rem;
  z-index: 1;
}

.jam-chat__row--bot:has(.jam-chat__bubble--loading) {
  overflow: visible;
  z-index: 2;
}

.jam-chat__row--bot:has(.jam-chat__bubble--loading) .jam-chat__msg,
.jam-chat__row--bot:has(.jam-chat__bubble--loading) .jam-chat__bubble-col {
  overflow: visible;
  width: auto;
  max-width: 100%;
  flex: 0 1 auto;
}

.jam-chat__bus-wrap {
  position: relative;
  display: inline-block;
  width: max-content;
  max-width: 100%;
  padding-right: 4.5rem;
  min-height: 1.35rem;
  overflow: visible;
}

.jam-chat__bus-text {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--jam-navy);
  animation: jam-chat-bus-reveal 2.6s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
  will-change: clip-path;
}

.jam-chat__bus-icon {
  position: absolute;
  top: 50%;
  left: -2.5rem;
  z-index: 30;
  width: 5.5rem;
  height: 3.25rem;
  transform: translateY(-50%);
  animation: jam-chat-bus-drive 2.6s cubic-bezier(0.45, 0.05, 0.25, 1) infinite;
  will-change: left;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.jam-chat__bus-icon svg,
.jam-chat__bus-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes jam-chat-bus-drive {
  0% {
    left: -2.75rem;
  }
  70%,
  100% {
    left: calc(100% - 3.25rem);
  }
}

@keyframes jam-chat-bus-reveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  70%,
  100% {
    clip-path: inset(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jam-chat__bus-text,
  .jam-chat__bus-icon {
    animation: none;
  }
  .jam-chat__bus-text {
    clip-path: none;
  }
  .jam-chat__bus-icon {
    left: calc(100% - 3.25rem);
  }
}

/* Options under last bot message */
.jam-chat__options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
  max-width: 100%;
}

.jam-chat__options[hidden] {
  display: none !important;
}

.jam-chat__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.jam-chat__actions--cols {
  grid-template-columns: 1fr 1fr;
}

.jam-chat__chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 0.5rem !important;
  border: 0 !important;
  border-radius: 0.65rem !important;
  background: #fff !important;
  color: var(--jam-navy) !important;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  text-align: center !important;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.jam-chat__chip:hover:not(:disabled) {
  background: var(--jam-yellow) !important;
  color: var(--jam-navy) !important;
}

.jam-chat__chip:disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Trip list */
.jam-chat__trips {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 0.875rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.jam-chat__trips-label {
  margin: 0;
  padding: 0.65rem 0.85rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-align: left;
}

.jam-chat__trips-scroll {
  display: block;
  width: 100%;
  max-height: 15.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.jam-chat__trip {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0.35rem;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0.75rem 0.85rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-top: 1px solid #f3f4f6 !important;
  background: #fff !important;
  color: inherit !important;
  font: inherit;
  text-align: left !important;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat__trip:hover:not(:disabled) {
  background: rgba(var(--jam-yellow-rgb, 255, 219, 3), 0.35) !important;
}

.jam-chat__trip:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.jam-chat__trip-title {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  text-align: left !important;
  overflow-wrap: anywhere;
}

.jam-chat__trip-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.5rem;
  width: 100% !important;
  box-sizing: border-box;
}

.jam-chat__trip-meta {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 !important;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.3;
  color: #6b7280;
  text-align: left !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jam-chat__trip-price {
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0.25rem 0.55rem !important;
  border-radius: 0.5rem !important;
  background: var(--jam-yellow) !important;
  color: var(--jam-navy) !important;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.jam-chat__trips-more {
  display: block;
  width: 100%;
  padding: 0.65rem !important;
  border: 0 !important;
  border-top: 1px solid #f3f4f6 !important;
  background: #fafafa !important;
  color: var(--jam-orange) !important;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none !important;
}

/* Composer — hardened against Elementor kit input/button globals */
.jam-chat__composer {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  padding: 0.75rem 1rem;
}

.jam-chat__form {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.5rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0.4rem 0.4rem 0.4rem 0.85rem !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 1rem !important;
  background: var(--jam-composer-well) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden;
}

.jam-chat__form input[type="text"],
.jam-chat__form #jam-chat-input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: 2.25rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #111827 !important;
  font: inherit !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.jam-chat__form input[type="text"]:focus,
.jam-chat__form #jam-chat-input:focus {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.jam-chat__form input[type="text"]::placeholder,
.jam-chat__form #jam-chat-input::placeholder {
  color: rgba(107, 114, 128, 0.7) !important;
  opacity: 1 !important;
}

.jam-chat__send,
.jam-chat__form button[type="submit"],
.jam-chat__form .jam-chat__send {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 2.25rem !important;
  margin: 0 !important;
  padding: 0 0.85rem !important;
  border: 0 !important;
  border-radius: 0.75rem !important;
  font: inherit !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #fff !important;
  background: var(--jam-orange) !important;
  background-color: var(--jam-orange) !important;
  cursor: pointer;
  white-space: nowrap !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.jam-chat__send:hover:not(:disabled),
.jam-chat__form button[type="submit"]:hover:not(:disabled),
.jam-chat__send:focus:not(:disabled),
.jam-chat__form button[type="submit"]:focus:not(:disabled) {
  background: var(--jam-yellow) !important;
  background-color: var(--jam-yellow) !important;
  color: var(--jam-navy) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.jam-chat__send:disabled,
.jam-chat__form--busy .jam-chat__send,
.jam-chat__form button[type="submit"]:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.jam-chat__footnote {
  margin: 0.5rem 0 0;
  color: var(--jam-navy);
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.75;
}

.jam-chat__footnote span {
  color: var(--jam-orange);
  opacity: 1;
}

/* Rating overlay */
.jam-chat-rating {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  background: rgba(17, 24, 39, 0.4);
}

.jam-chat-rating[hidden] {
  display: none !important;
}

.jam-chat-rating__panel {
  width: 100%;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--jam-red);
  color: #fff;
  border-radius: 1rem 1rem 0 0;
}

.jam-chat-rating__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.jam-chat-rating__scores {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.jam-chat-rating__score {
  padding: 0.65rem 0.25rem !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 0.65rem !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none !important;
  line-height: 1.2;
}

.jam-chat-rating__score span {
  display: block;
  font-size: 0.5625rem;
  font-weight: 500;
  opacity: 0.9;
}

.jam-chat-rating__score:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.jam-chat-rating__skip {
  display: block;
  margin: 0 auto;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font: inherit;
  font-size: 0.8125rem;
  text-decoration: underline;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-rating__thanks {
  margin: 0.75rem 0 0;
  text-align: center;
  font-weight: 600;
}

.jam-chat-rating__thanks[hidden] {
  display: none !important;
}

/* Modals */
.jam-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: "Poppins", sans-serif;
}

.jam-chat-modal[hidden] {
  display: none !important;
}

.jam-chat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.jam-chat-modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 26rem;
  max-height: min(90vh, 40rem);
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.jam-chat-modal__dialog--seats {
  max-width: 22rem;
}

.jam-chat-modal__dialog--pax {
  max-width: 34rem;
}

.jam-chat-modal__dialog--confirm {
  max-width: 28rem;
  width: 100%;
}

.jam-chat-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.jam-chat-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--jam-navy);
}

.jam-chat-modal__x {
  width: 2rem;
  height: 2rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #6b7280 !important;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.jam-chat-modal__foot {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid #f3f4f6;
}

.jam-chat-modal__foot--col {
  flex-direction: column;
}

.jam-chat-modal__foot--split {
  justify-content: space-between;
}

.jam-chat-modal__cta {
  flex: 1;
  height: 2.75rem;
  padding: 0 1rem !important;
  border: 0 !important;
  border-radius: 0.75rem !important;
  background: var(--jam-orange) !important;
  color: #fff !important;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-modal__cta:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.jam-chat-modal__cta:hover:not(:disabled) {
  background: var(--jam-yellow) !important;
  color: var(--jam-navy) !important;
}

.jam-chat-modal__ghost {
  height: 2.75rem;
  padding: 0 1rem !important;
  border: 1px solid var(--jam-line) !important;
  border-radius: 0.75rem !important;
  background: #fff !important;
  color: var(--jam-navy) !important;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none !important;
}

/* Passenger form */
.jam-chat-pax__stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  background: #f3f4f6;
  border-radius: 0.75rem;
}

.jam-chat-pax__stepper span {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.jam-chat-pax__stepper button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2.15rem !important;
  height: 2.15rem !important;
  min-width: 2.15rem;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0.55rem !important;
  background: var(--jam-orange) !important;
  color: #fff !important;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-pax__stepper button:hover:not(:disabled) {
  background: var(--jam-yellow) !important;
  color: var(--jam-navy) !important;
}

.jam-chat-pax__stepper button:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.jam-chat-pax__card {
  margin-bottom: 0.85rem;
  padding: 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
}

.jam-chat-pax__card:last-child {
  margin-bottom: 0;
}

.jam-chat-pax__card h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}

.jam-chat-pax__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.jam-chat-pax__remove {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem !important;
  height: 2rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0.5rem !important;
  background: transparent !important;
  color: #9ca3af !important;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-pax__remove:hover,
.jam-chat-pax__remove:focus {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

.jam-chat-pax__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.85rem;
}

.jam-chat-pax__field {
  margin: 0;
  min-width: 0;
}

.jam-chat-pax__field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
}

.jam-chat-pax__field input,
.jam-chat-pax__field select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 2.5rem;
  padding: 0 0.75rem !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.65rem !important;
  background: #fff !important;
  color: #111827 !important;
  font: inherit;
  font-size: 0.875rem;
  box-shadow: none !important;
}

.jam-chat-pax__field input:focus,
.jam-chat-pax__field select:focus {
  outline: none;
  border-color: var(--jam-orange) !important;
  box-shadow: 0 0 0 3px rgba(var(--jam-orange-rgb), 0.15) !important;
}

.jam-chat-pax__field input.is-invalid,
.jam-chat-pax__field select.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.jam-chat-pax__field input.is-invalid:focus,
.jam-chat-pax__field select.is-invalid:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
}

.jam-chat-pax__alert {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.8125rem;
  font-weight: 600;
}

.jam-chat-pax__alert[hidden] {
  display: none !important;
}

@media (max-width: 36rem) {
  .jam-chat-modal__dialog--pax {
    max-width: 100%;
  }

  .jam-chat-pax__grid {
    grid-template-columns: 1fr;
  }
}

/* Seat map */
.jam-chat-seat__legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  color: #6b7280;
}

.jam-chat-seat__legend > span {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 0;
  text-align: center;
}

.jam-chat-seat__legend i {
  display: inline-block;
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  margin-right: 0;
  vertical-align: middle;
}

.jam-chat-seat__legend .is-avail {
  background: var(--jam-seat-avail);
}

.jam-chat-seat__legend .is-booked {
  background: var(--jam-seat-booked);
}

.jam-chat-seat__legend .is-selected {
  background: var(--jam-seat-selected);
}

.jam-chat-seat__deck {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
}

.jam-chat-seat__label {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #9ca3af;
}

.jam-chat-seat__row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.jam-chat-seat__aisle {
  width: 1rem;
}

.jam-chat-seat__btn {
  position: relative;
  width: 2.15rem;
  height: 2.5rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;
  box-shadow: none !important;
}

.jam-chat-seat__btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.jam-chat-seat__btn:disabled {
  cursor: not-allowed;
}

.jam-chat-seat__btn svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.jam-chat-seat__btn.is-selected svg rect:first-of-type {
  stroke: #fff;
  stroke-width: 3;
}

.jam-chat-seat__status {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  text-align: center;
}

/* Confirm modal */
.jam-chat-confirm__head {
  align-items: flex-start;
  border-bottom: 0;
  padding-bottom: 0.35rem;
}

.jam-chat-confirm__head-main {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.jam-chat-confirm__bus-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: var(--jam-orange);
  color: #fff;
}

.jam-chat-confirm__sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  line-height: 1.35;
}

.jam-chat-confirm__body {
  padding-top: 0.5rem;
}

.jam-chat-confirm__ticket {
  position: relative;
  margin-bottom: 0.85rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 1rem;
  background: #fff;
  color: var(--jam-navy);
  border: 2px solid var(--jam-orange);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(var(--jam-orange-rgb), 0.1);
}

.jam-chat-confirm__ticket::before,
.jam-chat-confirm__ticket::after {
  content: none;
}

.jam-chat-confirm__ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.jam-chat-confirm__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(var(--jam-orange-rgb), 0.12);
  border: 1px solid rgba(var(--jam-orange-rgb), 0.4);
  color: var(--jam-orange-dark);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.jam-chat-confirm__brand i {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--jam-orange);
  box-shadow: 0 0 0 3px rgba(var(--jam-orange-rgb), 0.2);
}

.jam-chat-confirm__date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
  white-space: nowrap;
}

.jam-chat-confirm__route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.85rem;
}

.jam-chat-confirm__stop-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.jam-chat-confirm__stop-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--jam-navy);
  word-break: break-word;
}

.jam-chat-confirm__stop--end {
  text-align: right;
}

.jam-chat-confirm__route-mid {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.15rem;
  min-width: 6.5rem;
  padding-top: 1.1rem;
}

.jam-chat-confirm__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  grid-row: 1;
}

.jam-chat-confirm__dot--start {
  background: var(--jam-orange);
  box-shadow: 0 0 0 3px rgba(var(--jam-orange-rgb), 0.28);
}

.jam-chat-confirm__dot--end {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
}

.jam-chat-confirm__route-line {
  height: 2px;
  background: linear-gradient(90deg, rgba(var(--jam-navy-rgb), 0.12), rgba(var(--jam-navy-rgb), 0.35), rgba(var(--jam-navy-rgb), 0.12));
  grid-row: 1;
}

.jam-chat-confirm__route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: rgba(var(--jam-navy-rgb), 0.06);
  border: 0;
  color: var(--jam-navy);
  grid-row: 1;
}

.jam-chat-confirm__service {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 0.35rem;
  text-align: center;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.jam-chat-confirm__perforation {
  height: 0;
  margin: 0.15rem -1rem 0.85rem;
  border-top: 1px dashed rgba(var(--jam-orange-rgb), 0.35);
}

.jam-chat-confirm__ticket-bot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.jam-chat-confirm__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.jam-chat-confirm__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--jam-navy-rgb), 0.18);
  background: rgba(var(--jam-navy-rgb), 0.05);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--jam-navy);
}

.jam-chat-confirm__fare {
  text-align: right;
  flex: none;
}

.jam-chat-confirm__fare-label {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.jam-chat-confirm__fare-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--jam-navy);
}

.jam-chat-confirm__panel {
  padding: 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #f9fafb;
}

.jam-chat-confirm__panel-block + .jam-chat-confirm__panel-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e5e7eb;
}

.jam-chat-confirm__panel-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

.jam-chat-confirm__pax-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.jam-chat-confirm__pax-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}

.jam-chat-confirm__seat-pill {
  flex: none;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--jam-orange-rgb), 0.12);
  color: var(--jam-orange);
  font-size: 0.6875rem;
  font-weight: 700;
}

.jam-chat-confirm__contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.jam-chat-confirm__contact-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
  background: #fff;
  color: #6b7280;
  font-size: 0.6875rem;
  font-weight: 600;
}

.jam-chat-confirm__contact-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111827;
  text-transform: uppercase;
}

.jam-chat-confirm__foot {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  border-top: 0;
  padding-top: 0.35rem;
}

.jam-chat-confirm__edit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 5.5rem;
  padding: 0 0.9rem !important;
}

.jam-chat-confirm__pay {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  box-shadow: 0 8px 18px rgba(var(--jam-orange-rgb), 0.35) !important;
}

@media (max-width: 28rem) {
  .jam-chat-confirm__contact {
    grid-template-columns: 1fr;
  }

  .jam-chat-confirm__ticket-bot {
    flex-direction: column;
    align-items: stretch;
  }

  .jam-chat-confirm__fare {
    text-align: left;
  }
}

/* ---- Mobile chat polish (drawer, bubbles, loading, modals) ---- */
@media (max-width: 40rem) {
  .jam-chat-fab {
    right: max(0.25rem, env(safe-area-inset-right, 0px));
    bottom: max(0.25rem, env(safe-area-inset-bottom, 0px));
  }

  .jam-chat-fab__btn {
    width: 3.75rem;
    height: 3.75rem;
  }

  .jam-chat-fab--coming-soon .jam-chat-fab__btn {
    width: 4.15rem;
    height: 4.15rem;
  }

  .jam-chat-fab__btn img {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16));
  }

  .jam-chat-nudge {
    right: 0.15rem;
    bottom: calc(100% + 0.2rem);
    max-width: min(11.5rem, calc(100vw - 4.5rem));
    padding: 0.45rem 0.7rem 0.5rem;
    border-radius: 0.85rem;
    font-size: 0.75rem;
    line-height: 1.25;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .jam-chat-nudge::after {
    right: 1.05rem;
    bottom: -8px;
    border-width: 8px 7px 0 7px;
  }

  .jam-chat-nudge__title {
    font-size: 0.8125rem;
  }

  .jam-chat-nudge__body {
    margin-top: 0.1rem;
    font-size: 0.6875rem;
    font-weight: 600;
  }

  .jam-chat-nudge__cta {
    margin-top: 0.3rem;
    font-size: 0.625rem;
  }

  .jam-chat-drawer {
    width: 100% !important;
    max-width: 100% !important;
    left: 0;
    right: 0;
    overflow-x: hidden;
    height: var(--jam-vvh, 100dvh);
    max-height: var(--jam-vvh, 100dvh);
    top: var(--jam-vvt, 0px);
    bottom: auto;
    padding-bottom: 0;
  }

  .jam-chat-drawer__head {
    padding: 0.65rem 2.5rem 0.55rem 0.7rem;
  }

  .jam-chat-drawer__head-row {
    gap: 0.55rem;
  }

  .jam-chat-drawer__avatar-wrap {
    width: 2.1rem;
    height: 2.1rem;
  }

  .jam-chat-drawer__title {
    font-size: 0.85rem;
  }

  .jam-chat-drawer__subtitle {
    font-size: 0.625rem;
  }

  .jam-chat-drawer__disclaimer {
    margin-top: 0.35rem;
    font-size: 0.5625rem;
    line-height: 1.3;
    padding-right: 0.15rem;
  }

  .jam-chat-drawer__new {
    height: 1.85rem;
    padding: 0 0.55rem !important;
    font-size: 0.6875rem;
    border-radius: 0.55rem !important;
  }

  .jam-chat-drawer__close {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 1.1rem;
  }

  .jam-chat__log {
    gap: 0.65rem;
    padding: 0.55rem 0.6rem;
    overflow-x: hidden;
  }

  .jam-chat__day {
    padding: 0.15rem 0.55rem;
    font-size: 0.625rem;
  }

  .jam-chat__row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .jam-chat__msg {
    max-width: 100%;
    width: 100%;
    gap: 0.3rem;
    box-sizing: border-box;
  }

  .jam-chat__row--user .jam-chat__msg {
    max-width: 84%;
    width: auto;
  }

  .jam-chat__pic {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0.95rem;
  }

  .jam-chat__bubble-col {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
  }

  .jam-chat__row--bot .jam-chat__time,
  .jam-chat__row--error .jam-chat__time {
    margin-left: 1.8rem;
  }

  .jam-chat__time {
    font-size: 0.5625rem;
  }

  .jam-chat__bubble {
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
    line-height: 1.45;
    border-radius: 0.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Loading dialog: hug the copy, smaller bus, no clipped text */
  .jam-chat__row--bot:has(.jam-chat__bubble--loading) .jam-chat__msg,
  .jam-chat__row--bot:has(.jam-chat__bubble--loading) .jam-chat__bubble-col {
    width: auto;
    max-width: 100%;
    flex: 0 1 auto;
  }

  .jam-chat__bubble--loading {
    min-width: 0;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0.25rem 0 0.75rem;
    padding: 0.55rem 0.6rem;
  }

  .jam-chat__bus-wrap {
    padding-right: 2.6rem;
    min-height: 1.1rem;
  }

  .jam-chat__bus-text {
    font-size: 0.6875rem;
    line-height: 1.35;
  }

  .jam-chat__bus-icon {
    width: 3.1rem;
    height: 1.85rem;
  }

  @keyframes jam-chat-bus-drive {
    0% {
      left: -1.75rem;
    }
    70%,
    100% {
      left: calc(100% - 2rem);
    }
  }

  .jam-chat__options {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0.35rem;
    gap: 0.35rem;
  }

  .jam-chat__actions {
    width: 100%;
    gap: 0.35rem;
  }

  .jam-chat__actions--cols {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

  .jam-chat__chip {
    width: 100%;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.625rem;
    padding: 0.5rem 0.4rem !important;
    border-radius: 0.55rem !important;
    box-sizing: border-box;
    gap: 0.2rem;
    text-align: center !important;
  }

  .jam-chat__trips,
  .jam-chat__trips-scroll {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .jam-chat__trips-label {
    font-size: 0.6875rem;
    padding: 0.5rem 0.65rem 0.25rem;
  }

  .jam-chat__trip {
    padding: 0.55rem 0.65rem !important;
    gap: 0.5rem;
  }

  .jam-chat__trip-title {
    font-size: 0.75rem;
  }

  .jam-chat__trip-meta {
    font-size: 0.6875rem;
  }

  .jam-chat__trip-price {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem !important;
  }

  .jam-chat__trips-scroll {
    max-height: 11.5rem;
  }

  .jam-chat__composer {
    padding: 0.55rem 0.65rem;
    padding-bottom: calc(0.55rem + var(--jam-kb-pad, env(safe-area-inset-bottom, 0px)));
  }

  .jam-chat-drawer.is-keyboard .jam-chat__composer {
    --jam-kb-pad: 0px;
    padding-bottom: 0.45rem;
  }

  .jam-chat-drawer.is-keyboard .jam-chat__footnote {
    display: none;
  }

  .jam-chat__form {
    gap: 0.4rem !important;
    padding: 0.3rem 0.3rem 0.3rem 0.65rem !important;
    border-radius: 0.85rem !important;
  }

  .jam-chat__form input[type="text"],
  .jam-chat__form #jam-chat-input {
    height: 2rem !important;
    font-size: 0.8125rem !important;
  }

  .jam-chat__send,
  .jam-chat__form button[type="submit"],
  .jam-chat__form .jam-chat__send {
    height: 2rem !important;
    padding: 0 0.7rem !important;
    font-size: 0.75rem !important;
    border-radius: 0.6rem !important;
  }

  .jam-chat__footnote {
    margin-top: 0.35rem;
    font-size: 0.5625rem;
  }

  /* Dialogs / modals — full-width bottom sheets */
  .jam-chat-modal {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }

  .jam-chat-modal__dialog,
  .jam-chat-modal__dialog--pax,
  .jam-chat-modal__dialog--confirm,
  .jam-chat-modal__dialog--seats {
    width: 100%;
    max-width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 0.85rem 0.85rem 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .jam-chat-modal__head {
    padding: 0.7rem 0.75rem 0.5rem;
  }

  .jam-chat-modal__title {
    font-size: 0.9rem;
  }

  .jam-chat-modal__body {
    padding: 0.65rem 0.75rem;
  }

  .jam-chat-modal__foot,
  .jam-chat-confirm__foot {
    padding: 0.6rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .jam-chat-modal__cta,
  .jam-chat-modal__ghost {
    height: 2.4rem;
    font-size: 0.8125rem;
  }

  .jam-chat-confirm__head-main {
    gap: 0.45rem;
    min-width: 0;
  }

  .jam-chat-confirm__sub {
    font-size: 0.625rem;
  }

  .jam-chat-confirm__bus-ico {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
  }

  .jam-chat-confirm__bus-ico svg {
    width: 14px;
    height: 14px;
  }

  .jam-chat-confirm__ticket {
    padding: 0.65rem 0.65rem;
    margin-bottom: 0.55rem;
    border-radius: 0.75rem;
  }

  .jam-chat-confirm__ticket-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
  }

  .jam-chat-confirm__brand {
    font-size: 0.5625rem;
    padding: 0.2rem 0.5rem;
  }

  .jam-chat-confirm__date {
    font-size: 0.625rem;
    white-space: normal;
  }

  .jam-chat-confirm__route {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.25rem;
    align-items: start;
    margin-bottom: 0.5rem;
  }

  .jam-chat-confirm__stop--end {
    text-align: right;
  }

  .jam-chat-confirm__route-mid {
    min-width: 3.25rem;
    width: auto;
    padding-top: 0.7rem;
    padding-bottom: 0;
  }

  .jam-chat-confirm__stop-label {
    font-size: 0.5rem;
  }

  .jam-chat-confirm__stop-name {
    font-size: 0.8125rem;
  }

  .jam-chat-confirm__service {
    font-size: 0.45rem;
    letter-spacing: 0.04em;
  }

  .jam-chat-confirm__route-badge {
    width: 1.35rem;
    height: 1.35rem;
  }

  .jam-chat-confirm__ticket-bot {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .jam-chat-confirm__chip {
    font-size: 0.625rem;
    padding: 0.25rem 0.45rem;
  }

  .jam-chat-confirm__fare {
    text-align: left;
  }

  .jam-chat-confirm__fare-label {
    font-size: 0.5rem;
  }

  .jam-chat-confirm__fare-value {
    font-size: 1.05rem;
  }

  .jam-chat-confirm__panel {
    padding: 0.55rem;
    border-radius: 0.7rem;
  }

  .jam-chat-confirm__panel-label {
    font-size: 0.625rem;
    margin-bottom: 0.4rem;
  }

  .jam-chat-confirm__pax-name {
    font-size: 0.8125rem;
  }

  .jam-chat-confirm__contact {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .jam-chat-confirm__contact-item {
    padding: 0.45rem 0.5rem;
    font-size: 0.625rem;
  }

  .jam-chat-confirm__contact-item span {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .jam-chat-confirm__edit {
    flex: 1 1 auto;
    min-width: 0;
  }

  .jam-chat-confirm__pay {
    flex: 1 1 100%;
  }

  .jam-chat-pax__stepper {
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.65rem;
  }

  .jam-chat-pax__stepper span {
    font-size: 0.8125rem;
  }

  .jam-chat-pax__stepper button {
    width: 1.85rem !important;
    height: 1.85rem !important;
    min-width: 1.85rem;
    font-size: 1.05rem;
  }

  .jam-chat-pax__card {
    padding: 0.65rem;
    margin-bottom: 0.65rem;
  }

  .jam-chat-pax__card h3 {
    font-size: 0.8125rem;
  }

  .jam-chat-pax__grid {
    gap: 0.55rem 0.65rem;
  }

  .jam-chat-pax__field label {
    font-size: 0.6875rem;
  }

  .jam-chat-pax__field input,
  .jam-chat-pax__field select {
    height: 2.2rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 22rem) {
  .jam-chat__actions--cols {
    grid-template-columns: 1fr;
  }

  .jam-chat__bus-text {
    font-size: 0.7rem;
  }

  .jam-chat__bus-icon {
    width: 3.25rem;
    height: 1.9rem;
  }
}
