
:root {
  --shls-green-dark: #0E2E14;
  --shls-green: #144C29;
  --shls-green-soft: #1F6A3D;
  --shls-gold: #A88928;
  --shls-ivory: #FBF8F0;
  --shls-text: #1B1F1D;
  --shls-muted: #6F7772;
  --shls-line: #E4E8E5;
  --shls-shadow: 0 18px 55px rgba(14, 46, 20, .22);
}

.shls-chat,
.shls-chat * {
  box-sizing: border-box;
}

.shls-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--shls-text);
}

.shls-chat__launcher {
  position: relative;
  min-width: 238px;
  height: 66px;
  padding: 0 24px 0 18px;
  border: 1px solid rgba(168, 137, 40, .82);
  border-radius: 999px;
  background: linear-gradient(145deg, var(--shls-green-soft), var(--shls-green-dark));
  box-shadow: 0 12px 28px rgba(14, 46, 20, .32);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: shls-launcher-shake 5.2s ease-in-out infinite;
}

.shls-chat__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(14, 46, 20, .38);
}

.shls-chat__launcher svg {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  fill: white;
}

.shls-chat__launcher-text {
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .01em;
}

.shls-chat__launcher-lines {
  fill: none;
  stroke: var(--shls-green-dark);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.shls-chat__launcher-pulse {
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(168, 137, 40, .52);
  border-radius: 999px;
  animation: shls-pulse 2.1s infinite;
  pointer-events: none;
}

@keyframes shls-pulse {
  0% { transform: scale(.92); opacity: .65; }
  70% { transform: scale(1.16); opacity: 0; }
  100% { opacity: 0; }
}

@keyframes shls-launcher-shake {
  0%, 78%, 100% { transform: translateX(0) rotate(0); }
  80% { transform: translateX(-3px) rotate(-1deg); }
  82% { transform: translateX(4px) rotate(1deg); }
  84% { transform: translateX(-4px) rotate(-1deg); }
  86% { transform: translateX(3px) rotate(.8deg); }
  88% { transform: translateX(-2px) rotate(-.5deg); }
  90% { transform: translateX(0) rotate(0); }
}

.shls-chat__panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 370px;
  height: min(620px, calc(100vh - 120px));
  min-height: 480px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shls-shadow);
  border: 1px solid rgba(20, 76, 41, .11);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.shls-chat.is-open .shls-chat__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.shls-chat.is-open .shls-chat__launcher {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.shls-chat__header {
  padding: 17px 18px;
  background:
    radial-gradient(circle at 85% 10%, rgba(168, 137, 40, .18), transparent 35%),
    linear-gradient(135deg, var(--shls-green-dark), var(--shls-green));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
}

.shls-chat__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.shls-chat__avatar,
.shls-chat__mini-avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: .4px;
}

.shls-chat__avatar {
  width: 46px;
  height: 46px;
  background: var(--shls-ivory);
  color: var(--shls-green-dark);
  border: 2px solid rgba(168, 137, 40, .8);
  font-size: 14px;
}

.shls-chat__title {
  font-weight: 750;
  font-size: 16px;
  line-height: 1.2;
}

.shls-chat__subtitle {
  margin-top: 5px;
  font-size: 12.5px;
  opacity: .88;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shls-chat__online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #70E39A;
  box-shadow: 0 0 0 3px rgba(112, 227, 154, .13);
}

.shls-chat__close {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 31px;
  line-height: 1;
  opacity: .88;
  cursor: pointer;
  border-radius: 10px;
}

.shls-chat__close:hover {
  background: rgba(255,255,255,.1);
}

.shls-chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 17px 16px 12px;
  background:
    linear-gradient(rgba(251, 248, 240, .55), rgba(255,255,255,.82)),
    #fff;
}

.shls-chat__agent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 2px 8px;
  color: var(--shls-muted);
  font-size: 13px;
}

.shls-chat__mini-avatar {
  width: 26px;
  height: 26px;
  background: var(--shls-green);
  color: #fff;
  font-size: 9px;
  border: 1px solid rgba(168, 137, 40, .55);
}

