/* Back Lot Music — floating phone nav (under 768px). Mirrors the desktop pill:
   frosted glass, white chip on the current page, the same studio logos. */

.blm-tabbar { display: none; }

@media (max-width: 767.98px) {

  .blm-tabbar:not([hidden]),
  .blm-tabbar[hidden] {            /* [hidden] is only the no-CSS fallback; the stylesheet takes over */
    display: block !important;
    position: fixed;
    left: 10px; right: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9000;                 /* over the page and header; under the loading screen and the search screen */
    font-family: inherit;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  /* --- the desktop glass --- */
  .blm-tabbar__pill {
    max-width: 440px; margin: 0 auto;
    height: 56px; padding: 4px; box-sizing: border-box;
    background: rgba(40, 40, 40, .42);
    background-image: linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.2));
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
            backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, .3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, .28);
    border-radius: 50px;
  }

  .blm-tabbar ul.blm-tabbar__list {
    display: flex; align-items: stretch; justify-content: space-between;
    height: 100%; margin: 0 !important; padding: 0 !important; list-style: none;
  }
  .blm-tabbar ul.blm-tabbar__list > li {
    flex: 0 0 auto; margin: 0 !important; padding: 0 !important;
    display: flex; float: none; background: none !important;
  }
  .blm-tabbar ul.blm-tabbar__list > li > a {
    display: flex; align-items: center; justify-content: center;
    height: 100%; box-sizing: border-box;
    padding: 0 var(--blm-tab-pad, 11px) !important;
    border-radius: 50px; border: 0 !important;
    color: #fff; text-decoration: none !important;
    font-size: var(--blm-tab-text, 12px) !important; line-height: 1 !important; letter-spacing: .02em;
    text-transform: uppercase; white-space: nowrap;
    transition: background-color .22s ease, color .22s ease;
  }
  /* studio logos: one height, their own proportions */
  .blm-tabbar ul.blm-tabbar__list > li > a img {
    display: block; height: var(--blm-tab-logo, 16px) !important; width: auto !important; max-width: none !important;
    border: 0 !important; border-radius: 0 !important; margin: 0 !important;
    transition: filter .22s ease;
  }
  /* DreamWorks' wordmark is far too wide for a phone bar: show its moon mark (the left end of the same image) */
  .blm-tabbar ul.blm-tabbar__list > li > a[href*="dreamworks"] img {
    height: calc(var(--blm-tab-logo, 16px) + 7px) !important; width: calc(var(--blm-tab-logo, 16px) + 7px) !important;
    object-fit: cover; object-position: left center;
  }

  /* Home is a house icon in the bar. The word "HOME" stays in the link for screen readers; the icon is drawn
     in the link's own colour, so it turns black on the white chip like everything else. */
  .blm-tabbar ul.blm-tabbar__list > li.menu-item-home > a { font-size: 0 !important; letter-spacing: 0; }
  .blm-tabbar ul.blm-tabbar__list > li.menu-item-home > a::before {
    content: ""; display: block; width: var(--blm-tab-home, 22px); height: var(--blm-tab-home, 22px);
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.6 10.6 12 3.5l8.4 7.1V20a.8.8 0 0 1-.8.8h-4.9v-6.3H9.3v6.3H4.4a.8.8 0 0 1-.8-.8z' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.6 10.6 12 3.5l8.4 7.1V20a.8.8 0 0 1-.8.8h-4.9v-6.3H9.3v6.3H4.4a.8.8 0 0 1-.8-.8z' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  /* the white chip — current page (same rule the desktop nav uses), or the one just tapped */
  .blm-tabbar ul.blm-tabbar__list > li.current-menu-item > a,
  .blm-tabbar ul.blm-tabbar__list > li.blm-tab-on > a { background: #fff; color: #000 !important; }
  .blm-tabbar ul.blm-tabbar__list > li.current-menu-item > a img,
  .blm-tabbar ul.blm-tabbar__list > li.blm-tab-on > a img { filter: brightness(0) !important; }
  /* while a tapped tab is loading, the old chip lets go */
  .blm-tabbar.blm-tabbar--going ul.blm-tabbar__list > li.current-menu-item:not(.blm-tab-on) > a { background: transparent; color: #fff !important; }
  .blm-tabbar.blm-tabbar--going ul.blm-tabbar__list > li.current-menu-item:not(.blm-tab-on) > a img { filter: none !important; }
  .blm-tabbar ul.blm-tabbar__list > li:not(.current-menu-item):not(.blm-tab-on) > a:active { background-color: rgba(255,255,255,.16); }
  .blm-tabbar ul.blm-tabbar__list > li > a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

  /* slide away while the keyboard is up, while the hamburger menu is open, and while a cookie / consent
     banner owns the bottom of the screen */
  .blm-tabbar.blm-tabbar--away,
  body:has(.hamburger.is-active) > .blm-tabbar,
  body:has(.cky-consent-container:not(.cky-hide)) > .blm-tabbar,
  body:has(#onetrust-banner-sdk:not([style*="display: none"])) > .blm-tabbar { transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none; }

  /* the cookie-settings badge normally sits in the bottom-left corner: keep it reachable, just above the bar */
  .cky-btn-revisit-wrapper,
  #ot-sdk-btn-floating.ot-floating-button { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }

  /* room so the last thing on the page is never under the bar */
  footer.footer { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* narrower phones: a little less air, slightly smaller marks */
@media (max-width: 379.98px) { .blm-tabbar { --blm-tab-pad: 9px; --blm-tab-logo: 16px; --blm-tab-text: 12px; --blm-tab-home: 21px; left: 8px !important; right: 8px !important; } }
@media (max-width: 349.98px) { .blm-tabbar { --blm-tab-pad: 7px; --blm-tab-logo: 14px; --blm-tab-text: 11px; --blm-tab-home: 19px; left: 6px !important; right: 6px !important; } }

@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .blm-tabbar, .blm-tabbar ul.blm-tabbar__list > li > a { transition: none !important; }
}
