/* webapp/css/spa_transitions.css */
/* SPA layout: let pages use flex sizing (needed by watch pages) */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-offset, 150px);
}

#app {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.2s ease-in-out;
    opacity: 1;
}

#app.fade-out {
    opacity: 0;
}

#app.fade-in {
    opacity: 1;
}

/* --- Global Player States --- */

/* Default: hidden until media is loaded */
#globalPlayer {
    display: none;
    width: 100%;
    height: 100%;
    background: #000;
}

#globalPlayer.visible {
    display: block;
}

/* Mini Mode: Docked in Footer Panel (replacing artwork) */
body.video-mini-mode #globalPlayer {
    display: block;
    position: fixed;
    bottom: 10px; /* (80px - 60px) / 2 */
    left: 16px;
    width: 60px;
    height: 60px;
    z-index: 2600; /* Above footer panel (2500) */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Hide static artwork when video is playing there */
body.video-mini-mode .fp-artwork {
    opacity: 0 !important;
    pointer-events: none;
}

/* Mobile adjustments for Mini Mode */
@media screen and (max-width: 600px) {
    body.video-mini-mode #globalPlayer {
        bottom: 12px; /* (100px - 76px) / 2 */
        left: 12px;
        width: 76px;
        height: 76px;
    }
}

/* Cinema Mode: GlobalPlayer is mounted into .video-wrapper on watch page */
