/* NEXT v86.6: restore dashboard menu and add explicit exit from active pass.
   Bug source: tv-mode is a saved preference and can be active outside pass mode.
   App topbar must only be hidden in the actual exercise screen, not whenever tv-mode is enabled. */

/* Normal navigation must be visible on dashboard/profile/library/tests even if TV mode is saved. */
body.tv-mode:not(.exercise-active) .app-topbar{
  display:grid!important;
}

/* The home-specific nav remains hidden on mobile so we only have one ordinary menu. */
@media(max-width:1059px){
  body.tv-mode:not(.exercise-active) .app-topbar{
    display:grid!important;
  }
  body.tv-mode:not(.exercise-active) .app-topbar .app-tabs{
    display:none!important;
  }
  body.tv-mode:not(.exercise-active) .app-topbar.nav-open .app-tabs{
    display:grid!important;
  }
}

/* Pass mode top strip: Menu + Avsluta + compact meta. */
@media(max-width:1059px){
  body.exercise-active .sticky-nav .nav-row{
    grid-template-columns:auto auto minmax(0,1fr)!important;
    grid-template-areas:'actions exit meta'!important;
  }
  body.exercise-active .sticky-nav .nav-actions{
    grid-area:actions!important;
  }
  body.exercise-active .exit-pass-btn{
    grid-area:exit!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:70px!important;
    height:34px!important;
    min-height:34px!important;
    padding:6px 10px!important;
    border-radius:14px!important;
    border:1px solid rgba(255,104,104,.28)!important;
    background:linear-gradient(180deg,rgba(255,104,104,.16),rgba(255,104,104,.055))!important;
    color:#ffd8d8!important;
    font:inherit!important;
    font-size:13px!important;
    font-weight:950!important;
    line-height:1!important;
    white-space:nowrap!important;
    cursor:pointer!important;
    box-shadow:none!important;
  }
  body.exercise-active .exit-pass-btn:active{
    transform:translateY(1px);
  }
  body.exercise-active .top-tools .danger-tool{
    border-color:rgba(255,104,104,.34)!important;
    background:rgba(255,104,104,.12)!important;
    color:#ffd8d8!important;
  }
}

/* Outside active pass the exit button should never show. */
.exit-pass-btn{display:none;}

@media(max-width:390px){
  body.exercise-active .exit-pass-btn{
    min-width:58px!important;
    padding:6px 8px!important;
    font-size:12px!important;
  }
}

@media(max-width:1059px) and (orientation:landscape){
  body.exercise-active .exit-pass-btn{
    height:30px!important;
    min-height:30px!important;
    border-radius:12px!important;
    font-size:12px!important;
  }
}
