/* Chat panel adapted from Schleifjunkies' quick-contact component. */
.hezinger-chat {
    height: 640px;
    max-width: 860px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 12px;
    background: #243039;
    color: #fff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .08);
}
.hezinger-chat__header { flex: 0 0 auto; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.2); }
.hezinger-chat__notice { margin: 0; font-size: 13px; line-height: 1.5; max-width: 68ch; }
.hezinger-chat label { display: block; margin: 18px 0 10px; font-size: 16px; font-weight: 700; }
.hezinger-chat textarea, .hezinger-chat input {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 6px;
    background: rgba(0,0,0,.18);
    color: #fff;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
}
.hezinger-chat textarea::placeholder { color: rgba(255,255,255,.8); }
.hezinger-chat textarea:focus-visible, .hezinger-chat button:focus-visible, .hezinger-chat a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hezinger-chat__form { flex: 0 0 auto; border-top: 1px solid rgba(255,255,255,.2); }
.hezinger-chat__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.hezinger-chat__restart { border: 0; background: transparent; color: #fff; padding: 10px 0; text-decoration: underline; text-underline-offset: .2em; font: inherit; font-size: 14px; }
.hezinger-chat__messages { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.55) transparent; padding: 20px 8px 4px 0; }
.hezinger-chat__message { width: fit-content; max-width: 94%; margin: 0 0 14px; padding: 12px 14px; border-radius: 2px 12px 12px; background: rgba(0,0,0,.2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.55; }
.hezinger-chat__message--user { margin-left: auto; border-radius: 12px 2px 12px 12px; background: rgba(255,255,255,.13); }
.hezinger-chat__speaker { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; color: inherit; font-size: 13px; font-weight: 700; }
.hezinger-chat__header h2 { font-size: 22px; }
.hezinger-chat__bot-icon { display: block; flex: 0 0 22px; width: 22px; height: 22px; }
.hezinger-chat__message a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }
.hezinger-chat__status { flex: 0 0 auto; margin: 12px 0 0; font-size: 14px; line-height: 1.5; }
.hezinger-chat__status:empty, .hezinger-chat [hidden] { display: none !important; }
.hezinger-chat__trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 575.98px) {
    .hezinger-chat { height: 600px; padding: 18px; }
    .hezinger-chat__message { max-width: 96%; font-size: 15px; }
    .hezinger-chat__actions { gap: 8px 16px; }
    .hezinger-chat__actions .btn { font-size: 16px; }
}

/* Markdown is rendered with DOM elements; user messages remain plain text. */
.hezinger-chat__content { white-space: normal; }
.hezinger-chat__message--user .hezinger-chat__content { white-space: pre-wrap; }
.hezinger-chat__content p { margin: 0 0 .65em; }
.hezinger-chat__content ul, .hezinger-chat__content ol { margin: .4em 0 .65em; padding-left: 1.4em; }
.hezinger-chat__content li { margin: .2em 0; }
.hezinger-chat__content > :last-child { margin-bottom: 0; }
.hezinger-chat__content strong { font-weight: 700; }
.hezinger-chat__content em { font-style: italic; }
.hezinger-chat__content code { color: inherit; background: rgba(0,0,0,.15); padding: .1em .25em; }

