/* 0.5.35 — transporte ancorado na viewport real do celular.
   O rodapé não participa mais do cálculo do grid: fica sempre visível no fundo. */
@media (max-width:760px){
  html.emr-mobile-mix-open,
  body.emr-mobile-mix-open{
    width:100%!important;
    height:100%!important;
    min-height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    overscroll-behavior:none!important;
    background:#060a0c!important;
  }

  body.emr-mobile-mix-open #emr-mobile-mix-root:not([hidden]){
    display:block!important;
    position:fixed!important;
    inset:0!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100vw!important;
    height:100dvh!important;
    min-height:0!important;
    max-height:100dvh!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    background:#060a0c!important;
    z-index:2147483646!important;
  }

  #emr-mobile-mix-root .emr-mobile-console{
    position:absolute!important;
    inset:0!important;
    left:0!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    transform:none!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0 0 64px!important;
    display:grid!important;
    grid-template-rows:40px 44px 48px 120px minmax(0,1fr)!important;
    overflow:hidden!important;
    border-radius:0!important;
    box-sizing:border-box!important;
  }

  /* Topo bem compacto */
  #emr-mobile-mix-root .emr-mobile-console>header{
    grid-row:1!important;
    height:40px!important;
    min-height:40px!important;
    padding:3px 6px!important;
    grid-template-columns:minmax(0,1fr) 36px!important;
  }
  #emr-mobile-mix-root .emr-mobile-brand:before{width:29px!important;height:29px!important;flex-basis:29px!important;border-radius:5px!important}
  #emr-mobile-mix-root .emr-mobile-brand span{font-size:17px!important}
  #emr-mobile-mix-root .emr-mobile-brand strong{font-size:15px!important}
  #emr-mobile-mix-root .emr-mobile-brand b{font-size:7px!important}
  #emr-mobile-mix-root .emr-mobile-console>header>button{
    width:32px!important;height:32px!important;min-width:32px!important;
    display:grid!important;place-items:center!important;margin:0!important;padding:0!important;font-size:18px!important;
  }

  #emr-mobile-mix-root .emr-mobile-preset{
    grid-row:2!important;height:44px!important;min-height:44px!important;
    grid-template-columns:53px minmax(0,1fr)!important;gap:6px!important;padding:5px 8px!important;
  }
  #emr-mobile-mix-root .emr-mobile-preset label{font-size:8px!important;letter-spacing:1.5px!important}
  #emr-mobile-mix-root .emr-mobile-preset select{height:32px!important;min-height:32px!important;font-size:12px!important;padding:0 8px!important}

  #emr-mobile-mix-root .emr-mobile-top-actions{
    grid-row:3!important;height:48px!important;min-height:48px!important;padding:5px 6px!important;gap:6px!important;
  }
  #emr-mobile-mix-root .emr-mobile-top-actions button{
    height:34px!important;border-radius:18px!important;font-size:9px!important;letter-spacing:.1px!important;padding:0 3px!important;
  }

  /* Botões de fontes uniformes; área bem menor para liberar a mesa. */
  #emr-mobile-mix-root .emr-mobile-source-room{
    grid-row:4!important;
    width:100%!important;height:120px!important;min-height:120px!important;
    grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr)!important;
    gap:7px!important;padding:7px!important;overflow:hidden!important;
  }
  #emr-mobile-mix-root .emr-mobile-source-left{grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:5px!important}
  #emr-mobile-mix-root .emr-mobile-source-right{grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  #emr-mobile-mix-root .emr-mobile-source-room button{
    width:100%!important;height:100%!important;min-height:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    padding:3px 6px!important;margin:0!important;
    border-radius:15px!important;font-size:13px!important;line-height:1!important;letter-spacing:.15px!important;
    text-align:center!important;white-space:normal!important;overflow:hidden!important;
    border:1px solid #465157!important;
    background:linear-gradient(#3a4044,#1a1e20 56%,#090b0c)!important;
    box-shadow:inset 0 2px 2px #ffffff20,inset 0 -4px 7px #000,0 3px 5px #0009!important;
  }
  #emr-mobile-mix-root .emr-mobile-source-right button{border-radius:12px!important;font-size:12px!important;padding:4px 6px!important}

  /* A mesa ocupa todo o espaço restante acima do transporte. */
  #emr-mobile-mix-root .emr-mobile-channel-stage{
    grid-row:5!important;
    position:relative!important;
    width:100%!important;height:100%!important;min-height:0!important;
    display:grid!important;grid-template-rows:minmax(0,1fr) 9px!important;
    margin:0!important;padding:0!important;overflow:hidden!important;background:#090d0f!important;
  }
  #emr-mobile-mix-root .emr-mobile-channels{
    width:100%!important;height:100%!important;min-height:0!important;
    display:flex!important;align-items:stretch!important;gap:4px!important;
    padding:3px 2px!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important;
    scrollbar-width:none!important;-ms-overflow-style:none!important;touch-action:none!important;
  }
  #emr-mobile-mix-root .emr-mobile-channels::-webkit-scrollbar{display:none!important}
  #emr-mobile-mix-root .emr-mobile-channel{
    flex:0 0 24.5%!important;min-width:76px!important;height:100%!important;min-height:0!important;
    padding:5px 3px 11px!important;border-radius:3px!important;
  }
  #emr-mobile-mix-root .emr-mobile-channel>strong{padding-bottom:2px!important;font-size:9px!important;border-bottom-width:3px!important}
  #emr-mobile-mix-root .emr-mobile-channel>span{margin-top:2px!important;font-size:6px!important;line-height:1!important}
  #emr-mobile-mix-root .emr-mobile-channel>b{margin-top:2px!important;font-size:9px!important}
  #emr-mobile-mix-root .emr-mobile-channel .emr-mobile-vu{
    left:5px!important;top:49px!important;bottom:11px!important;width:6px!important;
  }
  #emr-mobile-mix-root .emr-mobile-channel input{
    top:64%!important;width:min(118px,24vh)!important;height:24px!important;
  }
  #emr-mobile-mix-root .emr-mobile-rack-nav{height:9px!important;min-height:9px!important;padding:2px 6px!important}
  #emr-mobile-mix-root .emr-mobile-rack-scroll{height:4px!important}
  #emr-mobile-mix-root .emr-mobile-rack-scroll::-webkit-slider-thumb{width:22px!important;height:4px!important}
  #emr-mobile-mix-root .emr-mobile-rack-scroll::-moz-range-thumb{width:22px!important;height:4px!important}

  /* GARANTIA: o transporte fica preso ao rodapé da viewport. */
  #emr-mobile-mix-root .emr-mobile-transport{
    position:absolute!important;
    left:0!important;right:0!important;bottom:0!important;top:auto!important;
    z-index:30!important;
    width:100%!important;height:64px!important;min-height:64px!important;
    display:grid!important;grid-template-columns:42px 42px 56px 42px 42px!important;
    align-items:center!important;justify-content:space-evenly!important;
    margin:0!important;padding:4px 6px max(4px,env(safe-area-inset-bottom))!important;
    border-top:1px solid #465157!important;
    background:linear-gradient(#252d31,#111619 72%,#080b0d)!important;
    box-shadow:0 -3px 8px #000c!important;overflow:visible!important;
  }
  #emr-mobile-mix-root .emr-mobile-transport button{
    position:relative!important;display:grid!important;place-items:center!important;
    width:42px!important;height:46px!important;min-width:0!important;margin:0!important;padding:0!important;border-radius:9px!important;
  }
  #emr-mobile-mix-root .emr-mobile-transport button.is-play{width:54px!important;height:54px!important;border-radius:50%!important}
  #emr-mobile-mix-root .emr-mobile-transport button>span{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;margin:0!important}
  #emr-mobile-mix-root .emr-play-icon{border-top-width:10px!important;border-bottom-width:10px!important;border-left-width:16px!important}
  #emr-mobile-mix-root .emr-stop-icon{width:14px!important;height:14px!important}
  #emr-mobile-mix-root .emr-repeat{font-size:25px!important}

  /* Telas muito baixas: tira mais alguns pixels do topo, nunca do transporte. */
  @media (max-height:600px){
    #emr-mobile-mix-root .emr-mobile-console{padding-bottom:58px!important;grid-template-rows:36px 40px 44px 104px minmax(0,1fr)!important}
    #emr-mobile-mix-root .emr-mobile-console>header{height:36px!important;min-height:36px!important;padding:2px 5px!important}
    #emr-mobile-mix-root .emr-mobile-brand:before{width:25px!important;height:25px!important;flex-basis:25px!important}
    #emr-mobile-mix-root .emr-mobile-brand span{font-size:15px!important}
    #emr-mobile-mix-root .emr-mobile-brand strong{font-size:13px!important}
    #emr-mobile-mix-root .emr-mobile-brand b{font-size:6px!important}
    #emr-mobile-mix-root .emr-mobile-console>header>button{width:29px!important;height:29px!important;font-size:16px!important}
    #emr-mobile-mix-root .emr-mobile-preset{height:40px!important;min-height:40px!important;padding:4px 6px!important}
    #emr-mobile-mix-root .emr-mobile-preset select{height:28px!important;min-height:28px!important;font-size:11px!important}
    #emr-mobile-mix-root .emr-mobile-top-actions{height:44px!important;min-height:44px!important;padding:4px 5px!important}
    #emr-mobile-mix-root .emr-mobile-top-actions button{height:31px!important;font-size:8px!important}
    #emr-mobile-mix-root .emr-mobile-source-room{height:104px!important;min-height:104px!important;padding:5px!important;gap:5px!important}
    #emr-mobile-mix-root .emr-mobile-source-left{gap:4px!important}
    #emr-mobile-mix-root .emr-mobile-source-right{gap:5px!important}
    #emr-mobile-mix-root .emr-mobile-source-room button{font-size:11px!important;border-radius:12px!important;padding:2px 4px!important}
    #emr-mobile-mix-root .emr-mobile-source-right button{font-size:10px!important;border-radius:10px!important}
    #emr-mobile-mix-root .emr-mobile-channel{min-width:72px!important;padding-top:4px!important}
    #emr-mobile-mix-root .emr-mobile-channel>strong{font-size:8px!important}
    #emr-mobile-mix-root .emr-mobile-channel>span{font-size:5.5px!important}
    #emr-mobile-mix-root .emr-mobile-channel>b{font-size:8px!important}
    #emr-mobile-mix-root .emr-mobile-channel .emr-mobile-vu{top:43px!important;bottom:9px!important}
    #emr-mobile-mix-root .emr-mobile-channel input{width:min(105px,22vh)!important;height:22px!important;top:65%!important}
    #emr-mobile-mix-root .emr-mobile-transport{height:58px!important;min-height:58px!important;grid-template-columns:38px 38px 50px 38px 38px!important;padding:3px 5px max(3px,env(safe-area-inset-bottom))!important}
    #emr-mobile-mix-root .emr-mobile-transport button{width:38px!important;height:42px!important}
    #emr-mobile-mix-root .emr-mobile-transport button.is-play{width:50px!important;height:50px!important}
  }

  @media (max-height:520px){
    #emr-mobile-mix-root .emr-mobile-console{padding-bottom:54px!important;grid-template-rows:34px 38px 40px 92px minmax(0,1fr)!important}
    #emr-mobile-mix-root .emr-mobile-console>header{height:34px!important;min-height:34px!important}
    #emr-mobile-mix-root .emr-mobile-preset{height:38px!important;min-height:38px!important}
    #emr-mobile-mix-root .emr-mobile-top-actions{height:40px!important;min-height:40px!important}
    #emr-mobile-mix-root .emr-mobile-top-actions button{height:28px!important;font-size:7.5px!important}
    #emr-mobile-mix-root .emr-mobile-source-room{height:92px!important;min-height:92px!important;padding:4px!important}
    #emr-mobile-mix-root .emr-mobile-source-room button{font-size:10px!important;border-radius:10px!important}
    #emr-mobile-mix-root .emr-mobile-source-right button{font-size:9px!important}
    #emr-mobile-mix-root .emr-mobile-channel{min-width:68px!important}
    #emr-mobile-mix-root .emr-mobile-channel input{width:min(92px,20vh)!important}
    #emr-mobile-mix-root .emr-mobile-transport{height:54px!important;min-height:54px!important;grid-template-columns:36px 36px 46px 36px 36px!important}
    #emr-mobile-mix-root .emr-mobile-transport button{width:36px!important;height:39px!important}
    #emr-mobile-mix-root .emr-mobile-transport button.is-play{width:46px!important;height:46px!important}
  }
}
