.le-support-widget,
.le-support-widget * {
  box-sizing: border-box;
}

.le-support-widget {
  --support-accent: #0b7a4b;
  --support-dark: #12311f;
  --support-soft: #eef8f1;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147482000;
  font-family: inherit;
  color: #17251b;
}

.le-support-launcher {
  position: relative;
  isolation: isolate;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: visible;
  background: var(--support-accent);
  color: #fff;
  box-shadow: 0 18px 40px rgba(6, 48, 28, .32);
  cursor: pointer;
  font-size: 25px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.le-support-launcher::before,
.le-support-launcher::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -8px;
  border: 2px solid rgba(54, 224, 119, .7);
  border-radius: inherit;
  pointer-events: none;
  animation: leSupportLauncherLight 2.4s ease-out infinite;
}

.le-support-launcher::after {
  animation-delay: 1.2s;
}

.le-support-widget.is-open .le-support-launcher::before,
.le-support-widget.is-open .le-support-launcher::after {
  opacity: 0;
  animation: none;
}

@keyframes leSupportLauncherLight {
  0% {
    opacity: .85;
    transform: scale(.82);
    box-shadow: 0 0 0 0 rgba(54, 224, 119, .36);
  }
  70% {
    opacity: .08;
  }
  100% {
    opacity: 0;
    transform: scale(1.48);
    box-shadow: 0 0 34px 12px rgba(54, 224, 119, 0);
  }
}

.le-support-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(6, 48, 28, .38);
}

.le-support-launcher-close {
  display: none;
}

.le-support-widget.is-open .le-support-launcher-open {
  display: none;
}

.le-support-widget.is-open .le-support-launcher-close {
  display: inline-flex;
}

.le-support-launcher-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border: 3px solid #fff;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #ef3340;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.le-support-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: min(390px, calc(100vw - 32px));
  height: min(650px, calc(100vh - 125px));
  min-height: 470px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(12, 66, 38, .12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 37, 22, .32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.97);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.le-support-widget.is-open .le-support-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.le-support-header {
  min-height: 78px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .18), transparent 34%),
    linear-gradient(135deg, var(--support-dark), var(--support-accent));
}

.le-support-header-avatar {
  position: relative;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  font-size: 20px;
}

.le-support-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--support-dark);
  border-radius: 50%;
  background: #f0aa22;
}

.le-support-online-dot.is-online {
  background: #43df7f;
}

.le-support-header-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.le-support-header-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.le-support-header-copy span {
  color: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 650;
}

.le-support-header-action {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  cursor: pointer;
}

.le-support-alert {
  padding: 10px 14px;
  border-bottom: 1px solid #f3d5d7;
  background: #fff1f2;
  color: #a12631;
  font-size: 12px;
  font-weight: 750;
}

.le-support-prechat,
.le-support-conversation {
  min-height: 0;
  flex: 1;
}

.le-support-prechat {
  overflow-y: auto;
  padding: 18px;
}

.le-support-welcome {
  margin-bottom: 16px;
  text-align: center;
}

.le-support-welcome-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--support-soft);
  color: var(--support-accent);
  font-size: 22px;
}

.le-support-welcome h3 {
  margin: 0 0 5px;
  color: #102a19;
  font-size: 20px;
}

.le-support-welcome p {
  margin: 0;
  color: #6c776f;
  font-size: 13px;
  line-height: 1.5;
}

.le-support-prechat form {
  display: grid;
  gap: 12px;
}

.le-support-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.le-support-prechat label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.le-support-prechat label > span {
  color: #273c2d;
  font-size: 12px;
  font-weight: 800;
}

.le-support-prechat label small {
  color: #8b958e;
  font-weight: 600;
}

.le-support-prechat input,
.le-support-prechat select,
.le-support-prechat textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9e2da;
  border-radius: 11px;
  outline: 0;
  background: #fbfdfb;
  color: #18291d;
  font: inherit;
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.le-support-prechat input,
.le-support-prechat select {
  height: 43px;
  padding: 0 11px;
}

