/* === RTP INTERACTIVE LOOP === */
/* === RESET & BASE === */
.rtp-interactive-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === RTP CONTAINER === */
.rtp-interactive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.rtp-interactive {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
}

/* === LAYER SYSTEM === */
.rtp-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.4s ease;
}

.rtp-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Background immer sichtbar */
.rtp-layer.background {
    z-index: 1;
    opacity: 1;
}

/* Overlays standardmäßig unsichtbar */
.rtp-layer.overlay {
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, filter 0.6s ease;
}

.rtp-layer.overlay.active {
    opacity: 1;
    filter: brightness(1.15) drop-shadow(0 0 20px rgba(188, 207, 0, 0.7));
}

.rtp-layer.overlay.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* === HOTSPOTS === */
.rtp-hotspots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.rtp-hotspot-wrapper {
    position: absolute;
    cursor: pointer;
    --hotspot-size: clamp(30px, 3.75vw, 45px);
    transform: translate(calc(var(--hotspot-size) / -2), calc(var(--hotspot-size) / -2));
}

.rtp-hotspot {
    width: var(--hotspot-size);
    height: var(--hotspot-size);
    border-radius: 50%;
    background: #bccf00;
    border: 3px solid #fff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: clamp(12px, 1.33vw, 16px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

/* Label neben Hotspot */
.rtp-hotspot-label {
    position: absolute;
    left: calc(100% - clamp(10px, 1.25vw, 15px));
    top: 50%;
    transform: translateY(-50%);
    background: #666;
    color: #fff;
    padding: clamp(8px, 0.83vw, 10px) clamp(12px, 1.17vw, 14px) clamp(8px, 0.83vw, 10px) clamp(24px, 2.5vw, 30px);
    border-radius: 6px;
    font-size: clamp(12px, 1.25vw, 15px);
    font-weight: 600;
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Label links vom Hotspot */
.rtp-hotspot-wrapper.label-left .rtp-hotspot-label {
    left: auto;
    right: calc(100% - clamp(10px, 1.25vw, 15px));
    padding: clamp(8px, 0.83vw, 10px) clamp(24px, 2.5vw, 30px) clamp(8px, 0.83vw, 10px) clamp(12px, 1.17vw, 14px);
}

.rtp-hotspot-wrapper:hover .rtp-hotspot {
    transform: scale(1.15);
    background: #bccf00;
    box-shadow: 0 6px 20px rgba(188, 207, 0, 0.5);
}

.rtp-hotspot-wrapper.active .rtp-hotspot {
    background: #bccf00;
    transform: scale(1.2);
}

.rtp-hotspot-wrapper.active .rtp-hotspot-label {
    background: #bccf00;
    transform: translateY(-50%) scale(1.1);
}

/* === NAVIGATION === */
.rtp-navigation {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top:10px;
}

.rtp-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #bccf00;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Play/Pause Button */
.rtp-nav-play,
.rtp-nav-stop {
    width: 45px;
    height: 45px;
    padding: 0;
    font-size: 18px;
    border-radius: 50%;
}

/* Play Button (paused state) */
.rtp-nav-play {
    background: #bccf00;
}

.rtp-nav-play:hover {
    background: #a3b300;
}

/* Play Button when playing (Pause icon) */
.rtp-nav-play.playing {
    background: #8a9d00;
}

.rtp-nav-play.playing:hover {
    background: #738500;
}

/* Stop Button */
.rtp-nav-stop {
    background: #888;
}

.rtp-nav-stop:hover {
    background: #666;
}

/* Navigation Buttons (Prev/Next) */
.rtp-nav-button:hover {
    background: #a3b300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stop Button hover override */
.rtp-nav-stop:hover {
    background: #666;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rtp-nav-button.active {
    background: #bccf00;
}

.rtp-nav-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* === TEXT OVERLAY (ZENTRAL) === */
.rtp-text-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 45%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.70);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.rtp-text-overlay.active {
    opacity: 1;
}

.rtp-text-overlay h3 {
    background: #bccf00;
    color: #fff;
    margin: -30px -30px 20px -30px;
    padding: 15px 30px;
    border-radius: 12px 12px 0 0;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

/* Progress Bar */
.rtp-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    width: 0;
    transition: none;
    z-index: 10;
}

.rtp-progress-bar.active {
    width: 100%;
    transition: width 6.65s linear;
}

.rtp-text-overlay p {
    color: #fff;
    line-height: 1.8;
    font-size: 15px;
    margin: 0;
}

/* === TEXT OVERLAY MOBILE (unterhalb Navigation) === */
.rtp-text-overlay-mobile {
    display: none;
    background: #666;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 20px 0 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.rtp-text-overlay-mobile.active {
    opacity: 1;
}

.rtp-text-overlay-mobile h3 {
    background: #bccf00;
    color: #fff;
    margin: -20px -20px 15px -20px;
    padding: 12px 20px;
    border-radius: 12px 12px 0 0;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.rtp-text-overlay-mobile p {
    color: #fff;
    line-height: 1.6;
    font-size: 13px;
    margin: 0;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    /* Hotspots vergrößern für Touch */
    .rtp-hotspot-wrapper {
        --hotspot-size: 50px;
    }

    .rtp-hotspot {
        font-size: 18px;
        background: #666;
    }

    /* Aktive Hotspots: Grün */
    .rtp-hotspot-wrapper.active .rtp-hotspot {
        background: #bccf00;
    }

    /* Hover auf Mobile: Grün */
    .rtp-hotspot-wrapper:hover .rtp-hotspot {
        background: #bccf00;
    }

    /* Labels ausblenden auf Mobile */
    .rtp-hotspot-label {
        display: none;
    }

    /* Navigation kompakter */
    .rtp-navigation {
        gap: 4px;
    }

    .rtp-nav-button {
        padding: 10px 16px;
        font-size: 12px;
    }

    .rtp-nav-play,
    .rtp-nav-stop {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Desktop Text-Overlay ausblenden auf Mobile */
    .rtp-text-overlay {
        display: none;
    }

    /* Mobile Text-Overlay einblenden */
    .rtp-text-overlay-mobile {
        display: block;
    }
}
