:root {
  --ilt-chat-right: clamp(16px, 2.2vw, 30px);
  --ilt-chat-bottom: clamp(18px, 2.6dvh, 32px);
  --ilt-chat-button-width: 68px;
  --ilt-chat-button-height: 68px;
  --ilt-chat-icon-size: 62px;
  --ilt-chat-radius: 24px;
  --ilt-chat-shadow: 0 24px 60px rgba(0, 19, 58, 0.26);
}

#sprout-chat-widget-wrapper.chat-widget-container {
  right: var(--ilt-chat-right) !important;
  bottom: var(--ilt-chat-bottom) !important;
  left: auto !important;
  isolation: isolate;
  overflow: visible !important;
  transition:
    transform 0.22s ease,
    filter 0.22s ease,
    width 0.3s ease,
    height 0.3s ease,
    right 0.3s ease,
    bottom 0.3s ease !important;
}

#sprout-chat-widget-wrapper.chat-widget-position-left {
  right: var(--ilt-chat-right) !important;
  left: auto !important;
}

#sprout-chat-widget-wrapper.chat-widget-state-icon,
#sprout-chat-widget-wrapper.chat-widget-state-icon[class*="personas-height"],
#sprout-chat-widget-wrapper.chat-widget-state-icon[class*="grid-width"] {
  width: var(--ilt-chat-button-width) !important;
  height: var(--ilt-chat-button-height) !important;
  border-radius: 999px;
  filter: drop-shadow(0 18px 28px rgba(0, 19, 58, 0.18));
  overflow: visible !important;
}

#sprout-chat-widget-wrapper.chat-widget-state-icon .chat-widget-iframe {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 999px;
  overflow: hidden;
  opacity: 0.001;
  z-index: 3;
  transition:
    transform 0.22s ease,
    filter 0.22s ease !important;
}

#sprout-chat-widget-wrapper.chat-widget-state-icon::before {
  content: "Chat with ILT";
  position: absolute;
  inset: auto;
  z-index: 1;
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 42px;
  right: calc(100% + 10px);
  left: auto;
  top: 50%;
  padding: 0 15px;
  border: 1px solid rgba(0, 35, 102, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 230, 0.98));
  box-shadow: 0 18px 36px rgba(0, 19, 58, 0.18);
  color: #002366;
  font: 900 14px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%) translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

#sprout-chat-widget-wrapper.chat-widget-state-icon::after {
  content: "ilt";
  position: absolute;
  z-index: 2;
  top: calc((var(--ilt-chat-button-height) - var(--ilt-chat-icon-size)) / 2);
  right: calc((var(--ilt-chat-button-width) - var(--ilt-chat-icon-size)) / 2);
  width: var(--ilt-chat-icon-size);
  height: var(--ilt-chat-icon-size);
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 999px;
  background:
    radial-gradient(circle at 82% 82%, #1fbf75 0 5px, #fff 5px 8px, transparent 8.5px),
    linear-gradient(135deg, #ffd500 0%, #ffe56d 100%);
  box-shadow: 0 12px 24px rgba(0, 35, 102, 0.24);
  color: #002366;
  font: 950 25px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.06em;
  pointer-events: none;
}

#sprout-chat-widget-wrapper.chat-widget-state-icon:hover,
#sprout-chat-widget-wrapper.chat-widget-state-icon:focus-within {
  transform: translateY(-2px);
}

#sprout-chat-widget-wrapper.chat-widget-state-icon:hover::before,
#sprout-chat-widget-wrapper.chat-widget-state-icon:focus-within::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

#sprout-chat-widget-wrapper.chat-widget-state-maximized {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--ilt-chat-radius);
  background: #fff;
  box-shadow: var(--ilt-chat-shadow);
  overflow: hidden !important;
}

#sprout-chat-widget-wrapper.chat-widget-state-maximized .chat-widget-iframe {
  border-radius: inherit;
  opacity: 1;
  z-index: auto;
}

#sprout-chat-widget-wrapper.chat-widget-state-maximized::before,
#sprout-chat-widget-wrapper.chat-widget-state-maximized::after,
#sprout-chat-widget-wrapper.chat-widget-state-fullscreen::before,
#sprout-chat-widget-wrapper.chat-widget-state-fullscreen::after {
  display: none;
}

#sprout-chat-widget-wrapper.chat-widget-state-fullscreen {
  right: 0 !important;
  bottom: 0 !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  filter: none;
  overflow: hidden !important;
}

@media (max-width: 560px) {
  :root {
    --ilt-chat-right: 14px;
    --ilt-chat-bottom: 14px;
    --ilt-chat-button-width: 62px;
    --ilt-chat-button-height: 62px;
    --ilt-chat-icon-size: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sprout-chat-widget-wrapper.chat-widget-container,
  #sprout-chat-widget-wrapper .chat-widget-iframe {
    transition: none !important;
  }

  #sprout-chat-widget-wrapper.chat-widget-state-icon:hover,
  #sprout-chat-widget-wrapper.chat-widget-state-icon:focus-within {
    transform: none;
  }
}