.le-support-prechat textarea {
  min-height: 86px;
  padding: 10px 11px;
  resize: vertical;
}

.le-support-prechat input:focus,
.le-support-prechat select:focus,
.le-support-prechat textarea:focus {
  border-color: var(--support-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--support-accent) 15%, transparent);
}

.le-support-primary {
  min-height: 45px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--support-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
}

.le-support-primary:disabled,
.le-support-composer button:disabled {
  cursor: wait;
  opacity: .65;
}

.le-support-privacy {
  margin: 0;
  color: #8a938d;
  font-size: 10.5px;
  line-height: 1.45;
  text-align: center;
}

.le-support-conversation {
  display: flex;
  flex-direction: column;
  background: #f5f8f5;
}

.le-support-ticketbar {
  min-height: 52px;
  padding: 9px 13px;
  border-bottom: 1px solid #e4ebe5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}

.le-support-ticketbar > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.le-support-ticketbar span {
  color: #1d3425;
  font-size: 12px;
  font-weight: 900;
}

.le-support-ticketbar small {
  overflow: hidden;
  color: #778078;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.le-support-ticketbar button {
  min-height: 44px;
  border: 1px solid #dbe5dc;
  border-radius: 9px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #526158;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.le-support-messages {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 17px 14px;
  scroll-behavior: smooth;
}

.le-support-message {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.le-support-message.is-visitor {
  align-items: flex-end;
}

.le-support-message.is-system {
  align-items: center;
}

.le-support-message-meta {
  margin: 0 6px 4px;
  color: #8a958d;
  font-size: 9.5px;
  font-weight: 700;
}

.le-support-message-bubble {
  max-width: 82%;
  border: 1px solid #dfe8e1;
  border-radius: 15px 15px 15px 4px;
  padding: 9px 11px;
  background: #fff;
  color: #26372b;
  box-shadow: 0 4px 14px rgba(20, 51, 31, .05);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.le-support-message.is-visitor .le-support-message-bubble {
  border-color: transparent;
  border-radius: 15px 15px 4px 15px;
  background: var(--support-accent);
  color: #fff;
}

.le-support-message.is-system .le-support-message-bubble {
  max-width: 92%;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e6ece7;
  color: #667168;
  box-shadow: none;
  font-size: 10px;
  text-align: center;
}

.le-support-attachment {
  margin-top: 7px;
  border-radius: 9px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0, 0, 0, .06);
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.le-support-closed {
  padding: 12px 14px;
  border-top: 1px solid #e1e8e2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #fff8e8;
  color: #6e5a2d;
  text-align: center;
}

.le-support-closed strong {
  font-size: 12px;
}

.le-support-closed span {
  font-size: 10px;
}

.le-support-closed button {
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: var(--support-accent);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  text-decoration: underline;
}

.le-support-composer {
  padding: 10px 11px 8px;
  border-top: 1px solid #e1e9e2;
  background: #fff;
}

.le-support-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.le-support-attach {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eff4f0;
  color: #526159;
  cursor: pointer;
}

.le-support-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.le-support-compose-row textarea {
  min-height: 38px;
  max-height: 92px;
  flex: 1;
  border: 1px solid #dce6de;
  border-radius: 12px;
  padding: 9px 10px;
  outline: 0;
  resize: none;
  color: #203126;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.4;
}

.le-support-compose-row textarea:focus {
  border-color: var(--support-accent);
}

.le-support-compose-row button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--support-accent);
  color: #fff;
  cursor: pointer;
}

.le-support-composer > small {
  margin: 5px 3px 0;
  display: block;
  color: #99a19b;
  font-size: 9px;
}

.le-support-file-preview {
  margin-bottom: 7px;
  border-radius: 9px;
  padding: 7px 9px;
  background: #edf4ee;
  color: #536259;
  font-size: 10px;
  font-weight: 800;
}

.le-support-powered {
  min-height: 29px;
  border-top: 1px solid #edf1ed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  color: #9ba39d;
  font-size: 9px;
  font-weight: 700;
}

.le-support-widget [hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .le-support-widget {
    right: 14px;
    bottom: 14px;
  }

  .le-support-launcher {
    width: 58px;
    height: 58px;
  }

  .le-support-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    transform: translateY(20px);
  }

  .le-support-widget.is-open .le-support-panel {
    transform: translateY(0);
  }

  .le-support-widget.is-open .le-support-launcher {
    display: none;
  }

  .le-support-header {
    padding-top: max(15px, env(safe-area-inset-top));
  }

  .le-support-field-row {
    grid-template-columns: 1fr;
  }
}

