/* CONTAINER FÜR DIE BEREITSTELLUNG DES PLATZES (DIALOG) - Unverändert perfekt */
.interface-scroll-wrapper {
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center; 
    overflow: hidden; 
}

/* --- DEIN RESPONSIVER WRAPPER (Jetzt mit Hotspot-Fix für das Dashboard) --- */
.large-interface-wrapper {
    width: 100%;
    height: 100%;
    padding: 20px;            
    display: flex;            
    justify-content: center;  
    align-items: center;      
    overflow: auto !important; 
}

/* DER BILD-CONTAINER */
.interface-container {
    position: relative; /* Wichtig für die Hotspots! */
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

/* Der Retter für das Dashboard: Sorgt dafür, dass der Container IMMER die exakte Größe des Bildes einnimmt */
.large-interface-wrapper .interface-container {
    max-width: 100% !important;  
    max-height: 100% !important; 
    min-width: 0 !important;     
    display: table !important;  /* Zwingt den Container dazu, sich exakt an das Bild anzuschmiegen, damit JS die Hotspots richtig berechnet! */
    margin: auto;                
}

/* DAS INTERFACE BILD (Basis-Einstellungen) */
.interface-img {
    display: block;
    max-width: 100%;
    height: auto;
    /* Ändere das Rendering für Text-Screenshots */
    image-rendering: auto; /* Browser entscheidet besser als erzwungenes crisp-edges */
    image-rendering: -webkit-optimize-contrast; 
    object-fit: contain;
    /* Optional: Hilft bei der Kantenglättung */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); 
}

/* Die responsive Vergrößerung */
.large-interface-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    /* WICHTIG: Das hier verhindert Artefakte bei der Skalierung */
    perspective: 1000px;
}

/* REIN OPTISCHER HALTER FÜR DIE HOTSPOTS (Bleibt pixelgenau auf dem Bild) */
#hotspot-holder, #dashboard-hotspot-holder, #mainpage-hotspot-holder, #schichtplan-hotspot-holder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}


/* CLICK FIELDS (HOTSPOTS) */
.hotspot {
    position: absolute;
    cursor: pointer;
    background-color: rgba(20, 184, 166, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.hotspot:hover {
    background-color: rgba(20, 184, 166, 0.4);
    border: 1px solid #14b8a6;
    animation: border-pulse 1.5s infinite;
}

/* POPUP MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #050505; /* Tiefes Schwarz */
    border: 1px solid #14b8a6;
    padding: 40px;
    max-width: 550px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.2);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 4px; /* Mehr "Tech"-Look */
    border-bottom: 2px solid #14b8a6;
    padding-bottom: 10px;
}

.modal-content p {
    color: #ccc;
    line-height: 1.8;
    font-size: 1.05rem;
    text-align: center;
}

/* BILDER INNERHALB VON POPUP-MODALS */
.modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 10px;
    border: 2px solid transparent; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: block;
    margin-left: auto;
    margin-right: auto;
    cursor: pointer; 
    transition: all 0.2s ease-in-out;
}

.modal-content img:hover {
    border-color: #14b8a6;
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.6);
    transform: scale(1.02); 
}

/* --- DIE NEUE FULLSCREEN LIGHTBOX --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000; 
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #14b8a6;
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.4);
    transform: scale(0.9);
    transition: transform 0.25s ease;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px 15px;
    background: #14b8a6;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

/* --- BASIS-EINSTELLUNGEN (SCHARFE KANTEN) --- */
* { border-radius: 0 !important; }

/* HOTSPOT: PULSIERENDER EFFEKT */
@keyframes border-pulse {
    0% { box-shadow: 0 0 0px #14b8a6; border-color: rgba(20, 184, 166, 0.5); }
    50% { box-shadow: 0 0 15px #14b8a6; border-color: #14b8a6; }
    100% { box-shadow: 0 0 0px #14b8a6; border-color: rgba(20, 184, 166, 0.5); }
}

[data-id="bronze"]    { --col: 205, 127, 50; }
[data-id="silber"]    { --col: 200, 200, 200; }
[data-id="gold"]      { --col: 255, 215, 0; }
[data-id="platin"]    { --col: 0, 217, 163; }

/* Transparenter, abgedunkelter Hintergrund */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.custom-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Die Popup-Box mit Schatten-Glow in #14b8a6 */
.custom-popup-box {
    background: #12181b;
    border: 1px solid #14b8a6;
    box-shadow: 0 0 25px rgba(20, 184, 166, 0.5);
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    color: #e0e0e0;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.25s ease;
}

.custom-popup-overlay.active .custom-popup-box {
    transform: scale(1);
}

.custom-popup-box h3 {
    color: #14b8a6;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.custom-popup-box p {
    line-height: 1.5;
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: #b2dfdb;
}

.custom-popup-btn {
    background-color: #14b8a6;
    color: #0f172a;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.custom-popup-btn:hover {
    background-color: #0d9488;
    transform: translateY(-2px);
}
