/* Gemeinsame Stile für alle Buttons */
#prevBtn,
#nextBtn,
#playPauseBtn,
#closeButtonZoom,
#buttonios,
.unmute-btn {
    z-index: 9999 !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    /* Entfernt grauen Kasten auf iOS */
    cursor: pointer;

    /* Glas-Effekt mit iOS-Support */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.3);

    /* Standard-Positionierung */
    position: fixed;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
}

/* Standard Vertikale Position für alle Nav-Elemente */
#prevBtn,
#nextBtn,
#playPauseBtn,
#buttonios,
.unmute-btn {
    top: var(--dynamic-image-center-y, 50%);
}

/* Standard-Zustand: Zeige das Play-Icon */
#playPauseBtn::before {
    content: '▶️';
    font-size: 24px;
}

/* Wenn die Klasse .paused-state aktiv ist, zeige Pause */
#playPauseBtn.playing::before {
    transition: opacity 4.3s ease;
    content: '⏸️';
}

/* Dein Wunsch: Unsichtbar beim Abspielen */
#playPauseBtn.playing {
    opacity: 0.4;
    transition: opacity 4.3s ease;
}

/* Optional: Damit man beim Drüberfahren sieht, dass man pausieren kann */
#playPauseBtn.playing:hover {
    opacity: 0.7;
}


/* --- HORIZONTAL PORTRAIT (Handy Hochkant) --- */
@media only screen and (orientation: portrait) {

    .nav-button {
        background: rgba(11, 234, 67, 0.2);
    }

    #prevBtn {
        left: 10px;
    }

    #nextBtn {
        right: 10px;
    }

    /* Korrektur der fehlerhaften Calc-Formel */
    #buttonios,
    #playPauseBtn,
    .unmute-btn {
        left: 50%;
    }
}

/* --- HORIZONTAL LANDSCAPE (Handy Querformat / Desktop) --- */
@media only screen and (orientation: landscape) {
    #prevBtn {
        /* Sidebar Breite + Puffer */
        left: calc(var(--dynamic-sidebar-width, 360px) + 20px);
        width: 50px;
        height: 50px;
    }

    #nextBtn {
        right: 20px;
        width: 50px;
        height: 50px;
    }

    #buttonios,
    #playPauseBtn {
        left: var(--rigth-center-x, 50%);
    }

    .unmute-btn {
        /* Fixer Wert oder Variable */
        left: calc(720px + 10px);
    }
}

/* Speziell für sehr kleine iPhones im Querformat */
@media only screen and (max-height: 400px) and (orientation: landscape) {
    .nav-button {
        padding: 5px;
        font-size: 14px;
    }
}