/* Compact widget shell, agent photos and proactive floating invitation */
.le-support-panel {
  height: min(570px, calc(100dvh - 116px));
  max-height: calc(100dvh - 116px);
  min-height: 430px;
  padding: 0 !important;
}

.le-support-panel > .le-support-header {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  flex: 0 0 70px;
  min-height: 70px;
  margin: 0 !important;
  transform: none !important;
}

.le-support-header-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.le-support-header-avatar img:not([hidden]) + [data-support-agent-fallback] {
  display: none;
}

.le-support-conversation {
  min-height: 0;
  overflow: hidden;
}

.le-support-powered {
  flex: 0 0 20px;
  min-height: 20px;
  font-size: 8px;
}

.le-support-teaser {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(305px, calc(100vw - 92px));
  min-height: 72px;
  border: 1px solid rgba(17, 91, 52, .14);
  border-radius: 18px;
  padding: 11px 34px 11px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #183222;
  box-shadow: 0 18px 48px rgba(10, 47, 27, .24);
  cursor: pointer;
  font: inherit;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.le-support-teaser.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.le-support-widget.is-open .le-support-teaser {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.le-support-teaser::after {
  content: '';
  position: absolute;
  right: 23px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(17, 91, 52, .14);
  border-bottom: 1px solid rgba(17, 91, 52, .14);
  background: #fff;
  transform: rotate(45deg);
}

.le-support-teaser-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--support-soft);
  color: var(--support-accent);
  font-size: 18px;
}

.le-support-teaser-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.le-support-teaser-copy strong {
  color: #15311f;
  font-size: 13px;
  font-weight: 900;
}

.le-support-teaser-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #68766d;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.le-support-teaser-close {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #59675f;
  font-size: 11px;
  cursor: pointer;
}

.le-support-message.is-agent {
  position: relative;
  padding-left: 30px;
}

.le-support-message-agent-avatar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #deece1;
  color: #267548;
  font-size: 8px;
  font-weight: 900;
}

.le-support-message-agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 600px) {
  .le-support-panel {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
  }

  .le-support-teaser {
    right: 0;
    bottom: 72px;
    width: min(300px, calc(100vw - 82px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .le-support-launcher::before,
  .le-support-launcher::after {
    animation: none;
    opacity: 0;
  }
}


/* Lighthouse accessibility: comfortable mobile touch targets and spacing. */
@media (max-width: 600px) {
  .le-support-launcher {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
  }

  .le-support-teaser {
    bottom: 92px;
  }

  .le-support-teaser-close {
    top: 4px;
    right: 4px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }
}


/* Lighthouse accessibility follow-up: keep teaser controls as separate,
   non-overlapping touch targets. */
.le-support-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 0;
  padding: 6px;
  cursor: default;
}

.le-support-teaser-main {
  min-width: 0;
  min-height: 60px;
  padding: 5px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.le-support-teaser-main:focus-visible,
.le-support-teaser-close:focus-visible,
.le-support-launcher:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.le-support-teaser-close {
  position: static;
  z-index: 2;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin: 0 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4ee;
  color: #314b39;
  font-size: 13px;
  cursor: pointer;
}

.le-support-teaser-close:hover {
  background: #dfeae1;
}

@media (max-width: 600px) {
  .le-support-launcher {
    width: 68px;
    height: 68px;
    min-width: 68px;
    min-height: 68px;
  }

  .le-support-teaser {
    bottom: 112px;
    width: min(310px, calc(100vw - 92px));
  }
}
