$prefix: "adui-popover";
$tooltipPrefix: "adui-tooltip";

.#{$prefix} {
  &-popover {
    .#{$tooltipPrefix} {
      &-content {
        position: relative;
        color: var(--gray-900);
        background-color: #fff;
        border-radius: 6px;
        box-shadow: 0 0 0 1px var(--transparent-gray-100);
        filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.05))
          drop-shadow(0 6px 15px rgba(0, 0, 0, 0.05));
      }
    }

    &:not(.#{$prefix}-popover_noArrow) {
      .#{$tooltipPrefix} {
        &-arrow {
          width: 8px;
          height: 21px;
          // background-image: url("data:image/svg+xml,%3Csvg width='8' height='21' viewBox='0 0 8 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M1.71172 16.7361L6.4311 11.9135C7.19186 11.1361 7.19186 9.89327 6.4311 9.11586L1.71173 4.29329C0.61446 3.17203 0 1.66561 0 0.0967865L0 20.9326C0 19.3638 0.614458 17.8574 1.71172 16.7361Z' fill='white'/%3E%3Cpath d='M1 0.0967865L1 3.41345C1.20755 3.72634 1.44542 4.02116 1.71173 4.29329L6.4311 9.11586C7.19186 9.89327 7.19186 11.1361 6.4311 11.9135L1.71172 16.7361C1.44542 17.0082 1.20755 17.3031 1 17.616L1 20.9326C1 19.6253 1.51205 18.3699 2.42644 17.4355L7.14581 12.613C8.28696 11.4469 8.28696 9.58255 7.14581 8.41645L2.42644 3.59388C1.51205 2.65949 1 1.40414 1 0.0967865Z' fill='black' fill-opacity='0.01'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Crect width='21' height='8' fill='white' transform='translate(0 21) rotate(-90)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
          background-image: url("data:image/svg+xml,%3Csvg width='8' height='21' viewBox='0 0 8 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M1.71172 16.7361L6.4311 11.9135C7.19186 11.1361 7.19186 9.89327 6.4311 9.11586L1.71173 4.29329C0.61446 3.17203 0 1.66561 0 0.0967865L0 20.9326C0 19.3638 0.614458 17.8574 1.71172 16.7361Z' fill='white'/%3E%3Cpath d='M1 0.0967865L1 3.41345C1.20755 3.72634 1.44542 4.02116 1.71173 4.29329L6.4311 9.11586C7.19186 9.89327 7.19186 11.1361 6.4311 11.9135L1.71172 16.7361C1.44542 17.0082 1.20755 17.3031 1 17.616L1 20.9326C1 19.6253 1.51205 18.3699 2.42644 17.4355L7.14581 12.613C8.28696 11.4469 8.28696 9.58255 7.14581 8.41645L2.42644 3.59388C1.51205 2.65949 1 1.40414 1 0.0967865Z' fill='url(%23paint0_linear)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='paint0_linear' x1='1.5' y1='2.16368e-07' x2='1.5' y2='21' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-opacity='0'/%3E%3Cstop offset='0.216518' stop-opacity='0.06'/%3E%3Cstop offset='0.784226' stop-opacity='0.06'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/linearGradient%3E%3CclipPath id='clip0'%3E%3Crect width='21' height='8' fill='white' transform='translate(0 21) rotate(-90)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
          background-size: 100% 100%;
          border: none;
        }
      }

      &.#{$tooltipPrefix}-base-top,
      &.#{$tooltipPrefix}-base-topLeft,
      &.#{$tooltipPrefix}-base-topRight {
        .#{$tooltipPrefix}-arrow {
          bottom: -14px;
          transform: rotate(90deg);
        }
      }

      &.#{$tooltipPrefix}-base-right,
      &.#{$tooltipPrefix}-base-rightTop,
      &.#{$tooltipPrefix}-base-rightBottom {
        .#{$tooltipPrefix}-arrow {
          left: -8px;
          transform: rotate(180deg);
        }
      }

      &.#{$tooltipPrefix}-base-bottom,
      &.#{$tooltipPrefix}-base-bottomLeft,
      &.#{$tooltipPrefix}-base-bottomRight {
        .#{$tooltipPrefix}-arrow {
          top: -14px;
          transform: rotate(-90deg);
        }
      }

      &.#{$tooltipPrefix}-base-left,
      &.#{$tooltipPrefix}-base-leftTop,
      &.#{$tooltipPrefix}-base-leftBottom {
        .#{$tooltipPrefix}-arrow {
          right: -8px;
          transform: rotate(0deg);
        }
      }

      &.#{$tooltipPrefix}-base-top,
      &.#{$tooltipPrefix}-base-bottom {
        .#{$tooltipPrefix}-arrow {
          margin-left: -4px;
        }
      }

      &.#{$tooltipPrefix}-base-left,
      &.#{$tooltipPrefix}-base-right {
        .#{$tooltipPrefix}-arrow {
          margin-top: -10.5px;
        }
      }
    }
  }
  &-popover_noArrow {
    .#{$tooltipPrefix}-arrow {
      display: none;
    }
  }
  &-removeContentPadding {
    .#{$tooltipPrefix}-content {
      padding: 0;
    }
  }
}
