.wchat-content {
  position: fixed;
  overflow: visible;
  z-index: 9999;
}
.wchat-content * {
  box-sizing: border-box;
}
.button-tooltip {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cta-position-right {
  right: 0;
  left: auto;
}

.cta-position-left {
  left: 0;
  right: auto;
}

/* CTA tooltip */
.wp-cta-tooltip {
  visibility: visible;
  font-family: Inter, sans-serif;
  opacity: 1;
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 4px);
  left: 50%;
  pointer-events: none;
  white-space: normal !important;
  text-decoration: none;
  min-width: 50px;
  max-width: 250px;
  width: max-content;
  background-color: #fff;
  text-align: center;
  transform: translate(-50%, -5px);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(52, 52, 52, 0.15);
  color: #000;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px 20px;
  font-weight: 600;
  transition: all 0.1s ease-in-out;
  word-break: break-word;
  filter: drop-shadow(0 2px 5px #34343426);
}
.wp-cta-tooltip p {
  white-space: nowrap;
}
.wp-cta-tooltip p + p {
  padding-top: 5px !important;
}
.wp-cta-tooltip:after {
  bottom: calc(100% + 5px);
  content: "";
  border-style: solid;
  border-width: 5px 5px 0;
  border-color: var(--tooltip-bg) transparent transparent transparent;
  transform-origin: top;
  transform: translate(-50%, -25px);
  text-decoration: none;
  position: absolute;
  transition: all 0.1s ease-in-out;
}
[data-tooltip-dir="left"] .wp-cta-tooltip:after {
  left: calc(100% + 4px);
  bottom: 50%;
}
[data-tooltip-dir="left"] .wp-cta-tooltip {
  right: calc(100% + 5px);
}
[data-tooltip-dir="left"] .wp-cta-tooltip {
  left: auto;
  bottom: 50%;
}

[data-tooltip-dir="left"] .wp-cta-tooltip {
  transform: translate(-10px, 50%);
}

[data-tooltip-dir="left"] .wp-cta-tooltip:after {
  border-width: 5px 0px 5px 11px;
  border-color: transparent transparent transparent var(--tooltip-bg);
  transform-origin: left;
  transform: translate(-4px, 50%);
}

[data-tooltip-dir="right"] .wp-cta-tooltip {
  left: calc(100% + 5px);
  bottom: 50%;
}
[data-tooltip-dir="right"] .wp-cta-tooltip:after {
  right: calc(100% + 4px);
  bottom: 50%;
}
[data-tooltip-dir="right"] .wp-cta-tooltip {
  transform: translate(10px, 50%);
}
[data-tooltip-dir="right"] .wp-cta-tooltip:after {
  border-width: 5px 11px 5px 0px;
  border-color: transparent var(--tooltip-bg) transparent transparent;
  transform-origin: right;
  transform: translate(4px, 50%);
}

.widget-cta-icon {
  position: relative;
  width: 56px;
  height: 56px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: rgba(0, 0, 0, 0.15) 0px 10px 25px;
  cursor: pointer;
}

.attention-gelatine {
  animation: qdp-gelatine 0.5s infinite;
}
@keyframes qdp-gelatine {
  from,
  to {
    transform: scale(1, 1);
  }
  25% {
    transform: scale(0.9, 1.1);
  }
  50% {
    transform: scale(1.1, 0.9);
  }
  75% {
    transform: scale(0.95, 1.05);
  }
}

.attention-spin {
  animation: 3s infinite qdp-elastic-spin;
}
@keyframes qdp-elastic-spin {
  0% {
    transform: rotate(0);
  }
  100%,
  25% {
    transform: rotate(720deg);
  }
}

.attention-pulse {
  animation: qdp-pulse 1s infinite ease-in-out alternate;
}
@keyframes qdp-pulse {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1.2);
  }
}

