.wew-conversation-box {
  width: 100%;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.wew-conversation-participant-name {
  padding-top: 5px;
  text-align: center;
  /* font-size is controlled by Elementor typography, fallback to 12px */
  font-size: var(--wew-name-font-size, 12px);
}

.wew-conversation-box:nth-child(even) {
  margin-bottom: 25px;
}

.left-bubble {

}

.right-bubble {

}

.wew-conversation-box.left-bubble {
  flex-direction: row-reverse;
}

.wew-conversation-box.right-bubble {

}

.wew-conversation-box.left-bubble .wew-conversation-bubble:after,
.wew-conversation-box.left-bubble .wew-conversation-bubble:before {
  left: 100%;
}

.wew-conversation-box.right-bubble .wew-conversation-bubble:after,
.wew-conversation-box.right-bubble .wew-conversation-bubble:before {
  right: 100%;
}

/* Speech bubble triangle - inner (background color) */
.wew-conversation-box.left-bubble .wew-conversation-bubble:after {
  border-left-color: var(--wew-bubble-bg, #fff);
}

.wew-conversation-box.right-bubble .wew-conversation-bubble:after {
  border-right-color: var(--wew-bubble-bg, #fff);
}

/* Speech bubble triangle - outer (border color) */
.wew-conversation-box.left-bubble .wew-conversation-bubble:before {
  border-left-color: var(--wew-bubble-border, #c8c8c8);
}

.wew-conversation-box.right-bubble .wew-conversation-bubble:before {
  border-right-color: var(--wew-bubble-border, #c8c8c8);
}

.wew-conversation-avatar {
  width: 120px;
}

.wew-conversation-avatar img {
  border-radius: 50px;
  display: block;
  margin: 0 auto;
  max-width: 60px;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.wew-conversation-bubble {
  position: relative;
  /* Colors controlled by Elementor, fallback to defaults */
  background: var(--wew-bubble-bg, #fff);
  border: 1px solid var(--wew-bubble-border, #c8c8c8);
  border-radius: 10px;
  flex: 1;
  /* font-size is controlled by Elementor typography, fallback to 14px */
  font-size: var(--wew-bubble-font-size, 14px);
  padding:3%;
}

.wew-conversation-bubble:after,
.wew-conversation-bubble:before {
  top: 1.28rem;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

/* Inner triangle (background color) - fixed size */
.wew-conversation-bubble:after {
  border-color: rgba(255, 255, 255, 0);
  border-width: 8px;
  margin-top: -8px;
}

/* Outer triangle (border color) - size = 8px + border width + 1px for diagonal compensation */
/* Note: +1px formula scales better: 1px→2x, 2px→1.5x, 3px→1.33x (approaches √2) */
.wew-conversation-bubble:before {
  border-color: rgba(200, 200, 200, 0);
  border-width: calc(8px + var(--bubble-border-width, 1px) + 1px);
  margin-top: calc(-8px - var(--bubble-border-width, 1px) - 1px);
}
