/* ==========================================================================
   Interactive Image Hotspots Explorer (PT-9)
   ========================================================================== */

@property --scroll-mask-l-from {
    syntax: "<color>";
    inherits: false;
    initial-value: #000000;
}

@property --scroll-mask-r-from {
    syntax: "<color>";
    inherits: false;
    initial-value: #000000;
}

@keyframes brochure-hotspots-scroll-mask-left {
    0% {
        --scroll-mask-l-from: #000000;
    }

    4%,
    100% {
        --scroll-mask-l-from: transparent;
    }
}

@keyframes brochure-hotspots-scroll-mask-right {
    0%,
    96% {
        --scroll-mask-r-from: transparent;
    }

    100% {
        --scroll-mask-r-from: #000000;
    }
}

@keyframes brochure-hotspots-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 53, 118, 0.6);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(0, 53, 118, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 53, 118, 0);
    }
}

.brochure-hotspots__scroll,
.brochure-hotspots .comp-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}

@supports (animation-timeline: scroll()) {
    .brochure-hotspots__scroll {
        --scroll-mask-size: 36px;
        mask-image:
            linear-gradient(to right, var(--scroll-mask-l-from), #000000 var(--scroll-mask-size)),
            linear-gradient(to left, var(--scroll-mask-r-from), #000000 var(--scroll-mask-size));
        mask-composite: intersect;
        -webkit-mask-composite: source-in;
        animation:
            brochure-hotspots-scroll-mask-left linear both,
            brochure-hotspots-scroll-mask-right linear both;
        animation-timeline: scroll(self inline);
    }
}

.brochure-hotspots__canvas,
.brochure-hotspots .comp {
    position: relative;
    min-width: var(--hotspots-min-width, 0px);
}

.brochure-hotspots__image {
    display: block;
    width: 100%;
    height: auto;
}

.brochure-hotspots__marker,
.brochure-hotspots .hs {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--blue);
    border: 2px solid var(--white);
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 0 rgba(0, 53, 118, 0.6);
    animation: brochure-hotspots-pulse 2.4s infinite;
}

.brochure-hotspots__marker::after,
.brochure-hotspots .hs::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--yellow);
}

.brochure-hotspots__marker.on,
.brochure-hotspots .hs.on {
    background: var(--yellow);
    animation: none;
}

.brochure-hotspots__marker.on::after,
.brochure-hotspots .hs.on::after {
    background: var(--blue);
}

.brochure-hotspots__info,
.brochure-hotspots .comp-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 24px;
    margin-top: 20px;
    align-items: start;
}

.brochure-hotspots__card,
.brochure-hotspots .comp-card {
    background: var(--blue);
    color: var(--white);
    border-radius: 4px;
    padding: 22px;
    min-height: 132px;
}

[data-surface="dark"] .brochure-hotspots__card,
[data-surface="dark"] .brochure-hotspots .comp-card {
    border: 1px solid var(--line-blue);
}

.brochure-hotspots__card .eyebrow,
.brochure-hotspots .comp-card .eyebrow {
    color: var(--yellow);
}

.brochure-hotspots__card h3,
.brochure-hotspots .comp-card h3 {
    font-size: 22px;
    font-weight: 400;
    margin: 6px 0 6px;
    color: var(--white);
}

.brochure-hotspots__card p:not(.eyebrow),
.brochure-hotspots .comp-card p:not(.eyebrow) {
    font-size: 15px;
    color: var(--claim);
}

.brochure-hotspots__list,
.brochure-hotspots .comp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: start;
}

.brochure-hotspots__chip,
.brochure-hotspots .comp-list button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 3px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.4;
    cursor: pointer;
    color: var(--blue);
    text-align: center;
}

/* Reserve bold (font-weight: 500) width so toggling .on never causes layout shift */
.brochure-hotspots__chip::after,
.brochure-hotspots .comp-list button::after {
    content: attr(data-label);
    content: attr(data-label) / "";
    font-weight: 500;
    height: 0;
    visibility: hidden;
    overflow: hidden;
    display: block;
    user-select: none;
    pointer-events: none;
}

.brochure-hotspots__chip.on,
.brochure-hotspots .comp-list button.on {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--blue);
    font-weight: 500;
}

@media (max-width: 860px) {
    .brochure-hotspots__info,
    .brochure-hotspots .comp-info {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .brochure-hotspots__marker,
    .brochure-hotspots .hs {
        animation: none;
    }
}
