SFeaturePopover {
  padding-top: var(--intergalactic-spacing-4x, 16px);
  padding-right: var(--intergalactic-spacing-10x, 40px);
  padding-bottom: var(--intergalactic-spacing-4x, 16px);
  padding-left: var(--intergalactic-spacing-4x, 16px);
  border-radius: var(--intergalactic-popper-rounded, 6px);
  box-sizing: border-box;
  box-shadow: var(--intergalactic-box-shadow-popper, 1px 1px 10px 0px oklch(0.324 0.077 242.1 / 0.079));
  position: relative;

  &[theme='accent'] {
    background-color: var(--intergalactic-feature-popover-bg-accent, oklch(0.92 0.052 303.1));
    color: var(--intergalactic-feature-popover-text, oklch(0.23 0.009 245));
  }
  &[theme='neutral'] {
    background-color: var(--intergalactic-feature-popover-bg-neutral, oklch(0.23 0.009 245));
    color: var(--intergalactic-feature-popover-text-invert, oklch(0.991 0.005 232.5 / 0.959));
  }
}

STrigger {
  position: relative;
}

SClose {
  position: absolute;
  z-index: 1;
  right: var(--intergalactic-spacing-2x, 8px);
  top: var(--intergalactic-spacing-2x, 8px);

  & SAddon:only-child {
    margin-left: calc(var(--intergalactic-spacing-2x, 8px) - 1px);
    margin-right: calc(var(--intergalactic-spacing-2x, 8px) - 1px);
  }
}

@keyframes showTrigger {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleSizeAndHide {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(2);
  }
}

SSpot {
  position: absolute;
  bottom: calc(-1 * var(--intergalactic-spacing-1x, 4px));
  right: calc(-1 * var(--intergalactic-spacing-1x, 4px));
  animation-name: showTrigger;
  animation-duration: 0.2s;
  animation-timing-function: ease-in;
  animation-delay: 0.4s;
  animation-fill-mode: forwards;
  width: 12px;
  height: 12px;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 50%;
    animation-name: scaleSizeAndHide;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
    animation-delay: 0.5s;
    border-radius: 50%;
    width: 12px;
    height: 12px;
  }

  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    width: 12px;
    height: 12px;
  }

  &[theme='accent'] {
    &::before {
      background-color: var(--intergalactic-feature-popover-dot-outer-border-accent, oklch(0.92 0.052 303.1));
    }
    &::after {
      background-color: var(--intergalactic-feature-popover-dot-accent, oklch(0.74 0.17 303));
    }
  }
  &[theme='neutral'] {
    &::before {
      background-color: var(--intergalactic-feature-popover-dot-outer-border-neutral, oklch(0.74 0.17 303));
    }
    &::after {
      background-color: var(--intergalactic-feature-popover-dot-neutral, oklch(0.74 0.17 303));
    }
  }
}

@media (prefers-reduced-motion) {
  SSpot {
    animation-name: none;
    &::before {
      animation-name: none;
    }
  }
}
