/* Facility Awareness Diagram Styles */

/* Base container ensuring the image and hotspots scale together */
.facility-wrapper {
    position: relative;
    width: 100%;
    /* Max width matches the image usually, or responsive */
    max-width: 1200px;
    margin: 0 auto;
}

.facility-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Hotspot Base Styles */
.hotspot {
    position: absolute;
    cursor: pointer;
    z-index: 10;
    /* Reset button styles */
    border: none;
    padding: 0;
    margin: 0;
    /* Debug border - remove in production if preferred, but useful for stickmen hitboxes */
    /* border: 2px solid rgba(255, 0, 0, 0.5); */
    background-color: rgba(255, 255, 255, 0.0);
    /* Transparent interactive area */
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hotspot:focus-visible {
    outline: 3px solid #FFD700;
    outline-offset: 4px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Pulse animation to indicate interactivity */
.hotspot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: rgba(255, 215, 0, 0.6);
    /* Gold color for safety/alert */
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0.8;
}

.hotspot:hover::after {
    background-color: rgba(255, 0, 0, 0.6);
    /* Red on hover */
    width: 30px;
    height: 30px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 215, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* 
   Hotspot Positioning 
   Top/Left percentages are estimates based on the user's description.
   They need to be fine-tuned to overlay the stickmen exactly.
*/

/* 1) Entrance Confusion (Front of Facility - likely left side near door/person) */
.hotspot-entrance {
    top: 55%;
    left: 28%;
    width: 8%;
    height: 15%;
}

/* 2) Speeding Vehicle (Forklift - Right Side, Ground Level) */
.hotspot-vehicle {
    top: 65%;
    left: 70%;
    width: 10%;
    height: 15%;
}

/* 3) Rooftop Work (No Horizontal Lifeline - Top middle) */
.hotspot-rooftop {
    top: 33%;
    left: 55%;
    width: 8%;
    height: 15%;
}

/* 4) Monkey Ladder (No Vertical Lifeline - Far right wall) */
.hotspot-ladder {
    top: 45%;
    left: 88%;
    width: 6%;
    height: 20%;
}


/* Tooltip / Modal Styles specifically for Facility Awareness */
.facility-tooltip-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.facility-tooltip-modal.active {
    display: flex;
}

.facility-tooltip-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left: 5px solid #ff4444;
    /* Safety Red accent */
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.facility-tooltip-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.facility-tooltip-close:hover {
    color: #ff4444;
}

.facility-tooltip-title {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.facility-tooltip-text {
    line-height: 1.6;
    color: #555;
    font-size: 1.1rem;
    text-align: left;
    margin-bottom: 15px;
}

.facility-tooltip-image {
    width: 95%;
    height: 95%;
    display: block;
    margin: 0 auto 20px;
    /* Centers horizontally and adds bottom margin */
}