/* Persistent website-wide Bootstrap offcanvas. */
.hezi-launcher { position: fixed; right: 24px; bottom: 24px; z-index: 1035; border-radius: 30px; padding: 14px 22px; box-shadow: 0 6px 24px #0004; }
#hezi-offcanvas { --bs-offcanvas-width: min(620px, 100vw); width: min(620px, 100vw); top: var(--hezi-header-offset, 0px); height: calc(100dvh - var(--hezi-header-offset, 0px)); z-index: 1029; background: #243039; color: #fff; }
#hezi-offcanvas .hezinger-chat { height: 100%; width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0; padding: 24px; }
#hezi-offcanvas .hezinger-chat__header h2 { padding-right: 24px; }
.hezinger-chat__hint { margin: 6px 0 0; font-size: 12px; opacity: .8; }
.hezi-docked .hezi-launcher { visibility: hidden; }
@media (max-width: 575.98px) {
  #hezi-offcanvas .hezinger-chat { padding: 16px; }
  #hezi-offcanvas .hezinger-chat__header { padding-bottom: 10px; }
  #hezi-offcanvas .hezinger-chat label { margin-top: 10px; }
  #hezi-offcanvas .hezinger-chat__actions { margin-top: 8px; }
}

/* Keep an open conversation visible while Bootstrap initializes after navigation. */
#hezi-offcanvas.hezi-restoring { visibility: visible; transform: none; transition: none !important; }

/* Compact toolbar; secondary actions live away from the send button. */
#hezi-offcanvas .hezinger-chat__header { position: relative; padding-bottom: 8px; }
.hezinger-chat__toolbar { display: flex; align-items: center; gap: 8px; }
#hezi-offcanvas .hezinger-chat__header h2 { flex: 1; min-width: 0; padding: 0; margin: 0; }
.hezinger-chat__menu { flex: 0 0 auto; }
.hezinger-chat__menu summary, .hezi-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font-size: 28px; line-height: 1; list-style: none; }
.hezinger-chat__menu summary::-webkit-details-marker { display: none; }
.hezinger-chat__menu summary:hover, .hezi-close:hover { background: #ffffff15; }
.hezinger-chat__menu summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hezinger-chat__menu-content { position: absolute; z-index: 2; top: 100%; right: 0; width: min(300px, 100%); padding: 16px; border: 1px solid #ffffff40; border-radius: 8px; background: #243039; box-shadow: 0 8px 24px #0005; }
#hezi-offcanvas .hezinger-chat__header .hezinger-chat__restart { margin: 0 0 12px; padding: 10px 0; font-size: 14px; }
#hezi-offcanvas .hezinger-chat__status { margin: 2px 0 0; font-size: 12px; max-height: 25vh; overflow-y: auto; }
#hezi-offcanvas .hezi-send { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; }
@media (max-width: 991.98px) {
  html.hezi-mobile-locked { overflow: hidden; overscroll-behavior: none; background: #243039; }
  html.hezi-mobile-locked body { position: fixed; top: var(--hezi-page-top, 0px); left: 0; right: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
  html.hezi-mobile-locked body::before { content: ''; position: fixed; inset: 0; height: 100vh; height: 100lvh; z-index: 1059; background: #243039; pointer-events: auto; }
  #hezi-offcanvas {
    width: 100%; max-width: none;
    top: 0; bottom: auto;
    height: 100vh; height: 100lvh;
    max-height: none; z-index: 1060;
    border: 0; border-radius: 0; overflow: hidden; overscroll-behavior: none;
  }
  #hezi-offcanvas .hezinger-chat {
    position: absolute; top: var(--hezi-viewport-top, 0px); left: 0;
    height: var(--hezi-viewport-height, 100dvh); max-height: 100%;
    min-height: 0; padding: max(4px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    overflow: hidden; box-sizing: border-box;
  }
  #hezi-offcanvas .hezinger-chat__header { padding-bottom: 4px; }
  #hezi-offcanvas .hezinger-chat__header h2 { font-size: 18px; }
  #hezi-offcanvas .hezi-desktop-label { display: none; }
  #hezi-offcanvas label[for="hezinger-chat-global-message"] {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  #hezi-offcanvas .hezinger-chat__messages { padding: 12px 0 4px; scroll-padding-block: 12px; }
  #hezi-offcanvas .hezinger-chat__message { padding: 10px 12px; margin-bottom: 10px; font-size: 15px; }
  #hezi-offcanvas .hezinger-chat__form { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: end; gap: 8px; padding-top: 8px; }
  #hezi-offcanvas textarea { height: 44px; max-height: 120px; padding: 9px 17px; font-size: 16px; overflow-y: auto; border-radius: 24px; border: 1px solid #ffffff35; background: #ffffff0c; -webkit-appearance: none; appearance: none; box-shadow: none; }
  #hezi-offcanvas textarea:focus { outline: none; border-color: #9bd8d3; box-shadow: 0 0 0 2px #27b5aa35; }
  #hezi-offcanvas .hezi-send { border-radius: 50%; border: 0; background: #28b4a9; color: #12282b; box-shadow: none; }
  #hezi-offcanvas .hezi-send:disabled { opacity: .5; }
  #hezi-offcanvas .hezi-send svg { width: 21px; height: 21px; }
  #hezi-offcanvas .hezinger-chat__actions { display: contents; }
}

.hezinger-chat__progress { flex: 0 0 auto; margin: 8px 0 16px; font-size: 13px; color: rgba(255,255,255,.8); }
.hezinger-chat__progress summary { cursor: pointer; padding: 6px 0; }
.hezinger-chat__progress ol { list-style: none; margin: 8px 0 0 6px; padding: 0; }
.hezinger-chat__progress li { position: relative; border-left: 1px solid #ffffff40; padding: 0 0 12px 19px; line-height: 1.4; }
.hezinger-chat__progress li:last-child { border-color: transparent; padding-bottom: 0; }
.hezinger-chat__progress li::before { content: ''; position: absolute; left: -4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #9caaa9; }
.hezinger-chat__progress li[data-state="running"]::before { background: #27b5aa; box-shadow: 0 0 0 3px #27b5aa30; animation: hezi-pulse 1.4s ease-in-out infinite; }
.hezinger-chat__progress li[data-state="failed"]::before { background: #efbd7c; }
@keyframes hezi-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .hezinger-chat__progress li[data-state="running"]::before { animation: none; } }

/* Markdown tables stay inside the chat bubble, including on mobile. */
.hezinger-chat__table { max-width: 100%; overflow-x: auto; margin: .6em 0; scrollbar-width: thin; }
.hezinger-chat__table:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hezinger-chat__table table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.4; }
.hezinger-chat__table th, .hezinger-chat__table td { border: 1px solid #ffffff35; padding: .5em .65em; min-width: 7em; vertical-align: top; }
.hezinger-chat__table th { background: #ffffff18; font-weight: 700; }
.hezinger-chat__table tbody tr:nth-child(even) { background: #ffffff08; }

/* Compact, record-backed link tiles; the streamed prose stays in place. */
.hezinger-chat__cards { display: flex; gap: 10px; overflow-x: auto; margin: 12px 0 0; padding: 2px 2px 6px; scrollbar-width: thin; }
.hezinger-chat__card { flex: 0 0 190px; width: 190px; min-height: 190px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 10px; border: 1px solid #ffffff30; border-radius: 8px; background: #ffffff0a; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.hezinger-chat__card img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 4px; }
.hezinger-chat__card-icon { width: 64px; height: 64px; display: grid; place-items: center; font-size: 28px; background: #ffffff10; border-radius: 4px; }
.hezinger-chat__card > strong { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hezinger-chat__card-price { font-weight: 700; }
.hezinger-chat__card small { font-size: 10px; line-height: 1.3; }
.hezinger-chat__card > a { display: block; margin-top: auto; padding: 6px 9px; border: 1px solid #ffffff65; border-radius: 4px; text-decoration: none; font-size: 12px; }
.hezinger-chat__card > a:hover { background: #ffffff18; }

/* Shared light surface for desktop and mobile, matching the navigation. */
html.hezi-mobile-locked,
html.hezi-mobile-locked body::before,
#hezi-offcanvas,
#hezi-offcanvas .hezinger-chat { background: #fff; color: #243039; color-scheme: light; }
#hezi-offcanvas .hezinger-chat__header,
#hezi-offcanvas .hezinger-chat__form { border-color: #2430391f; }
#hezi-offcanvas .hezinger-chat__message { background: #f1f3f4; }
#hezi-offcanvas .hezinger-chat__message--user { background: #e0f3f0; }
#hezi-offcanvas .hezinger-chat__messages,
#hezi-offcanvas .hezinger-chat__table,
#hezi-offcanvas .hezinger-chat__cards { scrollbar-color: #8d999e transparent; }
#hezi-offcanvas textarea { color: #243039; background: #f5f6f7; border-color: #cbd2d6; border-radius: 24px; }
#hezi-offcanvas textarea::placeholder { color: #637078; }
#hezi-offcanvas textarea:focus { border-color: #16877e; box-shadow: 0 0 0 2px #16877e26; }
#hezi-offcanvas button:focus-visible,
#hezi-offcanvas a:focus-visible,
#hezi-offcanvas summary:focus-visible,
#hezi-offcanvas .hezinger-chat__table:focus-visible { outline-color: #13766f; }
#hezi-offcanvas .hezinger-chat__restart { color: #243039; }
#hezi-offcanvas .hezinger-chat__menu-content { background: #fff; border-color: #d7dfe2; box-shadow: 0 8px 24px #24303920; }
#hezi-offcanvas .hezinger-chat__menu summary:hover,
#hezi-offcanvas .hezi-close:hover { background: #2430390d; }
#hezi-offcanvas .hezinger-chat__progress { color: #53626b; }
#hezi-offcanvas .hezinger-chat__progress li { border-left-color: #ccd5d8; }
#hezi-offcanvas .hezinger-chat__progress li:last-child { border-color: transparent; }
#hezi-offcanvas .hezinger-chat__progress li::before { background: #78868d; }
#hezi-offcanvas .hezinger-chat__progress li[data-state="running"]::before { background: #16877e; }
#hezi-offcanvas .hezinger-chat__progress li[data-state="failed"]::before { background: #a45b0e; }
#hezi-offcanvas .hezinger-chat__content code { background: #2430390c; }
#hezi-offcanvas .hezinger-chat__table th,
#hezi-offcanvas .hezinger-chat__table td { border-color: #ccd5d8; }
#hezi-offcanvas .hezinger-chat__table th { background: #e4e9eb; }
#hezi-offcanvas .hezinger-chat__table tbody tr:nth-child(even) { background: #24303905; }
#hezi-offcanvas .hezinger-chat__card { background: #fff; border-color: #cbd5d9; }
#hezi-offcanvas .hezinger-chat__card-icon { background: #edf1f2; }
#hezi-offcanvas .hezinger-chat__card > a { border-color: #87979e; }
#hezi-offcanvas .hezinger-chat__card > a:hover { background: #e0f3f0; }

#hezi-offcanvas .hezi-send { border-radius: 50%; border: 0; background: #28b4a9; color: #12282b; box-shadow: none; }
#hezi-offcanvas textarea:focus-visible { outline-color: #13766f; }

/* Inquiry drafts stay inside the chat; only the delivery adapter is pending. */
.hezi-inquiry__launch { flex: 0 0 auto; border: 1px solid #16877e; background: #e0f3f0; color: #155e58; border-radius: 20px; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 1.3; min-height: 40px; }
#hezi-offcanvas .hezi-desktop-label { display: none; }
.hezi-inquiry__card { margin: 16px 0; padding: 16px; border: 1px solid #b6d7d2; border-radius: 16px; background: #fff; color: #243039; overflow-wrap: anywhere; }
.hezi-inquiry__card h3, .hezi-inquiry__editor h3 { font-size: 18px; margin: 12px 0; }
.hezi-inquiry__body { white-space: pre-wrap; font-size: 15px; line-height: 1.55; }
.hezi-inquiry__contact { font-size: 14px; margin: 16px 0; }
.hezi-inquiry__help { font-size: 12px; line-height: 1.5; color: #53626b; margin: 10px 0; }
.hezi-inquiry__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.hezi-inquiry__button { font: inherit; font-size: 14px; line-height: 1.4; padding: 10px 14px; border: 1px solid #87979e; border-radius: 22px; background: #fff; color: #243039; }
.hezi-inquiry__button--primary { background: #16877e; color: #fff; border-color: #16877e; }
.hezi-inquiry__button:disabled, .hezi-inquiry__launch:disabled { opacity: .5; cursor: not-allowed; }
.hezi-inquiry__refresh { font: inherit; font-size: 12px; color: #155e58; background: transparent; border: 0; padding: 8px 0; text-decoration: underline; }
.hezi-inquiry__editor { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 6px 16px; }
#hezi-offcanvas .hezi-inquiry__field { display: block; margin: 14px 0; font-size: 14px; }
.hezi-inquiry__field > span { display: block; margin-bottom: 6px; }
#hezi-offcanvas .hezi-inquiry__field input, #hezi-offcanvas .hezi-inquiry__field textarea { display: block; width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #cbd2d6; border-radius: 14px; background: #f5f6f7; color: #243039; padding: 10px 14px; font: inherit; font-size: 16px; line-height: 1.5; -webkit-appearance: none; }
#hezi-offcanvas .hezi-inquiry__field textarea { height: 260px; max-height: none; resize: vertical; }
#hezi-offcanvas .hezi-inquiry__field input:focus, #hezi-offcanvas .hezi-inquiry__field textarea:focus { outline: 2px solid #16877e; outline-offset: 1px; }
@media (max-width: 359.98px) { .hezi-inquiry__launch { font-size: 12px; padding: 8px; } .hezinger-chat__toolbar { gap: 2px; } }

#hezi-offcanvas .hezi-inquiry__field input, #hezi-offcanvas .hezi-inquiry__field textarea { font-weight: 400; }

/* Desktop composer: label above, message and send button on the same row. */
@media (min-width: 992px) {
  #hezi-offcanvas .hezinger-chat__form { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; column-gap: 10px; }
  #hezi-offcanvas .hezinger-chat__form > label { grid-column: 1 / -1; }
  #hezi-offcanvas .hezinger-chat__form > textarea { grid-column: 1; min-width: 0; }
  #hezi-offcanvas .hezinger-chat__form > .hezinger-chat__actions { display: contents; }
  #hezi-offcanvas .hezinger-chat__form .hezi-send { grid-column: 2; }
}

.hezi-inquiry__button--sent:disabled {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  opacity: 1;
}
.hezi-inquiry__timeline {
  list-style: none;
  padding: 0 0 0 8px;
  margin: 16px 0;
  font-size: .875rem;
}
.hezi-inquiry__timeline li {
  position: relative;
  border-left: 1px solid var(--bs-primary);
  padding: 0 0 12px 18px;
}
.hezi-inquiry__timeline li:last-child { padding-bottom: 0; border-color: transparent; }
.hezi-inquiry__timeline li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: .4em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bs-primary);
}
