.c-hot-spot-image__wrapper {
    margin-left: auto;
    margin-right: auto;
    max-width: 73rem;
}

.c-hot-spot-image {
    position: relative;
    z-index: 1;
}

.c-hot-spot-item {
    position: absolute;
    transform: translate(-50%, -50%);
}

.c-hot-spot-item--is-active {
    z-index: 2;
}

// Trigger Button
.c-hot-spot-item__icon-button {
    font-size: 1rem;
    border-radius: 100%;
    height: 1.75rem;
    width: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;

    svg {
        fill: #fff;
        color: #fff;
    }

    &:focus {
        outline: none;
    }

    &:focus-visible {
        outline: 2px dashed theme('colors.focus.500');
    }

    .c-hot-spot-image--primary & {
        background: theme('colors.primary.500');

        &::after {
            border-color: theme('colors.primary.500');
        }
    }

    .c-hot-spot-image--secondary & {
        background: theme('colors.secondary.500');

        &::after {
            border-color: theme('colors.secondary.500');
        }
    }

    .c-hot-spot-image--accent & {
        background: theme('colors.accent.500');

        &::after {
            border-color: theme('colors.accent.500');
        }
    }

    .c-hot-spot-image--ambient & {
        background: theme('colors.ambient.500');

        &::after {
            border-color: theme('colors.ambient.500');
        }
    }

    .c-hot-spot-image--cta & {
        background: theme('colors.cta.500');

        &::after {
            border-color: theme('colors.cta.500');
        }
    }

    // Pulse Animation and Styling
    &::after {
        content: '';
        pointer-events: none;
        position: absolute;
        inset: -2em;
        animation: pulse-animation 5s ease-in-out infinite;
        border: 2px solid;
        border-radius: 50%;
        display: block;
        font-size: 5px;
        opacity: .5;
        transform: scale(1);
    }
}

.c-hot-spot-item__icon {
    line-height: 1;
    display: flex;

    svg {
        height: 1em;
        width: 1em;
    }
}

.c-hot-spot-item__icon--open {
    .c-hot-spot-item--is-active & {
        display: none;
    }
}

.c-hot-spot-item__icon--close {
    visibility: hidden;
    width: 0;
    height: 0;
    transform: rotate(90deg);
    transition: transform .3s;
    z-index: -1;

    .c-hot-spot-item--is-active & {
        visibility: visible;
        display: flex;
        width: auto;
        height: auto;
        transform: rotate(0);
        z-index: 0;
    }
}

// Popover Styling
.c-hot-spot-item-popover {
    @apply rounded;
    visibility: hidden;
    opacity: .2;
    pointer-events: none;
    gap: 1rem;
    width: 21rem;
    height: auto;
    position: absolute;
    // Start position for transition of popover on show
    top: -6.75rem;
    left: -9999rem;
    background: #fff;
    color: theme('colors.gray.800');
    padding: .75rem;
    font-size: .75rem;
    border-radius: .5rem;
    box-shadow: 0 2px .5rem #00000029;

    .c-hot-spot-item--is-active & {
        transition: top .3s, opacity .3s;
        opacity: 1;
        display: flex;
        visibility: visible;
        pointer-events: auto;
    }
}

.c-hot-spot-item-popover__image {
    width: 5.75rem;
    height: 5.75rem;
    flex-shrink: 0;
    position: relative;

    img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: .25rem;
    }
}

.c-hot-spot-item-popover__headline {
    font-size: 1.125rem;
    line-height: 1.2;
    font-weight: bold;
}

.c-hot-spot-item-popover__text {
    margin-top: .5rem;
    font-size: .875rem;
    line-height: 1.4;
}

.c-hot-spot-item-popover__link {
    display: inline-block;
    margin-top: .5rem;
    font-size: .875rem;
    line-height: 1.2;
}

.c-hot-spot-item__arrow {
    position: absolute;
    background: #fff;
    width: .5rem;
    height: .5rem;
    transform: rotate(45deg);
}

// Pulse Animation
@keyframes pulse-animation {
    0% {
        opacity: 0;
        transform: scale(.5);
    }
    10%, 20% {
        opacity: .75;
    }
    40%, 100% {
        opacity: 0;
        transform: scale(1);
    }
}