.soudaComment-bubble {
  position: absolute;
  z-index: 6;
  width: max-content;
  max-width: min(260px, calc(100% - 16px));
  box-sizing: border-box;
  padding: 10px 14px;
  border: 2px solid #6b4526;
  border-radius: 16px;
  color: #3f2c1f;
  background: #fffdf4;
  box-shadow: 0 6px 18px rgb(47 34 23 / 22%);
  font-size: clamp(0.78rem, 3.4vw, 0.95rem);
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
  pointer-events: none;
  transform: translateX(-50%);
}

.soudaComment-bubble[data-interactive="true"] {
  cursor: pointer;
  pointer-events: auto;
}

.soudaComment-bubble[data-interactive="true"]:focus-visible {
  outline: 3px solid #1677d2;
  outline-offset: 3px;
}

.soudaComment-content {
  display: flex;
  gap: 10px;
  align-items: center;
}

.soudaComment-iconWrap {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #f4e6bd;
}

.soudaComment-icon,
.soudaComment-iconFallback {
  width: 100%;
  height: 100%;
}

.soudaComment-icon {
  object-fit: cover;
}

.soudaComment-iconFallback {
  display: grid;
  font-size: 1.5rem;
  line-height: 1;
  place-items: center;
}

.soudaComment-message {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.soudaComment-ticket {
  color: #b65300;
  font-size: 1rem;
}

.soudaComment-iconWrap[hidden],
.soudaComment-icon[hidden],
.soudaComment-iconFallback[hidden],
.soudaComment-ticket[hidden] {
  display: none;
}

.soudaComment-bubble[hidden] {
  display: none;
}

.soudaComment-bubble::after {
  position: absolute;
  left: var(--souda-comment-pointer-x, 50%);
  width: 12px;
  height: 12px;
  border-right: 2px solid #6b4526;
  border-bottom: 2px solid #6b4526;
  background: #fffdf4;
  content: "";
}

.soudaComment-bubble[data-placement="above"]::after {
  bottom: -8px;
  transform: translateX(-50%) rotate(45deg);
}

.soudaComment-bubble[data-placement="below"]::after {
  top: -8px;
  transform: translateX(-50%) rotate(225deg);
}

@media (max-width: 360px) {
  .soudaComment-bubble {
    max-width: calc(100% - 12px);
    padding: 8px 11px;
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .soudaComment-bubble:not([hidden]) {
    animation: soudaComment-appear 160ms ease-out both;
  }

  @keyframes soudaComment-appear {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(4px) scale(0.98);
    }

    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }
  }
}
