.interactive-graphic-wrapper {
    width: 100%;
    margin: 20px auto;
    max-width: 1200px; /* Optional: constrain the max size */
}

#interactive-graphic-container {
    position: relative;
    width: 100%;
    height: 0;
    /* padding-bottom is set via inline style in PHP */
}

.interactive-graphic-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border: 1px solid #ccc;
}

.hotspot {
    position: absolute;
    /* For debugging, you can change the alpha value to see the hotspot areas */
    background-color: rgba(0, 255, 0, 0.0); 
    border: 2px solid rgba(255, 0, 0, 0.0);
    transition: background-color 0.3s, border 0.3s;
    cursor: pointer;
    box-sizing: border-box;
}

.hotspot:hover {
    background-color: rgba(0, 255, 0, 0.2);
    border: 2px dashed #00ff00;
}

.popup {
    position: absolute;
    display: none; /* Initially hidden */
    width: 350px;
    height: auto;
    background-color: #fff;
    border: 3px solid #000;
    box-shadow: 8px 8px 20px rgba(0,0,0,0.6);
    z-index: 1000;
    pointer-events: none; /* Prevents the popup from interfering with other mouse events */
    transform: translate(-50%, -110%); /* Position above the hotspot */
    padding: 5px;
}

.popup img {
    width: 100%;
    height: auto;
    display: block;
}