.shls-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.shls-chat__message {
  max-width: 84%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.52;
  word-break: break-word;
}

.shls-chat__message--agent {
  align-self: flex-start;
  background: #F0F3F1;
  border-bottom-left-radius: 6px;
}

.shls-chat__message--customer {
  align-self: flex-end;
  background: var(--shls-green);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.shls-chat__message--system {
  align-self: center;
  max-width: 94%;
  text-align: center;
  background: #FFF8E8;
  color: #725D1D;
  border: 1px solid #F0E0AE;
  font-size: 12px;
  padding: 8px 10px;
}

.shls-chat__quick-replies {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 11px;
}

.shls-chat__quick-btn {
  appearance: none;
  border: 1px solid var(--shls-green);
  color: var(--shls-green-dark);
  background: #fff;
  border-radius: 12px;
  padding: 9px 13px;
  font-weight: 650;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.shls-chat__quick-btn:hover {
  background: var(--shls-green);
  color: #fff;
  transform: translateY(-1px);
}

.shls-chat__powered {
  margin: 26px 0 4px;
  text-align: center;
  color: #9AA09C;
  font-size: 11.5px;
}

.shls-chat__powered::before {
  content: "✦";
  color: var(--shls-gold);
  margin-right: 5px;
}

.shls-chat__composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--shls-line);
  background: #fff;
  padding: 11px 10px 11px 14px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.shls-chat__input {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  max-height: 96px;
  min-height: 38px;
  padding: 9px 2px;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  background: transparent;
  color: var(--shls-text);
}

.shls-chat__input::placeholder {
  color: #9AA09C;
}

.shls-chat__send {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--shls-green);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

.shls-chat__send:hover {
  background: var(--shls-green-soft);
  transform: translateY(-1px);
}

.shls-chat__send svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

@media (max-width: 600px) {
  .shls-chat {
    right: 14px;
    bottom: 14px;
  }

  .shls-chat__launcher {
    min-width: 0;
    width: auto;
    max-width: calc(100vw - 28px);
    height: 60px;
    padding: 0 18px 0 15px;
    gap: 9px;
  }

  .shls-chat__launcher svg {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .shls-chat__launcher-text {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .shls-chat__panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    height: min(74vh, 620px);
    min-height: 430px;
    border-radius: 18px;
    transform-origin: bottom center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shls-chat__launcher-pulse,
  .shls-chat__launcher {
    animation: none;
  }
  .shls-chat__panel,
  .shls-chat__launcher,
  .shls-chat__quick-btn,
  .shls-chat__send {
    transition: none;
  }
}


.shls-chat__avatar img,
.shls-chat__mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shls-chat__avatar img {
  padding: 4px;
}

.shls-chat__mini-avatar img {
  padding: 2px;
}

.shls-chat__send:disabled,
.shls-chat__input:disabled {
  opacity: .62;
  cursor: wait;
}

.shls-chat__launcher-badge{position:absolute;top:-4px;right:-4px;min-width:23px;height:23px;padding:0 6px;border-radius:999px;background:#d92727;color:#fff;border:2px solid #fff;font-size:11px;font-weight:900;line-height:19px;text-align:center;z-index:2}.shls-chat__launcher-badge[hidden]{display:none!important}


/* v0.3.5 launcher: circular chat icon on the left + configurable label around it */
.shls-chat {
  left: 22px;
  right: auto;
  bottom: 22px;
}

.shls-chat__launcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.shls-chat__launcher {
  position: relative;
  width: 82px;
  height: 82px;
  min-width: 82px;
  padding: 0;
  border: 3px solid #d7b34a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #23854b 0%, var(--shls-green) 45%, var(--shls-green-dark) 100%);
  box-shadow: 0 12px 28px rgba(14,46,20,.34), inset 0 1px 0 rgba(255,255,255,.22);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: shls-launcher-shake 5.2s ease-in-out infinite;
  z-index: 2;
}

.shls-chat__launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 34px rgba(14,46,20,.4), inset 0 1px 0 rgba(255,255,255,.22);
}

.shls-chat__launcher svg {
  width: 43px;
  height: 43px;
  flex: none;
  fill: #fff;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.12));
}

.shls-chat__launcher-lines {
  fill: none;
  stroke: var(--shls-green-dark);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.shls-chat__launcher-text {
  position: absolute;
  z-index: 1;
  width: max-content;
  max-width: 230px;
  min-height: 42px;
  padding: 9px 18px;
  border: 2px solid #d7b34a;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--shls-green-soft), var(--shls-green-dark));
  box-shadow: 0 8px 20px rgba(14,46,20,.25);
  color: #fff;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .01em;
  pointer-events: none;
}

.shls-chat--text-right .shls-chat__launcher-text { left: 68px; top: 50%; transform: translateY(-50%); padding-left: 22px; }
.shls-chat--text-left .shls-chat__launcher-text { right: 68px; top: 50%; transform: translateY(-50%); padding-right: 22px; }
.shls-chat--text-top .shls-chat__launcher-text { left: 50%; bottom: 70px; transform: translateX(-50%); }
.shls-chat--text-bottom .shls-chat__launcher-text { left: 50%; top: 70px; transform: translateX(-50%); }

.shls-chat__launcher-pulse {
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(215,179,74,.62);
  border-radius: 50%;
  animation: shls-pulse 2.1s infinite;
  pointer-events: none;
}

.shls-chat__panel {
  left: 0;
  right: auto;
  bottom: 98px;
  transform-origin: bottom left;
}

.shls-chat.is-open .shls-chat__launcher-wrap {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 600px) {
  .shls-chat { left: 14px; right: auto; bottom: 14px; }
  .shls-chat__launcher { width: 74px; height: 74px; min-width: 74px; }
  .shls-chat__launcher svg { width: 39px; height: 39px; }
  .shls-chat__launcher-text { max-width: min(210px, calc(100vw - 108px)); min-height: 38px; padding: 8px 14px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .shls-chat--text-right .shls-chat__launcher-text { left: 61px; padding-left: 20px; }
  .shls-chat--text-left .shls-chat__launcher-text { right: 61px; padding-right: 20px; }
  .shls-chat--text-top .shls-chat__launcher-text { bottom: 63px; max-width: min(210px, calc(100vw - 28px)); }
  .shls-chat--text-bottom .shls-chat__launcher-text { top: 63px; max-width: min(210px, calc(100vw - 28px)); }
  .shls-chat__panel { left: 10px; right: 10px; }
}



/* v0.3.6 launcher polish: supplied icon + more breathing room from viewport edges */
.shls-chat {
  left: 30px;
  bottom: 32px;
}

.shls-chat__launcher {
  width: 86px;
  height: 86px;
  min-width: 86px;
  border: 0;
  background: transparent;
  box-shadow: 0 14px 30px rgba(14,46,20,.26);
  overflow: visible;
}

.shls-chat__launcher-icon {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.18));
}

.shls-chat__launcher svg { display: none; }

.shls-chat__launcher-pulse {
  inset: -8px;
  border-color: rgba(215,179,74,.52);
}

/* Keep a real gap between the round icon and the text label. */
.shls-chat--text-right .shls-chat__launcher-text { left: 96px; padding-left: 18px; }
.shls-chat--text-left .shls-chat__launcher-text { right: 96px; padding-right: 18px; }
.shls-chat--text-top .shls-chat__launcher-text { bottom: 100px; }
.shls-chat--text-bottom .shls-chat__launcher-text { top: 100px; }

/* When label is below, reserve extra bottom clearance so the label never hugs the screen edge. */
.shls-chat.shls-chat--text-bottom { bottom: 88px; }

.shls-chat__panel { bottom: 112px; }

@media (max-width: 600px) {
  .shls-chat {
    left: 22px;
    bottom: 28px;
  }

  .shls-chat__launcher {
    width: 78px;
    height: 78px;
    min-width: 78px;
  }

  .shls-chat__launcher-icon {
    width: 78px;
    height: 78px;
  }

  .shls-chat--text-right .shls-chat__launcher-text { left: 88px; padding-left: 15px; }
  .shls-chat--text-left .shls-chat__launcher-text { right: 88px; padding-right: 15px; }
  .shls-chat--text-top .shls-chat__launcher-text { bottom: 90px; }
  .shls-chat--text-bottom .shls-chat__launcher-text { top: 90px; }

  .shls-chat.shls-chat--text-bottom { bottom: 82px; }

  .shls-chat__panel {
    left: 10px;
    right: 10px;
    bottom: 16px;
  }
}

/* v0.3.7 launcher layout polish: exact supplied icon + true breathing room */
.shls-chat {
  left: 48px !important;
  right: auto !important;
  bottom: 42px !important;
}

.shls-chat__launcher-wrap {
  width: 96px;
  height: 96px;
  overflow: visible !important;
}

.shls-chat__launcher {
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: 0 12px 30px rgba(14,46,20,.30) !important;
  overflow: hidden !important;
}

.shls-chat__launcher-icon {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  filter: none !important;
}

.shls-chat__launcher-pulse {
  inset: -9px !important;
  border: 2px solid rgba(215,179,74,.44) !important;
  border-radius: 50% !important;
}

.shls-chat__launcher-text {
  min-height: 40px !important;
  padding: 9px 18px !important;
  border: 2px solid #d7b34a !important;
  border-radius: 999px !important;
  background: linear-gradient(145deg, #1f6a3d, #0e2e14) !important;
  box-shadow: 0 8px 20px rgba(14,46,20,.24) !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
}

/* More distance between icon and text. */
.shls-chat--text-right .shls-chat__launcher-text {
  left: 112px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  padding-left: 18px !important;
}
.shls-chat--text-left .shls-chat__launcher-text {
  right: 112px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  padding-right: 18px !important;
}
.shls-chat--text-top .shls-chat__launcher-text {
  left: 50% !important;
  bottom: 114px !important;
  transform: translateX(-50%) !important;
}
.shls-chat--text-bottom .shls-chat__launcher-text {
  left: 50% !important;
  top: 114px !important;
  transform: translateX(-50%) !important;
}

/* Absolute labels do not contribute to fixed-root height, so reserve explicit viewport clearance. */
.shls-chat.shls-chat--text-bottom {
  bottom: calc(116px + env(safe-area-inset-bottom, 0px)) !important;
}
.shls-chat.shls-chat--text-top,
.shls-chat.shls-chat--text-left,
.shls-chat.shls-chat--text-right {
  bottom: calc(44px + env(safe-area-inset-bottom, 0px)) !important;
}

.shls-chat__panel {
  left: 0 !important;
  right: auto !important;
  bottom: 118px !important;
  transform-origin: bottom left !important;
}

@media (max-width: 600px) {
  .shls-chat {
    left: 42px !important;
    right: auto !important;
    bottom: calc(34px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .shls-chat__launcher-wrap {
    width: 84px;
    height: 84px;
  }

  .shls-chat__launcher {
    width: 84px !important;
    height: 84px !important;
    min-width: 84px !important;
  }

  .shls-chat__launcher-text {
    min-height: 38px !important;
    padding: 8px 15px !important;
    font-size: 13px !important;
    max-width: min(210px, calc(100vw - 34px)) !important;
  }

  .shls-chat--text-right .shls-chat__launcher-text { left: 98px !important; }
  .shls-chat--text-left .shls-chat__launcher-text { right: 98px !important; }
  .shls-chat--text-top .shls-chat__launcher-text { bottom: 100px !important; }
  .shls-chat--text-bottom .shls-chat__launcher-text { top: 100px !important; }

  .shls-chat.shls-chat--text-bottom {
    bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .shls-chat.shls-chat--text-top,
  .shls-chat.shls-chat--text-left,
  .shls-chat.shls-chat--text-right {
    bottom: calc(36px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .shls-chat__panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
  }
}

/* v0.3.8: administrator-controlled launcher offsets (px).
   X = distance from left edge to the round button.
   Y = breathing room from the bottom edge to the lowest visible part of the widget. */
.shls-chat {
  left: var(--shls-launcher-x, 90px) !important;
  right: auto !important;
}

.shls-chat.shls-chat--text-bottom {
  bottom: calc(var(--shls-launcher-y, 44px) + 72px + env(safe-area-inset-bottom, 0px)) !important;
}

.shls-chat.shls-chat--text-top,
.shls-chat.shls-chat--text-left,
.shls-chat.shls-chat--text-right {
  bottom: calc(var(--shls-launcher-y, 44px) + env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 600px) {
  .shls-chat {
    left: var(--shls-launcher-x, 90px) !important;
    right: auto !important;
  }

  .shls-chat.shls-chat--text-bottom {
    bottom: calc(var(--shls-launcher-y, 44px) + 66px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .shls-chat.shls-chat--text-top,
  .shls-chat.shls-chat--text-left,
  .shls-chat.shls-chat--text-right {
    bottom: calc(var(--shls-launcher-y, 44px) + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* v0.3.10: refined attention motion — visible, calm and premium. */
.shls-chat__launcher-wrap::before,
.shls-chat__launcher-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.shls-chat__launcher-wrap::before {
  inset: -9px;
  border: 2px solid rgba(215,179,74,.34);
  box-shadow: 0 0 16px rgba(215,179,74,.20);
  animation: shls-refined-ring 3.8s ease-out infinite;
}

.shls-chat__launcher-wrap::after {
  inset: -16px;
  border: 1px solid rgba(215,179,74,.18);
  opacity: 0;
  animation: shls-refined-ring-outer 3.8s ease-out infinite;
}

.shls-chat__launcher-icon {
  animation: shls-refined-icon 3.8s ease-in-out infinite;
  transform-origin: 50% 50%;
}

.shls-chat__launcher-text {
  animation: shls-refined-label 3.8s ease-in-out infinite;
}

@keyframes shls-refined-ring {
  0%, 58%, 100% { opacity: .20; transform: scale(.98); }
  68% { opacity: .58; transform: scale(1.045); }
  80% { opacity: .16; transform: scale(1.10); }
}

@keyframes shls-refined-ring-outer {
  0%, 62%, 100% { opacity: 0; transform: scale(.94); }
  70% { opacity: .32; transform: scale(1.02); }
  84% { opacity: 0; transform: scale(1.14); }
}

@keyframes shls-refined-icon {
  0%, 58%, 100% {
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1) drop-shadow(0 4px 9px rgba(0,0,0,.16));
  }
  67% {
    transform: translateY(-2px) scale(1.025);
    filter: brightness(1.06) saturate(1.04) drop-shadow(0 0 9px rgba(235,198,79,.42));
  }
  75% { transform: translateY(0) scale(1); }
}

@keyframes shls-refined-label {
  0%, 58%, 100% {
    box-shadow: 0 8px 20px rgba(14,46,20,.24);
    border-color: #d7b34a;
    filter: brightness(1);
  }
  68% {
    box-shadow: 0 8px 21px rgba(14,46,20,.27), 0 0 9px rgba(215,179,74,.25);
    border-color: #e4c35c;
    filter: brightness(1.035);
  }
  80% {
    box-shadow: 0 8px 20px rgba(14,46,20,.24);
    border-color: #d7b34a;
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shls-chat__launcher-wrap::before,
  .shls-chat__launcher-wrap::after,
  .shls-chat__launcher-icon,
  .shls-chat__launcher-text {
    animation: none !important;
  }
}


/* v0.3.11: visitor draggable launcher (mouse + touch/pointer). */
.shls-chat__launcher-wrap,
.shls-chat__launcher,
.shls-chat__launcher-text {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.shls-chat__launcher-wrap {
  cursor: grab;
}

.shls-chat.is-dragging-launcher .shls-chat__launcher-wrap,
.shls-chat.is-dragging-launcher .shls-chat__launcher,
.shls-chat.is-dragging-launcher .shls-chat__launcher-text {
  cursor: grabbing !important;
}

/* Pause attention animation during dragging so the widget tracks the finger precisely. */
.shls-chat.is-dragging-launcher .shls-chat__launcher-wrap::before,
.shls-chat.is-dragging-launcher .shls-chat__launcher-wrap::after,
.shls-chat.is-dragging-launcher .shls-chat__launcher-icon,
.shls-chat.is-dragging-launcher .shls-chat__launcher-text,
.shls-chat.is-dragging-launcher .shls-chat__launcher {
  animation-play-state: paused !important;
}


/* v0.3.12: reliable click + drag interaction on desktop and mobile. */
.shls-chat__launcher-wrap {
  touch-action: none;
}

/* The label is also an interactive part of the launcher, so it can be clicked/dragged. */
.shls-chat__launcher-text {
  pointer-events: auto !important;
  cursor: grab;
}

.shls-chat__launcher,
.shls-chat__launcher-icon {
  -webkit-user-drag: none;
}

.shls-chat.is-dragging-launcher .shls-chat__launcher-text {
  cursor: grabbing !important;
}

/* Prevent the desktop panel from inheriting launcher transforms/positioning after drag. */
@media (min-width: 601px) {
  .shls-chat.is-open .shls-chat__panel {
    transform-origin: center !important;
  }
}


/* v0.3.14: mobile viewport safety.
   Keep the whole draggable launcher (round icon + label) inside the viewport
   and prevent the widget itself from creating horizontal page overflow. */
.shls-chat {
  max-width: calc(100vw - 16px) !important;
}

.shls-chat__launcher-wrap {
  max-width: calc(100vw - 16px) !important;
}

.shls-chat__launcher-text {
  max-width: min(230px, calc(100vw - 118px)) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 600px) {
  .shls-chat__launcher-text {
    max-width: min(210px, calc(100vw - 116px)) !important;
  }

  .shls-chat__panel {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
  }
}
\n\n/* v0.3.15: administrator-selectable bottom-left / bottom-right default corner.\n   The JS converts this CSS default to pixel coordinates after layout, then keeps visitor drag behavior unchanged. */\n.shls-chat.shls-chat--corner-left {\n  left: var(--shls-launcher-x, 90px) !important;\n  right: auto !important;\n}\n\n.shls-chat.shls-chat--corner-right {\n  left: auto !important;\n  right: var(--shls-launcher-x, 90px) !important;\n}\n\n@media (max-width: 600px) {\n  .shls-chat.shls-chat--corner-left {\n    left: var(--shls-launcher-x, 24px) !important;\n    right: auto !important;\n  }\n\n  .shls-chat.shls-chat--corner-right {\n    left: auto !important;\n    right: var(--shls-launcher-x, 24px) !important;\n  }\n}\n\n\n

/* v0.3.23: refined translucent viewport-edge dock handle with stronger chevron.
   The handle stays inside #shls-live-chat-root. While docked, JS pins the ROOT
   itself to left:0/right:0, so the tab cannot drift away or disappear. */
.shls-chat.is-docked-left,
.shls-chat.is-docked-right {
  width: 51px !important;
  height: 120px !important;
  min-width: 51px !important;
  min-height: 120px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.shls-chat__edge-handle {
  position: relative !important;
  inset: auto !important;
  z-index: 2147483647 !important;
  width: 51px !important;
  height: 120px !important;
  min-width: 51px !important;
  min-height: 120px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: rgba(24, 31, 28, .72) !important;
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.16) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent !important;
  backdrop-filter: blur(11px) saturate(112%);
  -webkit-backdrop-filter: blur(11px) saturate(112%);
  transition: background .18s ease, transform .18s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  overflow: hidden !important;
  line-height: 1 !important;
}
.shls-chat__edge-handle[hidden] { display: none !important; }

.shls-chat__edge-handle[data-side="left"] {
  border-radius: 0 18px 18px 0 !important;
}
.shls-chat__edge-handle[data-side="right"] {
  border-radius: 18px 0 0 18px !important;
}

.shls-chat.is-docked-left .shls-chat__launcher-wrap,
.shls-chat.is-docked-right .shls-chat__launcher-wrap,
.shls-chat.is-docked-left .shls-chat__panel,
.shls-chat.is-docked-right .shls-chat__panel { display: none !important; }

/* Chevron is pure CSS geometry (not a font character). */
.shls-chat__edge-chevron {
  display: block !important;
  width: 19px !important;
  height: 19px !important;
  border-top: 4px solid currentColor !important;
  border-right: 4px solid currentColor !important;
  border-radius: 2px !important;
  opacity: .98 !important;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)) !important;
  transform-origin: 50% 50% !important;
}
.shls-chat__edge-handle[data-side="right"] .shls-chat__edge-chevron {
  transform: rotate(-135deg) !important; /* < */
  margin-left: 4px !important;
}
.shls-chat__edge-handle[data-side="left"] .shls-chat__edge-chevron {
  transform: rotate(45deg) !important; /* > */
  margin-right: 4px !important;
}
.shls-chat__edge-handle:hover { background: rgba(24, 31, 28, .84) !important; }
.shls-chat__edge-handle:active { transform: scale(.97) !important; }

@media (max-width:600px) {
  .shls-chat.is-docked-left,
  .shls-chat.is-docked-right {
    width: 36px !important;
    height: 100px !important;
    min-width: 36px !important;
    min-height: 100px !important;
  }
  .shls-chat__edge-handle {
    width: 36px !important;
    min-width: 36px !important;
    height: 100px !important;
    min-height: 100px !important;
    box-shadow: 0 3px 14px rgba(0,0,0,.14) !important;
  }
  .shls-chat__edge-handle[data-side="left"] { border-radius: 0 15px 15px 0 !important; }
  .shls-chat__edge-handle[data-side="right"] { border-radius: 15px 0 0 15px !important; }
  .shls-chat__edge-chevron {
    width: 16px !important;
    height: 16px !important;
    border-top-width: 3.5px !important;
    border-right-width: 3.5px !important;
    border-radius: 1.8px !important;
  }
}



/* v0.3.24: balanced chat panel on iPhone keyboard + lower-right desktop placement.
   - Mobile uses a smaller visual-viewport-aware panel so the composer/send button stays visible.
   - 16px input font prevents Safari focus-zoom.
   - Desktop panel is anchored near the lower-right corner with breathing room. */
@media (min-width: 601px) {
  .shls-chat.is-open .shls-chat__panel {
    position: fixed !important;
    left: auto !important;
    right: 20px !important;
    top: auto !important;
    bottom: 20px !important;
    width: 370px !important;
    max-width: calc(100vw - 40px) !important;
    border-radius: 20px !important;
    transform-origin: bottom right !important;
  }
}

@media (max-width: 600px) {
  .shls-chat.is-open .shls-chat__panel {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    width: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    border-radius: 16px !important;
    transform-origin: bottom center !important;
  }

  .shls-chat__header {
    min-height: 70px !important;
    padding: 11px 13px !important;
  }

  .shls-chat__avatar {
    width: 40px !important;
    height: 40px !important;
  }

  .shls-chat__title { font-size: 15px !important; }
  .shls-chat__subtitle { font-size: 11.5px !important; margin-top: 3px !important; }
  .shls-chat__close { width: 34px !important; height: 34px !important; font-size: 27px !important; }

  .shls-chat__body {
    padding: 12px 12px 8px !important;
    min-height: 0 !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .shls-chat__message {
    max-width: 88% !important;
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    line-height: 1.42 !important;
  }

  .shls-chat__quick-replies {
    gap: 7px !important;
    margin-top: 9px !important;
  }

  .shls-chat__quick-btn {
    padding: 8px 12px !important;
    font-size: 13px !important;
  }

  .shls-chat__powered { margin: 16px 0 2px !important; }

  .shls-chat__composer {
    padding: 8px 8px 8px 12px !important;
    gap: 7px !important;
    min-height: 58px !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
  }

  /* 16px is intentional: iOS Safari will not auto-zoom the page when the textarea receives focus. */
  .shls-chat__input {
    min-height: 40px !important;
    max-height: 78px !important;
    padding: 9px 2px !important;
    font-size: 16px !important;
    line-height: 21px !important;
  }

  .shls-chat__send {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }
}


/* v0.3.27: desktop Edge Dock stays 120px; mobile Edge Dock reduced to 100px.
   Default corner is migrated to the right in PHP. Dragging/docking behavior is unchanged. */
@media (min-width: 601px) {
  .shls-chat.is-docked-left,
  .shls-chat.is-docked-right,
  .shls-chat__edge-handle {
    height: 120px !important;
    min-height: 120px !important;
  }
}

/* v0.3.26: fixed launcher position for visitors.
   Default/admin corner remains right; visitor free dragging is disabled.
   A short swipe toward the right edge still collapses the launcher, and the edge handle restores it. */
.shls-chat:not(.is-docked-left):not(.is-docked-right) {
  top: auto !important;
}
.shls-chat__launcher-wrap,
.shls-chat__launcher,
.shls-chat__launcher-text {
  cursor: pointer !important;
}
.shls-chat.is-dragging-launcher .shls-chat__launcher-wrap,
.shls-chat.is-dragging-launcher .shls-chat__launcher,
.shls-chat.is-dragging-launcher .shls-chat__launcher-text {
  cursor: pointer !important;
}


/* v0.3.27: final Edge Dock dimensions. Fixed-right behavior from v0.3.26 is unchanged. */
@media (max-width: 600px) {
  .shls-chat.is-docked-left,
  .shls-chat.is-docked-right,
  .shls-chat__edge-handle {
    height: 100px !important;
    min-height: 100px !important;
  }
}
@media (min-width: 601px) {
  .shls-chat.is-docked-left,
  .shls-chat.is-docked-right,
  .shls-chat__edge-handle {
    height: 120px !important;
    min-height: 120px !important;
  }
}


/* v0.3.28: hard fixed-right visitor launcher.
   Free dragging remains disabled; Edge Dock still collapses to / restores from the right edge. */
.shls-chat.shls-chat--corner-right:not(.is-docked-left):not(.is-docked-right) {
  left: auto !important;
  right: var(--shls-launcher-x, 90px) !important;
}
@media (max-width: 600px) {
  .shls-chat.shls-chat--corner-right:not(.is-docked-left):not(.is-docked-right) {
    left: auto !important;
    right: var(--shls-launcher-x, 24px) !important;
  }
}


/* v0.3.30: fixed-right launcher keeps a small breathing room from the viewport edge.
   Ignore historical/admin horizontal offsets on the visitor launcher so mobile
   no longer appears near the centre. Edge Dock hide/show remains unchanged. */
.shls-chat.shls-chat--corner-right:not(.is-docked-left):not(.is-docked-right) {
  left: auto !important;
  right: 12px !important;
}
@media (max-width: 600px) {
  .shls-chat.shls-chat--corner-right:not(.is-docked-left):not(.is-docked-right) {
    left: auto !important;
    right: 6px !important;
  }
}


/* v0.3.31: move the fixed-right launcher slightly inward so the icon/text have breathing room and are not visually clipped at the viewport edge. */
.shls-chat.shls-chat--corner-right:not(.is-docked-left):not(.is-docked-right) {
  left: auto !important;
  right: 36px !important;
}
@media (max-width: 600px) {
  .shls-chat.shls-chat--corner-right:not(.is-docked-left):not(.is-docked-right) {
    left: auto !important;
    right: 30px !important;
  }
}
