/*
 * The docked Soral chat on pages without a chat in their hero (features,
 * integration, about, demo experience, book a demo): soral-chat.js
 * `mountDocked` builds it for a visitor who opened the chat on another page.
 *
 * These are the industry pages' own chat rules, copied from their inline
 * <style>, so the chat looks the same wherever it follows the visitor. The
 * utilities its markup uses come with it in tw/soral-chat-utilities.css, built
 * by build-design-css.mjs.
 */

/* The page's icon font may be a smaller subset; the chat brings the one its icons are in. */
@font-face {
  font-family: 'Soral Chat Symbols';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url(/design-assets/fonts/material-symbols-outlined.woff2) format('woff2');
}
#hero-chat-container .material-symbols-outlined { font-family: 'Soral Chat Symbols'; }

/* Open or at the bottom of the page, never in it. */
body:not(.hero-chat-minimized) .soral-docked-chat:not(.is-expanded) { display: none; }
/* A page with the Tailwind forms plugin draws its own field border and focus ring on the input. */
.soral-docked-chat #heroChatInput { border: 0; box-shadow: none; }
.soral-docked-chat #heroChatInput:focus { outline: none; box-shadow: none; }

@keyframes hero-launcher-in {
  from { opacity: 0; transform: translateY(18px) scale(.72); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hero-dropdown-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

#heroChatThread { flex: 1 1 auto; }
#heroChatThread article > div:first-child { flex-wrap: wrap; }
#heroChatComposer > div { background: #E7F3F3 !important; }
#heroChatInput::placeholder { color: rgba(0,30,48,.64); }
#heroChatThread img[alt="Soral"] { width: 36px !important; height: 36px !important; }
#heroChatThread img[alt="Soral"] + div { border-color: #C5E5DB !important; }
#heroChatThread > .justify-end > div { background: #E7F3F3 !important; border-color: #C5E5DB !important; }
#heroChatTabsBar { align-items: center !important; padding-bottom: 0 !important; border-color: transparent !important; }
#heroLiveStatus { margin-bottom: 8px; }
#heroChatBrandHeader {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 10px;
  border-bottom: 0 !important;
}
#heroChatBrandHeader .chat-brand-logo { display: block; width: auto; height: 28px; object-fit: contain; }
#heroChatBrandHeader #heroLiveStatus {
  display: flex !important;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#heroChatBrandHeader #heroLiveStatus > span:last-child {
  color: #16534e;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
#heroChatBrandHeader .chat-live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
#heroQuickActions button { background: #E7F3F3 !important; border-color: #C5E5DB !important; }
#heroQuickActions button:hover { background: #C5E5DB !important; }
@media (max-width: 767px) {
  #heroQuickActions {
    width: 100%;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  #heroQuickActions button {
    flex: 0 0 40%;
    min-height: 42px;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    scroll-snap-align: start;
  }
}
#hero-chat-container > div { border-color: #C5E5DB !important; }
#heroChatComposerLogo { display: none; }
#heroChatPullHandle { display: none; }
#hero-chat-container > div {
  border: 1px solid rgba(214,225,240,.92) !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 22px 60px rgba(20,51,72,.08) !important;
}
#hero-chat-container { font-weight: 400; }
#heroChatThread,
#heroChatThread > div,
#heroChatThread article p,
#heroQuickActions button,
#heroChatInput { font-weight: 400 !important; }
#heroChatTabsBar {
  align-items: center !important;
  border-color: transparent !important;
  position: relative !important;
}
#heroMoreDropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 4px;
  z-index: 60;
  min-width: 280px;
  max-width: 360px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid #d8eafb;
  box-shadow: 0 12px 32px rgba(15, 47, 68, 0.16), 0 2px 6px rgba(15, 47, 68, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: hero-dropdown-fade 160ms ease-out;
}
@media (max-width: 767px) {
  #heroMoreDropdown {
    left: 4px;
    right: 4px;
    min-width: auto;
    max-width: none;
  }
}
.hero-more-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
  color: #1d2a33;
  width: 100%;
  font-family: inherit;
}
.hero-more-dropdown-item:hover,
.hero-more-dropdown-item:focus-visible {
  background: #eef7ff;
  color: #003b37;
}
.hero-more-dropdown-item .dropdown-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e7f3f3;
  color: #007b70;
  flex-shrink: 0;
}
.hero-more-dropdown-item .dropdown-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.hero-more-dropdown-item strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.hero-more-dropdown-item small {
  font-size: 11px;
  color: #7583b1;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-more-dropdown-item .dropdown-item-arrow {
  color: #007b70;
  font-size: 18px;
  margin-left: auto;
  flex-shrink: 0;
}
#hero-chat-container:not(.is-expanded) .chat-msg-older {
  display: none !important;
}
#hero-chat-container.is-expanded .hero-earlier-messages-pill {
  display: none !important;
}
.hero-earlier-messages-pill {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 4px 0 10px 0;
}
.hero-earlier-messages-pill button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: #005a52;
  background: #eef7f5;
  border: 1px solid #c5e5db;
  cursor: pointer;
  transition: all 180ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.hero-earlier-messages-pill button:hover {
  background: #dfefea;
  color: #003b37;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.hero-earlier-messages-pill button .material-symbols-outlined {
  font-size: 14px;
}
#heroChatTabsBar #heroLiveStatus { display: none !important; }
#heroChatThread img[alt="Soral"] + div {
  border-color: #e2e8f3 !important;
  box-shadow: none !important;
}
#heroChatThread > .justify-end > div {
  background: linear-gradient(135deg, #effaf7, #f5f8ff) !important;
  border-color: #e0e8f1 !important;
}
#heroChatThread article {
  border-color: #e3e9f3 !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 8px 24px rgba(20,51,72,.045) !important;
}
#heroChatThread article h3 { font-weight: 500 !important; }
#heroQuickActions { justify-content: center; }
#heroQuickActions button {
  background: rgba(255,255,255,.94) !important;
  border: 1px solid #dfe6f1 !important;
  color: #24365f !important;
  box-shadow: none !important;
}
#heroQuickActions button:hover { background: #f6f9ff !important; border-color: #bfcfe3 !important; }
#heroChatComposer > div {
  border: 1px solid #d9e2ef !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.98) !important;
  box-shadow: 0 7px 24px rgba(20,51,72,.055) !important;
}
#heroChatSearchIcon { display: none; }
#heroChatClose {
  width: 36px;
  height: 36px;
  background: transparent;
  border-color: transparent;
  color: #7583b1;
  box-shadow: none;
}
#heroChatClose:hover { background: #f3f6fb; color: #003b37; }
#heroChatClose .material-symbols-outlined { font-size: 26px; font-weight: 300; }
#hero-chat-container.is-expanded > div {
  border-color: #d9e2ef !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 28px 80px rgba(20,51,72,.14) !important;
}
#hero-chat-container.is-initial #heroChatTabsBar { order: 1; }
#hero-chat-container.is-initial #heroChatThread { order: 2; justify-content: flex-start; align-items: stretch; text-align: left; }
#hero-chat-container.is-initial #heroQuickActions { order: 3; justify-content: flex-start; align-self: stretch; }
#hero-chat-container.is-initial #heroChatComposer { order: 4; width: 100%; align-self: stretch; }
#hero-chat-container.is-initial #heroChatNotice { order: 5; }
.hero-initial-message { display: flex; align-items: flex-start; gap: 12px; max-width: 82%; padding: 14px 0 8px; }
.hero-initial-message img { width: 42px !important; height: 42px !important; flex: 0 0 auto; }
.hero-initial-message .message-bubble { padding: 12px 16px; border: 1px solid #e2e8f3; border-radius: 18px 18px 18px 5px; color: #07143e; font-size: 14px; line-height: 1.45; font-weight: 400; }
@media (min-width: 768px) {
  #hero-chat-container { max-width: 57.6rem !important; }
  #hero-chat-container:not(.is-expanded) > div { min-height: 22rem; padding-top: 1.7rem; padding-bottom: 1.7rem; }
}
#heroChatBackdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  background: rgba(246, 249, 255, .58);
  transition: opacity 260ms ease;
}
body.hero-chat-expanded { overflow: hidden !important; }
body.hero-chat-expanded #heroChatBackdrop { opacity: 1; pointer-events: auto; }
#hero-chat-container.is-expanded {
  position: fixed;
  inset: 24px;
  z-index: 70;
  width: auto;
  max-width: 1180px !important;
  margin: auto;
  transform-origin: right bottom;
  animation: hero-chat-grow 640ms cubic-bezier(.16,1,.3,1) both;
}
#hero-chat-container.is-expanded.is-desktop-closing {
  pointer-events: none;
  animation: hero-chat-shrink-to-launcher 520ms cubic-bezier(.7,0,.84,0) both !important;
}
body.hero-chat-closing #heroChatBackdrop { opacity: 0; }
#hero-chat-container.is-expanded > div {
  height: calc(100vh - 48px);
  border-color: rgba(124, 140, 255, .32);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 36px 100px rgba(15, 47, 68, .22);
}
#hero-chat-container.is-expanded #heroChatThread { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
#heroChatClose {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #003b37;
  background: #ecf5ff;
  border: 1px solid #e1f0ff;
  font-size: 20px;
  cursor: pointer;
}
#heroChatNew {
  position: absolute;
  top: 14px;
  right: 58px;
  z-index: 3;
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #7583b1;
  background: #ecf5ff;
  border: 1px solid #e1f0ff;
  font-size: 20px;
  cursor: pointer;
}
#heroChatNew:hover { background: #f3f6fb; color: #003b37; }
#hero-chat-container.is-expanded #heroChatClose,
#hero-chat-container.is-expanded #heroChatNew { display: flex; }
#hero-chat-container.is-expanded > div > div:first-of-type { padding-right: 104px; }
#heroChatLauncher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 55;
  display: none;
  width: 60px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 47, 68, .24);
  cursor: pointer;
  animation: hero-launcher-in 240ms cubic-bezier(.2,.8,.2,1) both;
}
#heroChatLauncher img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.hero-chat-minimized #heroChatLauncher { display: block; }
body.hero-chat-minimized #hero-chat-container:not(.is-expanded) { display: none; }
#heroChatMovedNotice { display: none; }
@media (min-width: 768px) {
  body.hero-chat-minimized #heroChatMovedNotice {
    display: flex;
    width: min(100%, 720px);
    margin: 18px auto 0;
    padding: 18px 20px;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(214,225,240,.94);
    border-radius: 22px;
    background: rgba(255,255,255,.78);
    box-shadow: 0 20px 55px rgba(20,51,72,.08);
    backdrop-filter: blur(18px) saturate(110%);
    text-align: left;
    font: inherit;
    cursor: pointer;
    animation: hero-chat-notice-in 320ms cubic-bezier(.2,.8,.2,1) both;
  }
  #heroChatMovedNotice img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
  }
  #heroChatMovedNotice .notice-copy { flex: 1; min-width: 0; }
  #heroChatMovedNotice strong { display: block; color: #07143e; font-size: 16px; font-weight: 600; }
  #heroChatMovedNotice small { display: block; margin-top: 3px; color: #7583b1; font-size: 13px; }
  #heroChatMovedNotice .notice-action {
    display: flex;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #003b37;
    color: #ffffff;
    transition: transform 180ms ease, background 180ms ease;
  }
  #heroChatMovedNotice:hover .notice-action { transform: translate(2px, 2px); background: #16534e; }
}
@keyframes hero-chat-grow {
  from { opacity: .18; transform: translate3d(44px, 44px, 0) scale(.08); border-radius: 999px; }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hero-chat-shrink-to-launcher {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  55% { opacity: .82; }
  100% { opacity: 0; transform: translate3d(48px, 48px, 0) scale(.06); }
}
@keyframes hero-chat-notice-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hero-chat-sheet-up {
  from { opacity: .72; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  #hero-chat-container > div { padding: 14px !important; border-radius: 20px !important; }
  #hero-chat-container > div > div:first-child { align-items: flex-start; }
  #hero-chat-container > div > div:first-child > div:first-child { width: 100%; overflow-x: auto; }
  #hero-chat-container > div > div:first-child button { flex: 0 0 auto; padding-left: 10px !important; padding-right: 10px !important; }
  #heroChatThread { padding-right: 0 !important; }
  #heroChatThread article { padding: 11px !important; }
  #heroChatThread .chat-message-row:has([data-content-card-carousel]) { max-width: 100%; }
  #heroChatThread article h3 { font-size: 14px !important; }
  #heroChatThread article p { font-size: 11px !important; }
  #heroChatInput { min-width: 0; padding-left: 8px !important; padding-right: 6px !important; font-size: 16px !important; }
  #hero-chat-container.is-expanded {
    top: 8dvh;
    right: 0;
    bottom: 0;
    left: 0;
    max-width: none !important;
    margin: 0;
    animation: hero-chat-sheet-up 900ms cubic-bezier(.16,1,.3,1) both;
  }
  #hero-chat-container.is-expanded > div {
    height: 92dvh;
    padding-top: 42px !important;
    border-bottom: 0 !important;
    border-radius: 28px 28px 0 0 !important;
  }
  #hero-chat-container.is-expanded #heroChatThread article { min-width: 0; }
  #hero-chat-container.is-expanded #heroChatClose { display: none; }
  #heroChatNew { top: 44px; right: 14px; width: 32px; height: 32px; }
  #heroChatNew .material-symbols-outlined { font-size: 20px; }
  #hero-chat-container.is-expanded > div > div:first-of-type { padding-right: 42px; }
  #heroChatBrandHeader .chat-brand-logo { height: 36px; }
  #heroChatBrandHeader #heroLiveStatus { align-self: center; }
  body.hero-chat-minimized { padding-bottom: 112px; }
  body.hero-chat-minimized #heroChatLauncher { display: none; }
  body.hero-chat-minimized #hero-chat-container:not(.is-expanded) {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 100 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }
  body.hero-chat-minimized #hero-chat-container:not(.is-expanded) > div {
    position: relative;
    min-height: 0;
    padding: 32px 16px calc(10px + env(safe-area-inset-bottom)) !important;
    gap: 0;
    border: 1px solid #d6ebff !important;
    border-bottom: 0 !important;
    border-radius: 28px 28px 0 0 !important;
    background: #ffffff !important;
    box-shadow: 0 -12px 36px rgba(15,47,68,.16) !important;
    overflow: hidden !important;
  }
  body.hero-chat-minimized #hero-chat-container:not(.is-expanded) > div::before,
  body.hero-chat-minimized #hero-chat-container:not(.is-expanded) > div::after { content: none; }
  body.hero-chat-minimized #heroChatPullHandle,
  #hero-chat-container.is-expanded #heroChatPullHandle {
    display: flex;
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    z-index: 2;
    width: auto;
    height: 27px;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #7583b1;
    cursor: pointer;
    touch-action: none;
  }
  #heroChatPullHandle .pull-line { width: 42px; height: 4px; border-radius: 999px; background: #c7cfde; }
  #heroChatPullHandle .material-symbols-outlined {
    position: absolute;
    right: 14px;
    font-size: 21px;
    line-height: 1;
    transition: transform 220ms ease;
  }
  #hero-chat-container.is-expanded #heroChatPullHandle .material-symbols-outlined { transform: rotate(180deg); }
  body.hero-chat-minimized #hero-chat-container:not(.is-expanded) > div > *:not(#heroChatBrandHeader):not(#heroChatComposer):not(#heroChatPullHandle) { display: none !important; }
  body.hero-chat-minimized #heroChatBrandHeader { min-height: 30px; padding: 0 2px 6px; }
  body.hero-chat-minimized #heroChatBrandHeader .chat-brand-logo { height: 24px; }
  body.hero-chat-minimized #heroChatTabsBar { display: none !important; }
  body.hero-chat-minimized #heroLiveStatus { display: none !important; }
  body.hero-chat-minimized #heroChatComposer { display: block; padding: 0; }
  body.hero-chat-minimized #heroChatComposer > div {
    background: #E7F3F3;
    border: 1px solid #c8cdd5;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15,47,68,.1), inset 0 0 0 1px rgba(225,240,255,.75);
    backdrop-filter: blur(14px);
    overflow: hidden;
  }
  body.hero-chat-minimized #heroChatComposerLogo {
    display: none;
  }
}