.attention-flash {
  animation: qdp-flash 500ms ease infinite alternate;
}
@keyframes qdp-flash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.attention-bounce {
  animation: qdp-bounce 2s ease infinite;
}
@keyframes qdp-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px);
  }
  60% {
    transform: translateY(-15px);
  }
}

.attention-swing {
  transform-origin: top center;
  animation: qdp-swing 2s ease infinite;
}
@keyframes qdp-swing {
  20% {
    transform: rotate(15deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(5deg);
  }
  80% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.attention-shake {
  animation: qdp-shake 3s infinite;
}
@keyframes qdp-shake {
  20%,
  80% {
    transform: translateX(0);
  }
  30%,
  50% {
    transform: translateX(-10px);
  }
  40%,
  60% {
    transform: translateX(10px);
  }
}

.attention-shockwave {
  animation: qdp-shockwave 3s infinite ease-in-out;
}
@keyframes qdp-shockwave {
  30%,
  50% {
    transform: rotate(-20deg) scale(1.2);
  }
  40% {
    transform: rotate(20deg) scale(1.2);
  }
  40%,
  60% {
    transform: rotate(0deg) scale(1.2);
  }
  20%,
  80% {
    transform: scale(1);
  }
}

.kl-icon-span {
  z-index: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-pending-message {
  display: inline-grid;
  position: absolute;
  top: -3px;
  right: -3px;
  height: auto;
  width: auto;
  line-height: 1;
  background-color: #ff0000;
  color: white;
  padding: 2px;
  font-size: 8px;
  border-radius: 50%;
  text-align: center;
  z-index: 10000;
  min-height: 16px;
  min-width: 16px;
  align-items: center;
  border: 2px solid white;
  pointer-events: none;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 10px;
}

.no-attention-pending.whatsapp-pending-message {
  top: 2px;
  right: 2px;
  display: none;
  z-index: 10000;
}

.attention-flash + .whatsapp-pending-message,
.attention-gelatine + .whatsapp-pending-message,
.attention-spin + .whatsapp-pending-message {
  display: inline-grid;
  top: -3px;
  right: -3px;
}

.attention-flash .whatsapp-pending-message,
.attention-gelatine .whatsapp-pending-message,
.attention-spin .whatsapp-pending-message {
  display: none;
}

.whatsapp-chat-icon {
  position: relative;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  gap: 8px;
  padding: 9px;
  padding-right: 22px;
  padding-left: 13px;
  cursor: pointer;
  max-width: 415px;
  overflow: visible;
  pointer-events: all;
}
.whatsapp-chat-icon svg {
  flex-shrink: 0;
}

.pending-message {
  display: inline-grid;
  position: absolute;
  top: -8px;
  right: -1px;
  height: auto;
  width: auto;
  line-height: 1;
  background-color: #ff0000;
  color: white;
  padding: 2px;
  font-size: 8px;
  border-radius: 50%;
  text-align: center;
  z-index: 10000;
  min-height: 16px;
  min-width: 16px;
  align-items: center;
  border: 2px solid white;
  pointer-events: none;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 10px;
}

.whatsapp-tooltip-text {
  white-space: normal;
  word-break: break-word;
}

.whatsapp-chat-popup {
  visibility: hidden;
  position: fixed;
  z-index: 999;
  display: flex;
  width: 340px;
  flex-direction: column;
  border-radius: 12px;
  background-color: #ffffff;
  opacity: 0;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  right: 25px;
  bottom: 100px;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  transform: translateY(20px);
  overflow: hidden;
}

.cta-position-left .whatsapp-chat-popup {
  left: 0;
}

.whatsapp-chat-popup.animate-slideUp {
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.whatsapp-chat-popup.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.open-whatsapp-pop-up .wp-cta-tooltip,
.open-whatsapp-pop-up .whatsapp-pending-message,
.open-whatsapp-pop-up .pending-message {
  display: none;
}

.whatsapp-icon,
.whatsapp-close-icon {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}
.whatsapp-icon {
  transition: all 300ms ease-in-out;
  opacity: 1;
  transform: translate(0, -50%) rotate(0deg);
}

.whatsapp-close-icon {
  transition: all 300ms ease-in-out;
  opacity: 0;
  transform: translate(0, -50%) rotate(-360deg);
}

.open-whatsapp-pop-up .widget-cta-icon {
  animation: none !important;
}
.open-whatsapp-pop-up .whatsapp-icon {
  opacity: 0;
  transform: translate(0, -50%) rotate(360deg);
}

.open-whatsapp-pop-up .whatsapp-close-icon {
  opacity: 1;
  transform: translate(0, -50%) rotate(0deg);
}

.whatsapp-chat-popup-header {
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
  padding: 12px 20px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.whatsapp-chat-popup-header-title,
.whatsapp-chat-popup-header-sub-title {
  margin: 0;
  padding: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.whatsapp-chat-popup-header-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0;
}
.header-icon {
  position: relative;
  flex-shrink: 0;
}
.wp-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.header-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: #86efac;
  border: 2px solid #ffffff;
  border-radius: 50%;
}
.header-details {
  flex: 1;
  min-width: 0;
}
.whatsapp-chat-popup-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.whatsapp-chat-popup-close-btn:hover {
  background-color: color-mix(in oklab, white 25%, transparent);
}

.whatsapp-chat-popup-header-sub-title {
  font-size: 12px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.whatsapp-chat-popup-body {
  background: linear-gradient(rgb(240, 244, 248) 0%, rgb(248, 250, 251) 100%);
  max-height: calc(100vh - var(--popup-bottom, 100px) - var(--popup-extras, 136px));
  min-height: min(145px, calc(100vh - var(--popup-bottom, 100px) - var(--popup-extras-min, 167px)));
  overflow-y: auto;
}

.whatsapp-chat-popup-body.body-multiple-agent {
  min-height: min(100px, calc(100vh - var(--popup-bottom, 100px) - var(--popup-extras-multiple, 70px)));
}

.whatsapp-message-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.agent-font {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: -6px;
  background: linear-gradient(135deg, rgb(37, 211, 102), rgb(18, 140, 126));
}
.preview-agent-name {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
  margin-left: 2px;
}
.preview-message-text {
  background: rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 8px;
  max-width: 220px;
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 0;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.625;
}
.whatsapp-chat-popup-footer {
  padding: 12px 16px;
  background-color: #ffffff;
  flex-shrink: 0;
  border-radius: 0 0 12px 12px;
  border-top: 1px solid #e5e7eb;
}

.whatsapp-submit-button {
  width: 100%;
  padding: 10px;
  border-radius: 9999px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
}

.whatsapp-submit-button:hover {
  opacity: 0.9;
}

.whatsapp-submit-button:active {
  transform: scale(0.95);
}
.whatsapp-agent-row {
  border-bottom: 1px solid #f1f1f1;
}

.add-agent {
  padding: 6px 16px;
  background-color: #ecfdf5;
  border-bottom: 1px solid rgba(209, 250, 229, 0.8);
  position: sticky;
  top: 0;
  z-index: 99;
}

.add-agent-text {
  font-size: 11px;
  line-height: 16px;
  color: #065f46;
  font-weight: 500;
}

.agent-details {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  background: rgb(255, 255, 255);
}
.agent-details:hover {
  background: linear-gradient(90deg, rgb(240, 253, 244) 0%, rgb(248, 255, 254) 100%);
}

.agent-image-wrap {
  position: relative;
  flex-shrink: 0;
}

.agent-image {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: all 0.2s ease;
}

.agent-details:hover .agent-image {
  border-color: #4ade80;
}

.wp-active {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: rgb(34, 197, 94);
}

.agent-info {
  flex: 1;
  min-height: 0;
}

.agent-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  max-width: 230px;
}

.agent-designation {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  max-width: 230px;
}
