/**
 * Russhaupten Pano Popup Styles
 * Styles für den 360°-Panorama-Viewer im Popup Maker Modal
 */

/* Viewer-Container im Popup */
#rus-pano-viewer {
    width: 100%;
    height: 400px;
    min-height: 300px;
    background-color: #1a1a1a;
    position: relative;
}

/* Responsiv: größerer Viewer auf Desktop */
@media (min-width: 768px) {
    #rus-pano-viewer {
        height: 500px;
    }
}

@media (min-width: 1024px) {
    #rus-pano-viewer {
        height: 600px;
    }
}

/* Titel über dem Viewer */
#rus-pano-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

/* Fehlermeldung im Viewer */
.rus-pano-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
}

/* Lade-Indikator */
.rus-pano-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 1rem;
}

.rus-pano-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    margin-left: 10px;
    border: 3px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: rus-pano-spin 0.8s linear infinite;
}

@keyframes rus-pano-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Bounce-Down Animation für Hotspot-Icons */
@keyframes rus-bounce-down {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    40% {
        opacity: 1;
        transform: translateY(20px);
    }
    55% {
        opacity: 1;
        transform: translateY(-12px);
    }
    70% {
        opacity: 1;
        transform: translateY(8px);
    }
    85% {
        opacity: 1;
        transform: translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grundriss-Container - keine Animation */
.grundriss-container {
    animation: none !important;
}

.grundriss-container > img {
    animation: none !important;
}

/* Hotspots auf der Bilder-Seite mit Bounce-Animation */
.grundriss-container > .grundriss-hotspot {
    animation: rus-bounce-down 1s ease-out both !important;
    animation-delay: 2s !important;
    cursor: pointer;
}

/* Gestaffelter Animationsstart für Hotspots (ab 2s) */
.grundriss-container > .grundriss-hotspot:nth-child(2) { animation-delay: 2s !important; }
.grundriss-container > .grundriss-hotspot:nth-child(3) { animation-delay: 2.2s !important; }
.grundriss-container > .grundriss-hotspot:nth-child(4) { animation-delay: 2.4s !important; }
.grundriss-container > .grundriss-hotspot:nth-child(5) { animation-delay: 2.6s !important; }
.grundriss-container > .grundriss-hotspot:nth-child(6) { animation-delay: 2.8s !important; }

/* Hover-Effekt für Hotspots */
.grundriss-container > .grundriss-hotspot:hover {
    transform: scale(1.2);
}

/* Container für normale Bilder im Popup */
.rus-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
}

/* Das Bild selbst */
.rus-image-photo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
