/* JamaicanSounds shared video player (mini player in the corner)
 * Used by index.php, videos.php and artist.php together with /js/player.js
 */

/* Cards lift on hover; a transformed ancestor would trap the fixed-position iframe */
body.has-mini-player .js-video-card,
body.has-mini-player .js-video-card:hover { transform: none !important; }

.js-player-wrap { position: relative; }
.js-player-placeholder { background: #000; border-radius: 10px; }

#mini-player-host {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}
#mini-player-host iframe { pointer-events: auto; }

iframe.mini-player {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    top: auto !important;
    left: auto !important;
    width: 360px !important;
    max-width: 45vw !important;
    height: 203px !important;
    max-height: 26vw !important;
    z-index: 9999 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.45) !important;
    background: #000 !important;
    transition: box-shadow .2s ease;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}
iframe.mini-player.mini-expanded {
    width: 640px !important;
    height: 360px !important;
    max-width: calc(100vw - 40px) !important;
    max-height: calc((100vw - 40px) * 9 / 16) !important;
}

/* Close + expand/shrink buttons (positioned by player.js) */
.mini-player-close,
.mini-player-expand {
    position: fixed; z-index: 10000;
    width: 28px; height: 28px;
    border: 0; border-radius: 50%;
    background: rgba(0,0,0,.75); color: #fff;
    line-height: 1; text-align: center; cursor: pointer; padding: 0;
    display: none; align-items: center; justify-content: center;
    font-family: system-ui, sans-serif;
}
.mini-player-close { font-size: 18px; }
.mini-player-expand { font-size: 14px; }
.mini-player-close:hover,
.mini-player-expand:hover { background: rgba(0,0,0,.95); }

/* Phones (portrait): bigger player, parked above the app tab bar */
@media (max-width: 768px) {
    iframe.mini-player { width: 62vw !important; height: calc(62vw * 9 / 16) !important; max-width: none !important; max-height: none !important; right: 10px !important; bottom: 10px !important; }
    iframe.mini-player.mini-expanded { width: calc(100vw - 16px) !important; height: calc((100vw - 16px) * 9 / 16) !important; max-width: none !important; max-height: none !important; right: 8px !important; }
    body.has-tabbar iframe.mini-player { bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
    .mini-player-close, .mini-player-expand { width: 36px; height: 36px; font-size: 20px; }
}
/* Phone sideways: see the landscape block in /css/site.css */