/* Advisory pages: shared L::eS live-chat launcher controlled by agent availability. */
.les-chat-launcher[hidden] { display: none !important; }
/* Placeholder is a CSS pseudo-element: it never becomes part of a chat message. */
.zammad-chat .zammad-chat-input.les-chat-input-empty::before {
  content: attr(data-les-placeholder);
  color: #989da6;
  font: inherit;
  pointer-events: none;
}


/* Dark L::eS Service Desk skin, scoped to the shared Zammad widget.
   Keep Zammad's structural sizing and chat behaviour intact. */
.zammad-chat .zammad-chat-body {
  background: #22272e;
  color: #edf0f3;
  color-scheme: dark;
}
.zammad-chat .zammad-chat-controls {
  background: #272d35;
  color: #edf0f3;
  border-top: 1px solid rgba(184,155,77,.24);
  box-shadow: 0 -1px rgba(255,255,255,.035);
}
.zammad-chat .zammad-chat-input {
  color: #f2f3f5;
  caret-color: #d7be81;
}
.zammad-chat .zammad-chat-input.les-chat-input-empty::before {
  color: #aab0bb;
}
.zammad-chat .zammad-chat-message--agent .zammad-chat-message-body {
  background: #373f49;
  color: #f3f4f6;
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.075);
}
.zammad-chat .zammad-chat-message--customer .zammad-chat-message-body {
  background: #495362;
  color: #ffffff;
  box-shadow: inset 0 1px rgba(255,255,255,.1), 0 0 0 1px rgba(184,155,77,.2);
}
.zammad-chat .zammad-chat-status-inner {
  background: #313942;
  color: #dfe4ea;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.zammad-chat .zammad-chat-timestamp,
.zammad-chat .zammad-chat-status {
  color: #bfc5ce;
}
.zammad-chat .zammad-chat-modal {
  background: #272d35;
  color: #edf0f3;
}
.zammad-chat .zammad-scroll-hint {
  background: #313841;
  color: #e0e4e9;
  border-bottom: 1px solid rgba(184,155,77,.22);
}
.zammad-chat .zammad-scroll-hint-icon {
  fill: #d7be81;
}
.zammad-chat .zammad-chat-loading-circle {
  background: #b6bec8;
}

/* Thin, dark scrollbar with a restrained gold/graphite thumb. */
.zammad-chat .zammad-chat-body,
.zammad-chat .zammad-chat-input {
  scrollbar-width: thin;
  scrollbar-color: #827657 #272d35;
}
.zammad-chat .zammad-chat-body::-webkit-scrollbar,
.zammad-chat .zammad-chat-input::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.zammad-chat .zammad-chat-body::-webkit-scrollbar-track,
.zammad-chat .zammad-chat-input::-webkit-scrollbar-track {
  background: #272d35;
  border-radius: 8px;
}
.zammad-chat .zammad-chat-body::-webkit-scrollbar-thumb,
.zammad-chat .zammad-chat-input::-webkit-scrollbar-thumb {
  background: #827657;
  border-radius: 8px;
}
.zammad-chat .zammad-chat-body::-webkit-scrollbar-thumb:hover,
.zammad-chat .zammad-chat-input::-webkit-scrollbar-thumb:hover {
  background: #b89b4d;
}

/* Hide visually without dismantling the live Zammad widget or chat session. */
.zammad-chat.les-chat-minimized {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.les-chat-launcher {
  position: fixed;
  z-index: 45;
  right: clamp(18px, 3vw, 42px);
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(184,155,77,.50);
  border-radius: 15px;
  color: #f7f7f7;
  background: linear-gradient(150deg,rgba(56,61,69,.46),rgba(30,34,41,.38));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.035), 0 13px 30px rgba(0,0,0,.17);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .015em;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.les-chat-launcher:hover {
  border-color: rgba(211,185,117,.85);
  background: rgba(62,67,76,.56);
}

/* A quiet gold halo signals a new agent reply while the chat is minimized. */
.les-chat-launcher.has-unread:not([hidden]) {
  animation: les-chat-unread-glow 2.7s ease-in-out infinite;
}
.les-chat-launcher.has-unread::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(28,32,39,.95);
  border-radius: 50%;
  background: #d7be81;
}
@keyframes les-chat-unread-glow {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.035), 0 13px 30px rgba(0,0,0,.17);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -1px 0 rgba(255,255,255,.035), 0 13px 30px rgba(0,0,0,.17), 0 0 0 5px rgba(184,155,77,.15), 0 0 17px rgba(184,155,77,.13);
  }
}
.les-chat-launcher:focus-visible { outline: 2px solid #edc860; outline-offset: 4px; }
.les-chat-launcher:active { transform: scale(.98); }
.les-chat-launcher:disabled { cursor: progress; opacity: .75; }
.les-chat-launcher.is-error { border-color: rgba(255,255,255,.35); }
.les-chat-launcher svg {
  width: 23px;
  height: 23px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.les-chat-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 700px) {
  .les-chat-launcher {
    right: 18px;
    bottom: calc(152px + env(safe-area-inset-bottom,0px));
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .les-chat-launcher.has-unread { animation: none; }
  .les-chat-launcher { transition: none; }
  .les-chat-launcher:active { transform: none; }
}
