/* ==========================================================================
   POPOVERS
   ========================================================================== */

.popover {
    pointer-events: none;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;

    &::before {
        content: '';
        position: absolute;
        inset: -10px 0;
    }

    .popover-content {
        min-width: 180px;
        transform-origin: 50% 10%;
        animation-fill-mode: forwards;
        opacity: 0;
        transform: scale(0.85);
        transition: all 0.05s ease-in;
        will-change: transform, opacity;
        background-clip: padding-box;
    }
}

.popover-container {
    pointer-events: none;
}

/*  When open */
.popover-open {
    .popover {
        pointer-events: auto;
        visibility: visible;
    }

    .popover-content {
        transform: scale(1);
        opacity: 1;
    }

    .rotating-dots {
        transform: rotate(90deg);
    }
}

/*  Supporting elements */
.rotating-dots {
    @apply relative cursor-pointer;
    transition: 0.12s ease-out;
}

.rotating-dots-button {
    @apply flex items-center justify-center rounded-full text-gray-700 dark:text-gray-300;
    height: 20px;
    width: 20px;

    &:hover {
        @apply text-gray-925 dark:text-gray-200;
    }

    &:focus {
        @apply focus-outline;
    }
}
