.annotation-container {
  pointer-events: auto;
  z-index: 1000;
}

.annotation-box {
  padding: 5px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(221, 221, 221, 0.6);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 220px;
  min-width: 90px;
  font-size: 13px;
  font-weight: normal;
  position: relative;
  cursor: move;
  user-select: none;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #008cba;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  // Close button
  .annotation-close {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border: 1px solid #008cba;
    background: #008cba;
    color: white;
    font-size: 12px;
    font-weight: normal;
    line-height: 1;
    cursor: pointer;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;

    &:hover {
      background: white;
      color: #008cba;
    }

    &:active {
      background: #006a94;
      color: white;
    }
  }

  // Text content
  .annotation-text {
    margin: 0;
    margin-right: 16px;
    word-break: break-word;
    line-height: 1.3;
    color: #333;
    flex: 1;
  }
}

.annotation-arrow {
  position: absolute;
  width: 0;
  height: 0;
  transition: all 0.2s ease;
}

.annotation-arrow::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
}

/* Direction 0: Down (Default) */
.arrow-0 {
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #008cba;
}

.arrow-0::before {
  bottom: 1px;
  left: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid rgba(255, 255, 255, 0.9);
}

/* Direction 1: Left */
.arrow-1 {
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #008cba;
}

.arrow-1::before {
  left: 1px;
  top: -7px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 7px solid rgba(255, 255, 255, 0.9);
}

/* Direction 2: Up */
.arrow-2 {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #008cba;
}

.arrow-2::before {
  top: 1px;
  left: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid rgba(255, 255, 255, 0.9);
}

/* Direction 3: Right */
.arrow-3 {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #008cba;
}

.arrow-3::before {
  right: 1px;
  top: -7px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 7px solid rgba(255, 255, 255, 0.9);
}
