/* CSS für das Big Popup */
#bigpopup-overlay {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: transparent; /* KEIN dunkler Hintergrund */
    -webkit-tap-highlight-color: transparent;
}

#bigpopup-overlay #bigpopup-inner {
    pointer-events: auto;
    font-weight: 700;
    text-align: center;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    text-shadow: none; /* Standard: kein Schatten */
    line-height: 1.1;
    max-width: 90%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: bigpopup-pulse 2s infinite alternate;
}

/* Schriftgrößen */
#bigpopup-overlay #bigpopup-inner.font-size-small {
    font-size: calc(2vw + 12px);
}

#bigpopup-overlay #bigpopup-inner.font-size-normal {
    font-size: calc(4vw + 16px);
}

#bigpopup-overlay #bigpopup-inner.font-size-large {
    font-size: calc(6vw + 20px);
}

#bigpopup-overlay #bigpopup-inner.font-size-xlarge {
    font-size: calc(8vw + 24px);
}

/* Schriftarten */
#bigpopup-overlay #bigpopup-inner.font-family-default {
    font-family: inherit;
}

#bigpopup-overlay #bigpopup-inner.font-family-arial {
    font-family: Arial, sans-serif;
}

#bigpopup-overlay #bigpopup-inner.font-family-helvetica {
    font-family: Helvetica, Arial, sans-serif;
}

#bigpopup-overlay #bigpopup-inner.font-family-georgia {
    font-family: Georgia, serif;
}

#bigpopup-overlay #bigpopup-inner.font-family-times {
    font-family: "Times New Roman", Times, serif;
}

#bigpopup-overlay #bigpopup-inner.font-family-verdana {
    font-family: Verdana, Geneva, sans-serif;
}

#bigpopup-overlay #bigpopup-inner.font-family-courier {
    font-family: "Courier New", Courier, monospace;
}

/* Text-Schatten Styles */
#bigpopup-overlay #bigpopup-inner.text-shadow-none {
    text-shadow: none !important;
}

#bigpopup-overlay #bigpopup-inner.text-shadow-light {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#bigpopup-overlay #bigpopup-inner.text-shadow-medium {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#bigpopup-overlay #bigpopup-inner.text-shadow-strong {
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Rahmen-Styles */
#bigpopup-overlay #bigpopup-inner.frame-transparent {
    background: transparent !important;
    box-shadow: none;
    border: none;
    color: #fff;
}

#bigpopup-overlay #bigpopup-inner.frame-semi {
    background: rgba(255, 255, 255, 0.5) !important;
}

#bigpopup-overlay #bigpopup-inner.frame-white {
    background: rgba(255, 255, 255, 0.95) !important;
}

#bigpopup-overlay #bigpopup-inner.frame-colored {
    /* Farbe wird dynamisch via style="" gesetzt */
    color: #fff;
}

/* Pulsierende Animation für Aufmerksamkeit */
@keyframes bigpopup-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    100% {
        transform: scale(1.02);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    }
}

/* FIX: Für transparente Frame keine Box-Shadow-Animation */
#bigpopup-overlay #bigpopup-inner.frame-transparent {
    animation: bigpopup-pulse-transparent 2s infinite alternate;
}

@keyframes bigpopup-pulse-transparent {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.02);
    }
}

#bigpopup-overlay.bigpopup-show {
    opacity: 1;
    pointer-events: none;
}

#bigpopup-overlay.bigpopup-hide {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Barrierefreiheit: Fokus-Stile */
#bigpopup-overlay:focus {
    outline: 2px solid #4D90FE;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #bigpopup-overlay #bigpopup-inner.font-size-small {
        font-size: calc(3vw + 10px);
    }
    
    #bigpopup-overlay #bigpopup-inner.font-size-normal {
        font-size: calc(5vw + 14px);
    }
    
    #bigpopup-overlay #bigpopup-inner.font-size-large {
        font-size: calc(7vw + 18px);
    }
    
    #bigpopup-overlay #bigpopup-inner.font-size-xlarge {
        font-size: calc(9vw + 22px);
    }
    
    #bigpopup-overlay #bigpopup-inner {
        padding: 20px 25px;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    #bigpopup-overlay #bigpopup-inner.font-size-small {
        font-size: calc(4vw + 8px);
    }
    
    #bigpopup-overlay #bigpopup-inner.font-size-normal {
        font-size: calc(6vw + 12px);
    }
    
    #bigpopup-overlay #bigpopup-inner.font-size-large {
        font-size: calc(8vw + 16px);
    }
    
    #bigpopup-overlay #bigpopup-inner.font-size-xlarge {
        font-size: calc(10vw + 20px);
    }
    
    #bigpopup-overlay #bigpopup-inner {
        padding: 15px 20px;
        border-radius: 6px;
    }
    
    @keyframes bigpopup-pulse {
        0% {
            transform: scale(1);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        }
        100% {
            transform: scale(1.01);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        }
    }
}

/* Hoher Kontrast Modus */
@media (prefers-contrast: high) {
    #bigpopup-overlay #bigpopup-inner {
        background: white;
        color: black;
        border: 3px solid black;
    }
}

/* Reduzierte Bewegung für Accessibility */
@media (prefers-reduced-motion: reduce) {
    #bigpopup-overlay,
    #bigpopup-overlay #bigpopup-inner,
    #bigpopup-overlay.bigpopup-hide {
        transition: none;
        animation: none;
    }
    
    #bigpopup-overlay #bigpopup-inner {
        animation: none;
    }
}
