/* MZ Radio - PATCH 14 Phase 6: final stable mobile nav + restored drawer */
@media (min-width: 781px){
  .mz-mobile-menu-btn-v4,.mz-mobile-drawer-v4,.mz-mobile-drawer-mask-v4,.mz-mobile-bottom-v4{display:none!important}
}
@media (max-width: 780px){
  :root{--mz-mobile-bar-h:58px;--mz-mobile-bar-bottom:14px;--mz-green:#06483d;--mz-green2:#02352e;--mz-gold:#f4ca72;--mz-cream:#fff8ea;}
  html,body{overflow-x:hidden!important;}
  body{padding-bottom:calc(var(--mz-mobile-bar-h) + 42px + env(safe-area-inset-bottom,0px))!important;}

  /* Hide desktop/top buttons on mobile; keep brand/header compact */
  header .nav, .top .nav, .desktop-nav, .main-nav, .nav-links,
  header.top .nav, .top nav, .top .actions, header .actions{
    display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;width:0!important;height:0!important;overflow:hidden!important;
  }
  header.top,.top,body>header{
    min-height:52px!important;height:52px!important;padding:6px 10px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    background:linear-gradient(135deg,#07483c,#032d27)!important;
    border-bottom:1px solid rgba(244,202,114,.42)!important;box-shadow:0 10px 26px rgba(0,0,0,.16)!important;
    z-index:1000!important;overflow:visible!important;
  }
  .brand, .top .brand, header.top .brand{
    display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
    max-width:68vw!important;margin:0 auto!important;color:var(--mz-gold)!important;font-weight:900!important;
    font-size:16px!important;white-space:nowrap!important;overflow:hidden!important;text-decoration:none!important;
  }
  .brand img,.top .brand img,header.top .brand img{width:34px!important;height:34px!important;object-fit:contain!important;border-radius:10px!important;background:rgba(255,255,255,.08)!important;padding:3px!important;}

  /* Restored hamburger */
  .mz-mobile-menu-btn-v4{
    position:fixed!important;top:58px!important;left:12px!important;z-index:2147483001!important;
    width:50px!important;height:50px!important;border-radius:16px!important;
    border:1px solid rgba(244,202,114,.85)!important;background:linear-gradient(145deg,#0a5a4d,#073d35)!important;
    box-shadow:0 12px 28px rgba(0,0,0,.23)!important;display:flex!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;gap:6px!important;cursor:pointer!important;
  }
  .mz-mobile-menu-btn-v4 span{display:block!important;width:25px!important;height:3px!important;border-radius:999px!important;background:#f7db8d!important;box-shadow:0 0 8px rgba(244,202,114,.28)!important;}

  .mz-mobile-drawer-mask-v4{position:fixed!important;inset:0!important;z-index:2147482998!important;background:rgba(0,0,0,.46)!important;opacity:0!important;pointer-events:none!important;transition:.22s ease!important;backdrop-filter:blur(2px)!important;}
  .mz-mobile-drawer-v4{position:fixed!important;top:0!important;bottom:0!important;right:0!important;width:min(86vw,345px)!important;z-index:2147482999!important;background:linear-gradient(160deg,#04291f,#073b30 55%,#021c17)!important;border-left:1px solid rgba(244,202,114,.38)!important;box-shadow:-18px 0 55px rgba(0,0,0,.36)!important;transform:translateX(106%)!important;transition:.25s ease!important;padding:18px 16px calc(92px + env(safe-area-inset-bottom,0px))!important;overflow:auto!important;color:#fff!important;direction:rtl!important;}
  body.mz-mobile-menu-open-v4 .mz-mobile-drawer-mask-v4{opacity:1!important;pointer-events:auto!important;}
  body.mz-mobile-menu-open-v4 .mz-mobile-drawer-v4{transform:translateX(0)!important;}
  .mz-mobile-drawer-head-v4{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:18px!important;padding-bottom:14px!important;border-bottom:1px solid rgba(244,202,114,.24)!important;}
  .mz-mobile-drawer-brand-v4{display:flex!important;align-items:center!important;gap:10px!important;color:#fff!important;text-decoration:none!important;min-width:0!important;}
  .mz-mobile-drawer-brand-v4 img{width:48px!important;height:48px!important;border-radius:15px!important;object-fit:cover!important;background:#06382e!important;border:1px solid rgba(244,202,114,.38)!important;}
  .mz-mobile-drawer-brand-v4 b{display:block!important;font-size:18px!important;color:#f6d98a!important;line-height:1.1!important;}
  .mz-mobile-drawer-brand-v4 small{display:block!important;color:#fff!important;font-size:12px!important;margin-top:3px!important;}
  .mz-mobile-close-v4{width:38px!important;height:38px!important;border-radius:13px!important;border:1px solid rgba(244,202,114,.34)!important;background:rgba(255,255,255,.06)!important;color:#fff!important;font-size:28px!important;line-height:1!important;cursor:pointer!important;}
  .mz-mobile-drawer-links-v4{display:grid!important;gap:9px!important;}
  .mz-mobile-drawer-links-v4 a{display:flex!important;align-items:center!important;gap:9px!important;min-height:44px!important;padding:12px 13px!important;border-radius:15px!important;text-decoration:none!important;color:#fff!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(244,202,114,.22)!important;font-weight:800!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important;}
  .mz-mobile-drawer-links-v4 a.active,.mz-mobile-drawer-links-v4 a:hover{background:linear-gradient(135deg,#f6d98a,#d7a93f)!important;color:#06382e!important;border-color:#f6d98a!important;}

  /* Final stable bottom bar: no JS reposition, no floating movement */
  .mz-mobile-bottom-v4,
  #mzMobileBottomNav,
  .mz-mobile-bar.mz-mobile-bottom-v4{
    position:fixed!important;left:10px!important;right:10px!important;
    bottom:max(var(--mz-mobile-bar-bottom), env(safe-area-inset-bottom,0px))!important;
    height:var(--mz-mobile-bar-h)!important;min-height:var(--mz-mobile-bar-h)!important;max-height:var(--mz-mobile-bar-h)!important;
    z-index:2147482500!important;display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:4px!important;
    padding:5px!important;border-radius:20px!important;overflow:hidden!important;
    background:linear-gradient(160deg,rgba(2,58,50,.96),rgba(6,82,70,.96))!important;
    border:1px solid rgba(244,202,114,.46)!important;box-shadow:0 -8px 26px rgba(0,0,0,.25)!important;
    backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important;
    transform:none!important;translate:none!important;animation:none!important;transition:none!important;
  }
  .mz-mobile-bottom-v4 a,#mzMobileBottomNav a{
    min-width:0!important;height:48px!important;text-decoration:none!important;color:#eee!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;font-size:10.5px!important;font-weight:800!important;border-radius:15px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.06)!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;
  }
  .mz-mobile-bottom-v4 a b,#mzMobileBottomNav a b{font-size:18px!important;line-height:1!important;color:#f6d98a!important;font-weight:900!important;margin:0!important;}
  .mz-mobile-bottom-v4 a span,#mzMobileBottomNav a span{line-height:1.1!important;}
  .mz-mobile-bottom-v4 a.active,#mzMobileBottomNav a.active,.mz-mobile-bottom-v4 a[aria-current="page"],#mzMobileBottomNav a[aria-current="page"]{background:linear-gradient(135deg,#ffe89d,#e0ad31)!important;color:#06382e!important;border-color:#f7db8d!important;box-shadow:inset 0 2px 10px rgba(255,255,255,.18)!important;}
  .mz-mobile-bottom-v4 a.active b,#mzMobileBottomNav a.active b{color:#06382e!important;}

  /* kill old duplicate bars from previous mobile patches */
  .mz-bottom-nav:not(.mz-mobile-bottom-v4),.mobile-bottom-nav:not(.mz-mobile-bottom-v4),.mz-mobile-bar:not(.mz-mobile-bottom-v4){display:none!important;}
  .mz-duplicate-mobile-bar{display:none!important;}

  /* visitor badge above bar, not inside it */
  body > #mzVisitorsBadge, body > .visitor-badge, body > .visitors-badge, body > .live-visitors,
  #mzVisitorsBadge,.visitor-badge,.visitors-badge,.live-visitors{
    bottom:calc(max(var(--mz-mobile-bar-bottom), env(safe-area-inset-bottom,0px)) + var(--mz-mobile-bar-h) + 8px)!important;
    z-index:2147482400!important;max-width:170px!important;transform:none!important;animation:none!important;transition:none!important;
  }

  main.container,.container,.wrap,.mixed-wrap{padding-left:12px!important;padding-right:12px!important;}
}

/* MZ Radio - Patch 29: mobile drawer sections + admin-only section styling */
@media (max-width: 780px){
  .mz-mobile-drawer-section-v4{
    margin:12px 2px 3px!important;
    padding:8px 10px 5px!important;
    color:#f6d98a!important;
    font-size:13px!important;
    font-weight:1000!important;
    letter-spacing:.2px!important;
    border-bottom:1px solid rgba(244,202,114,.22)!important;
    opacity:.98!important;
  }
  .mz-mobile-drawer-section-v4.admin{
    margin-top:16px!important;
    color:#fff3bd!important;
    background:rgba(244,202,114,.10)!important;
    border:1px solid rgba(244,202,114,.28)!important;
    border-radius:14px!important;
  }
  .mz-mobile-drawer-links-v4 a{
    justify-content:flex-start!important;
    font-size:14.5px!important;
  }
}
