.dst-chat {
  --chat-edge: max(1.25rem, env(safe-area-inset-bottom));
  --chat-right: max(1.25rem, env(safe-area-inset-right));
  --chat-ink: var(--navy, #162342);
  --chat-green: #00694e;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--chat-ink);
}
.dst-chat [hidden] { display: none !important; }
.dst-chat-launcher, .dst-chat-send, .dst-chat-secondary, #dst-chat-close, .dst-chat-link {
  appearance: none;
  cursor: pointer;
  font: inherit;
  min-height: 44px;
}
.dst-chat-launcher {
  position: fixed;
  z-index: 40;
  right: var(--chat-right);
  bottom: max(var(--chat-edge), var(--chat-cookie-height, 0px));
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .68rem 1rem;
  border: 1px solid #ffffff70;
  border-radius: 2rem;
  color: #fff;
  background: var(--chat-green);
  box-shadow: 0 3px 16px #0c342d30;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.25;
}
.dst-chat-launcher:hover, .dst-chat-send:hover { background: #00543f; }
.dst-chat-launcher svg, #dst-chat-close svg { width: 1.3rem; height: 1.3rem; flex-shrink: 0; }
body:has(.basket-drawer.open) .dst-chat-launcher { visibility: hidden; }
.dst-chat-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: auto var(--chat-right) var(--chat-edge) auto;
  margin: 0;
  padding: 0;
  border: 1px solid #c4d2cc;
  border-radius: 16px;
  width: min(24rem, calc(100% - 2.5rem));
  max-width: none;
  max-height: calc(100vh - 2.5rem);
  max-height: calc(100dvh - 2.5rem);
  color: var(--chat-ink);
  background: #fff;
  box-shadow: 0 12px 50px #0d233333;
  overscroll-behavior: contain;
  font-size: 1rem;
  line-height: 1.45;
}
.dst-chat-dialog::backdrop { background: #1222383b; }
.dst-chat-shell { min-width: 0; }
.dst-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem .8rem 1rem 1.25rem;
  gap: 1rem;
  color: #fff;
  background: var(--chat-ink);
}
.dst-chat-header h2 { font: 800 1.4rem/1.2 Manrope, Arial, sans-serif; letter-spacing: -.03em; color: #fff; margin: 0; }
.dst-chat .dst-chat-header p { font-size: .875rem; margin: .3rem 0 0; color: #e9f2ef; }
.dst-chat-online::before { content: ''; display: inline-block; height: .5rem; width: .5rem; margin-right: .45rem; border-radius: 50%; background: #79dfb5; vertical-align: .06rem; }
#dst-chat-close { display: grid; place-items: center; flex: none; width: 44px; border-radius: 50%; color: #fff; border: 1px solid #ffffff59; background: transparent; }
#dst-chat-close:hover { background: #ffffff24; }
.dst-chat-body { padding: 1.15rem 1.25rem; }
.dst-chat-body form, #dst-chat-thread { display: grid; gap: .65rem; }
.dst-chat-dialog p { margin: 0; }
.dst-chat-body label { display: block; font-size: .875rem; font-weight: 700; }
.dst-chat-body textarea, .dst-chat-body input {
  box-sizing: border-box;
  width: 100%;
  padding: .6rem .75rem;
  color: var(--chat-ink);
  font: 1rem/1.4 Arial, Helvetica, sans-serif;
  border: 1px solid #85978c;
  border-radius: 7px;
  background: #fff;
}
.dst-chat-body textarea { display: block; resize: vertical; min-height: 48px; max-height: 9rem; }
.dst-chat-wait { padding: .75rem; border: 1px solid #c2d8ca; border-radius: 8px; background: #f3f8f5; font-size: .9375rem; }
.dst-chat-wait > div { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.dst-chat-wait button { flex: 1 1 auto; }
#dst-chat-email-wrap, #dst-chat-followup-wrap { display: grid; gap: .45rem; }
.dst-chat-send, .dst-chat-secondary {
  padding: .6rem 1rem;
  border-radius: 7px;
  font-size: .9375rem;
  line-height: 1.3;
  font-weight: 700;
}
.dst-chat-send { border: 1px solid transparent; color: #fff; background: var(--chat-green); }
.dst-chat-send:disabled { opacity: .65; cursor: wait; }
.dst-chat-secondary { color: var(--chat-ink); border: 1px solid #bac9c0; background: #f5f8f5; }
.dst-chat-secondary:hover { background: #e8f2eb; }
.dst-chat-body a, .dst-chat-link { color: var(--chat-green); text-decoration: underline; text-underline-offset: .15em; }
.dst-chat-link { justify-self: start; border: none; border-radius: 5px; padding: .35rem 0; background: transparent; font-size: .875rem; }
.dst-chat-privacy, #dst-chat-outcome { font-size: .875rem; color: #40524c; }
#dst-chat-error { padding: .65rem .8rem; border-left: 3px solid #a15c21; background: #fff5ea; color: #583814; margin: 0 0 .6rem; }
#dst-chat-recovery { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .65rem; }
#dst-chat-log {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .7rem;
  max-height: min(15rem, 34vh);
  max-height: min(15rem, 34dvh);
  min-height: 3rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .25rem .2rem .5rem;
}
.dst-chat-message { max-width: 91%; }
.dst-chat-message p { font-size: .9375rem; padding: .55rem .75rem; background: #f0f3f4; border-radius: 10px 10px 10px 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dst-chat-own { align-self: flex-end; }
.dst-chat-own p { border-radius: 10px 10px 2px 10px; background: #e5f2eb; }
.dst-chat-caption { display: flex; align-items: baseline; gap: .45rem; color: #4e6058; font-size: .8125rem; margin: 0 .1rem .15rem; }
.dst-chat-own .dst-chat-caption { justify-content: flex-end; }
#dst-chat-outcome { padding: .6rem .75rem; border-left: 3px solid #398262; background: #f1f7f3; overflow-wrap: anywhere; }
.dst-chat :focus-visible { outline: 3px solid #965600; outline-offset: 2px; }
#dst-chat-close:focus-visible { outline-color: #fff; }
@media (max-width: 840px) {
  body:has(#pb-mobile:not([hidden])) .dst-chat-launcher { bottom: max(calc(4.3rem + env(safe-area-inset-bottom)), var(--chat-cookie-height, 0px)); }
}
@media (max-width: 500px) {
  .dst-chat { --chat-right: max(.75rem, env(safe-area-inset-right)); --chat-edge: max(.75rem, env(safe-area-inset-bottom)); }
  .dst-chat-dialog { inset-inline: max(.5rem, env(safe-area-inset-left)) max(.5rem, env(safe-area-inset-right)); width: auto; max-height: calc(100dvh - 1.5rem); }
  .dst-chat-launcher { padding: .6rem .85rem; }
}
@media print { .dst-chat { display: none !important; } }
