.support-chat-launcher {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: max(24px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 28px;
  background: #275b4b;
  color: #fff;
  box-shadow: 0 8px 26px rgba(20, 45, 36, .25);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.support-chat-launcher:hover { background: #1f493c; box-shadow: 0 10px 30px rgba(20, 45, 36, .32); transform: translateY(-2px); }
.support-chat-launcher:focus-visible,
.support-chat-close:focus-visible,
.support-chat-send:focus-visible { outline: 3px solid #e0a65f; outline-offset: 3px; }
.support-chat-launcher svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.support-chat-panel {
  position: fixed;
  z-index: 81;
  right: 24px;
  bottom: 92px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(610px, calc(100dvh - 120px));
  min-height: 380px;
  overflow: hidden;
  border: 1px solid #d9dedb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(20, 30, 25, .24);
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .18s ease;
}
.support-chat-panel.is-open { opacity: 1; transform: translateY(0) scale(1); }
.support-chat-panel[hidden] { display: none !important; }
.support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  background: #275b4b;
  color: #fff;
}
.support-chat-header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.support-chat-presence { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #a4d8a7; box-shadow: 0 0 0 3px rgba(255,255,255,.16); }
.support-chat-header h2 { margin: 0; font-size: 15px; line-height: 1.3; }
.support-chat-header p { margin: 3px 0 0; color: rgba(255,255,255,.8); font-size: 11px; }
.support-chat-close { flex: 0 0 34px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 25px; line-height: 1; cursor: pointer; }
.support-chat-close:hover { background: rgba(255,255,255,.14); }
.support-chat-content { display: flex; flex: 1; min-height: 0; flex-direction: column; padding: 16px; }
.support-chat-intro { align-self: flex-start; max-width: 90%; margin: 0 0 14px; padding: 10px 12px; border-radius: 2px 10px 10px 10px; background: #f0f4f1; color: #26352e; font-size: 13px; line-height: 1.45; }
.support-chat-form { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 10px; overflow-y: auto; padding-right: 2px; }
.support-chat-form label { display: flex; flex-direction: column; gap: 4px; color: #313a35; font-size: 11px; font-weight: 700; }
.support-chat-form label span { display: inline; color: #737a75; font-weight: 400; }
.support-chat-form input,
.support-chat-form textarea,
.support-chat-reply textarea { width: 100%; border: 1px solid #d8ded9; border-radius: 6px; background: #fff; color: #202722; font: inherit; font-size: 13px; padding: 9px 10px; }
.support-chat-form input { min-height: 37px; }
.support-chat-form textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
.support-chat-form input:focus,
.support-chat-form textarea:focus,
.support-chat-reply textarea:focus { outline: 2px solid #84ac9b; outline-offset: 1px; }
.support-chat-privacy { margin: 0; color: #6b726d; font-size: 10px; line-height: 1.4; }
.support-chat-privacy a { color: #315e50; }
.support-chat-form .btn { min-height: 42px; width: 100%; margin-top: auto; }
.support-chat-error { margin: 0; color: #a32323; font-size: 12px; line-height: 1.4; }
.support-chat-thread { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.support-chat-ticket-meta { display: flex; justify-content: space-between; gap: 10px; padding: 0 0 10px; color: #5d665f; font-size: 11px; }
.support-chat-ticket-meta strong { color: #344d40; }
.support-chat-messages { display: flex; flex: 1; min-height: 100px; flex-direction: column; gap: 10px; overflow-y: auto; padding: 4px 3px 12px 0; overscroll-behavior: contain; }
.support-chat-message { align-self: flex-start; max-width: 88%; border-radius: 2px 10px 10px 10px; background: #f0f4f1; padding: 9px 11px; }
.support-chat-message-customer { align-self: flex-end; border-radius: 10px 2px 10px 10px; background: #e5f0eb; }
.support-chat-message-meta { margin: 0 0 5px; color: #6b746e; font-size: 10px; }
.support-chat-message p { margin: 0; color: #253129; font-size: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-chat-reply { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: end; gap: 8px; border-top: 1px solid #e4e8e5; padding-top: 11px; }
.support-chat-reply textarea { min-height: 42px; max-height: 105px; resize: vertical; line-height: 1.4; }
.support-chat-send { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 7px; background: #275b4b; color: #fff; cursor: pointer; }
.support-chat-send:hover { background: #1f493c; }
.support-chat-send:disabled { opacity: .55; cursor: wait; }
.support-chat-send svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) {
  .support-chat-launcher { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); min-height: 50px; }
  .support-chat-panel { right: 8px; bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); height: min(76dvh, 620px); min-height: 360px; transform-origin: bottom right; }
}
@media (prefers-reduced-motion: reduce) {
  .support-chat-launcher, .support-chat-panel { transition: none; }
}
