/* Inline anchor wrapping the trigger element */
.ec-tip-anchor {
  display: inline-flex;
  vertical-align: middle;
  position: relative;
}

.ec-tip-anchor__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: help;
  line-height: 0;
}

.ec-tip-anchor__trigger--icon {
  border-radius: 50%;
}

.ec-tip-anchor__trigger:focus-visible {
  outline: 2px solid #54c8c6;
  outline-offset: 2px;
}

.ec-tip-anchor__icon {
  width: 14px;
  height: 14px;
  display: block;
}

/* Floating layer portaled to document.body */
.ec-tip-layer {
  position: fixed;
  z-index: 100000;
  max-width: min(270px, calc(100vw - 16px));
  pointer-events: none;
  overflow: visible;
  box-sizing: border-box;
  filter: drop-shadow(0 1px 13px rgba(0, 0, 0, 0.14));
}

.ec-tip-layer[hidden] {
  display: none !important;
}

.ec-tip-layer__box {
  position: relative;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(115, 71, 38, 0.23);
  color: #323232;
  padding: 10px 12px;
  text-align: left;
  font-family: "Ubuntu", sans-serif, arial;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* SVG caret – sibling of box so border-radius never clips it. */
.ec-tip-layer__arrow {
  position: absolute;
  display: block;
  width: 10px;
  height: 16px;
  pointer-events: none;
}

.ec-tip-layer__arrow path {
  fill: #ffffff;
}

/* Default SVG points right; JS sets top/left offset, transform keeps caret centered on that point. */
.ec-tip-layer--left .ec-tip-layer__arrow {
  right: -7px;
  transform: translateY(-50%);
}

.ec-tip-layer--left .ec-tip-layer__box {
  border-right-color: transparent;
}

.ec-tip-layer--right .ec-tip-layer__arrow {
  left: -7px;
  transform: translateY(-50%) rotate(180deg);
}

.ec-tip-layer--right .ec-tip-layer__box {
  border-left-color: transparent;
}

.ec-tip-layer--top .ec-tip-layer__arrow {
  bottom: -7px;
  transform: translateX(-50%) rotate(90deg);
}

.ec-tip-layer--top .ec-tip-layer__box {
  border-bottom-color: transparent;
}

.ec-tip-layer--bottom .ec-tip-layer__arrow {
  top: -7px;
  transform: translateX(-50%) rotate(-90deg);
}

.ec-tip-layer--bottom .ec-tip-layer__box {
  border-top-color: transparent;
}
