.customer-chat { --chat-visible-height: 100dvh; --chat-visible-top: 0px; }
.customer-chat__launcher { position: fixed; z-index: 56; right: max(24px, env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 22px; border: 1px solid #739294; border-radius: 999px; background: var(--teal); color: var(--white); font: 600 .95rem/1.3 var(--sans); box-shadow: 0 8px 28px #15212230; }
.customer-chat__launcher svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.customer-chat__dialog { position: fixed; inset: auto 24px 24px auto; margin: 0; padding: 0; width: 420px; max-width: calc(100vw - 32px); height: min(700px, calc(100dvh - 100px)); max-height: calc(var(--chat-visible-height) - 24px); border: 1px solid var(--line-2); border-radius: 24px; background: var(--ivory-2); color: var(--ink); box-shadow: 0 24px 80px #15212240; overflow: hidden; }
.customer-chat__dialog[open] { display: flex; flex-direction: column; }
.customer-chat__dialog::backdrop { background: #15212255; }
body.customer-chat-open { overflow: hidden; }
body.customer-chat-open .mobile-bar, body.menu-open .customer-chat__launcher, .keyboard-open .customer-chat__launcher { visibility: hidden; pointer-events: none; }
.customer-chat__header { display: flex; align-items: center; gap: 12px; flex: none; padding: 20px; background: var(--teal); color: var(--white); }
.customer-chat__header h2 { color: inherit; font: 400 30px/1 var(--serif); letter-spacing: 0; }
.customer-chat__header p { margin-top: 6px; color: #d0dedc; font-size: 12px; line-height: 1.4; }
.customer-chat__mark { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 1px solid #739294; border-radius: 50%; font: 400 22px var(--serif); color: #e4ceab; }
.customer-chat__close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; margin-left: auto; padding: 0; border: 1px solid #739294; border-radius: 50%; background: transparent; color: inherit; font-size: 28px; line-height: 1; }
.customer-chat__body { min-height: 0; flex: 1 1 auto; padding: 24px 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.customer-chat__welcome .eyebrow { font-size: 10px; letter-spacing: .13em; }
.customer-chat__welcome h3 { margin: 15px 0 12px; font: 400 35px/1.05 var(--serif); max-width: 14ch; }
.customer-chat__welcome h3 em { color: var(--teal-2); font-weight: 400; }
.customer-chat__welcome > p:last-of-type { color: var(--ink-2); font-size: .95rem; line-height: 1.6; }
.customer-chat__suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 24px; }
.customer-chat__suggestions button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 12px; text-align: left; border: 1px solid var(--line-2); border-radius: 12px; background: transparent; color: var(--teal); font-size: .8rem; font-weight: 600; }
.customer-chat__messages { display: grid; gap: 16px; }
.customer-chat__message { min-width: 0; max-width: 94%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px 16px 16px 3px; background: var(--sand); }
.customer-chat__message.is-user { margin-left: auto; border-radius: 16px 16px 3px 16px; background: var(--teal); color: var(--white); }
.customer-chat__speaker { display: block; margin-bottom: 6px; font-size: .68rem; font-weight: 600; letter-spacing: .06em; opacity: .8; }
.customer-chat__message p { font-size: .9rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-chat__action { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--teal); }
.customer-chat__waiting { display: flex; align-items: center; gap: 9px; margin-top: 18px; font-size: .8rem; color: var(--ink-2); }
.customer-chat__waiting span { color: var(--brass); }
.customer-chat__error { padding: 14px; margin-top: 14px; background: var(--sand); border-radius: 12px; font-size: .85rem; line-height: 1.5; }
.customer-chat__error button { min-height: 44px; margin-top: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--ivory-2); font-weight: 600; }
.customer-chat__form { position: relative; display: flex; align-items: flex-end; gap: 10px; flex: none; margin: 0 16px; padding: 10px 10px 10px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--white); }
.customer-chat__form textarea { display: block; width: 100%; min-width: 0; min-height: 48px; max-height: 100px; margin: 0; padding: 2px 0; resize: none; border: 0; border-radius: 0; background: transparent; font: 400 16px/1.5 var(--sans); box-shadow: none; }
.customer-chat__form textarea:focus { outline: none; }
.customer-chat__form:focus-within { outline: 2px solid var(--teal-2); outline-offset: 2px; }
.customer-chat__send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 10px; border: 0; border-radius: 50%; background: var(--teal); color: var(--white); }
.customer-chat__send svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.customer-chat__footer { flex: none; padding: 4px 20px 16px; }
.customer-chat__help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 10px; }
.customer-chat__help a, .customer-chat__help button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; font-size: .75rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.customer-chat__footer > p { color: var(--ink-3); font-size: 10px; line-height: 1.5; }
.customer-chat button:disabled { cursor: wait; opacity: .55; }
@media (hover: hover) { .customer-chat__suggestions button:hover { background: var(--sand); } .customer-chat__launcher:hover { background: var(--teal-2); } }
@media (max-width: 699px) {
  .customer-chat__launcher { right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); min-height: 48px; padding: 12px 16px; font-size: .85rem; }
  body:not(.has-bar) .customer-chat__launcher { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .is-home:has(.opening.is-cinematic) .customer-chat__launcher { bottom: calc(148px + env(safe-area-inset-bottom)); }
  .customer-chat__dialog { inset: calc(var(--chat-visible-top) + 8px) 8px auto; width: auto; max-width: none; height: calc(var(--chat-visible-height) - 16px); max-height: none; border-radius: 20px; }
  .customer-chat__header { padding: 14px 16px; }
  .customer-chat__body { padding: 20px 16px; }
  .customer-chat__footer { padding-inline: 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (max-height: 500px) {
  .customer-chat__header { padding-block: 8px; }
  .customer-chat__mark { display: none; }
  .customer-chat__header h2 { font-size: 24px; }
  .customer-chat__footer > p { display: none; }
  .customer-chat__form { padding-block: 6px; }
}
@media print { .customer-chat { display: none !important; } }
