/* ========================================================================
   MSB Music 10.9.88 — Unified Fixed Player Safe Area
   ------------------------------------------------------------------------
   One geometry contract for Light/Dark. The shared shell owns the fixed
   player clearance. Full-page embedded application shells that visually end
   inside their own surface (currently subscription account) get only a small
   external breathing tail; their internal layout remains plugin-owned.

   Presentation only: no JS, polling, AJAX/REST or database work.
   ======================================================================== */

:root {
    --msb-player-clearance-desktop: 96px;
    --msb-player-clearance-mobile: 48px;
    --msb-player-embedded-tail-desktop: 28px;
    --msb-player-embedded-tail-mobile: 16px;
}

/* Desktop: one shell-level reserve for every ordinary page. */
@media (min-width: 992px) {
    html[data-theme="light"] body .main-content,
    html[data-theme="dark"] body .main-content,
    html[data-theme="light"] body.msb-artist-profile-active .main-content.msb-artist-profile-main,
    html[data-theme="dark"] body.msb-artist-profile-active .main-content.msb-artist-profile-main {
        padding-bottom: var(--msb-player-clearance-desktop) !important;
    }

    /*
     * Subscription account is an embedded app surface with its own page
     * background/padding. A margin after that surface is the correct place
     * for breathing room; increasing its internal padding would distort the
     * plugin's card/table geometry and differ between themes.
     */
    body .msb-account-page.msb-sub-page {
        margin-bottom: var(--msb-player-embedded-tail-desktop) !important;
    }

    html[data-theme="light"],
    html[data-theme="dark"] {
        scroll-padding-bottom: var(--msb-player-clearance-desktop);
    }
}

/* Mobile/tablet: same geometry for Light and Dark. */
@media (max-width: 991px) {
    html[data-theme="light"] body .app-wrapper > .main-container,
    html[data-theme="dark"] body .app-wrapper > .main-container,
    html[data-theme="light"] body.msb-artist-profile-active .app-wrapper > .main-container,
    html[data-theme="dark"] body.msb-artist-profile-active .app-wrapper > .main-container {
        padding-bottom: var(--msb-player-clearance-mobile) !important;
    }

    html[data-theme="light"] body .main-content,
    html[data-theme="dark"] body .main-content,
    html[data-theme="light"] body.msb-artist-profile-active .main-content.msb-artist-profile-main,
    html[data-theme="dark"] body.msb-artist-profile-active .main-content.msb-artist-profile-main {
        padding-bottom: var(--msb-player-clearance-mobile) !important;
    }

    body .msb-account-page.msb-sub-page {
        margin-bottom: var(--msb-player-embedded-tail-mobile) !important;
    }

    html[data-theme="light"],
    html[data-theme="dark"] {
        scroll-padding-bottom: var(--msb-player-clearance-mobile);
    }
}


/* MSB 10.9.88.1 - mobile artists page player spacing refinement */
@media (max-width: 991px) {
    body.msb-artists-page .main-content,
    body.msb-artists-directory-page .main-content {
        padding-bottom: 48px !important;
    }

    body.msb-artists-page .msb-artists-directory,
    body.msb-artists-directory-page .msb-artists-directory {
        margin-bottom: 0 !important;
    }

    body.msb-artists-page .msb-artists-load-more,
    body.msb-artists-directory-page .msb-artists-load-more {
        margin-bottom: 8px !important;
    }
}
