/* Liry v54 pinpoint fix
   No DOM override, keeps accessibility button clickable.
   Desktop: next button on physical left.
   Mobile: next button centered.
   Mobile: support bottom-left, accessibility bottom-right. */

@media (min-width:821px){
  body.liry-create-page .wizard-nav,
  body.liry-create-page #songForm .wizard-nav,
  body.liry-create-page .create-card .wizard-nav,
  body.liry-create-page .create-card-v42 .wizard-nav,
  body.liry-create-page .create-card-v43 .wizard-nav{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    direction:ltr!important;
    text-align:left!important;
    width:100%!important;
  }

  body.liry-create-page #nextBtn,
  body.liry-create-page .wizard-nav #nextBtn,
  body.liry-create-page .wizard-nav .primary-btn:not(.wide){
    position:static!important;
    order:-10!important;
    margin-left:0!important;
    margin-right:0!important;
    transform:none!important;
    float:none!important;
    align-self:flex-start!important;
  }
}

@media (max-width:820px){
  html,body{overflow-x:hidden!important;}

  body.liry-create-page .wizard-nav,
  body.liry-create-page #songForm .wizard-nav,
  body.liry-create-page .create-card .wizard-nav,
  body.liry-create-page .create-card-v42 .wizard-nav,
  body.liry-create-page .create-card-v43 .wizard-nav{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    top:auto!important;
    transform:none!important;
    width:100%!important;
    max-width:100%!important;
    min-height:56px!important;
    margin:8px auto 0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    direction:ltr!important;
    text-align:center!important;
    gap:0!important;
  }

  body.liry-create-page #nextBtn,
  body.liry-create-page .wizard-nav #nextBtn,
  body.liry-create-page .wizard-nav .primary-btn:not(.wide){
    position:static!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
    order:2!important;
    float:none!important;
    clear:none!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    width:min(calc(100% - 28px), 348px)!important;
    max-width:348px!important;
    min-width:0!important;
    height:56px!important;
    min-height:56px!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding:0 22px!important;
    align-self:center!important;
    flex:0 1 auto!important;
  }

  body.liry-create-page #prevBtn,
  body.liry-create-page .wizard-nav .ghost-btn{
    position:absolute!important;
    right:0!important;
    left:auto!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;
    width:auto!important;
    min-width:68px!important;
    max-width:92px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 12px!important;
    z-index:5!important;
  }

  body.liry-create-page #prevBtn[style*="display: none"],
  body.liry-create-page .wizard-nav .ghost-btn[style*="display: none"],
  body.liry-create-page #prevBtn.is-hidden{
    display:none!important;
  }

  /* Bottom widgets: fixed at real viewport bottom, clickable */
  body .support-widget,
  body.liry-create-page .support-widget,
  #lirySupportWidget.support-widget{
    position:fixed!important;
    left:10px!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 8px)!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
    pointer-events:auto!important;
    z-index:2147483000!important;
  }

  body .access-widget,
  body .accessibility-widget,
  body.liry-create-page .access-widget,
  body.liry-create-page .accessibility-widget,
  #liryAccessWidget.access-widget{
    position:fixed!important;
    right:10px!important;
    left:auto!important;
    top:auto!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 8px)!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
    pointer-events:auto!important;
    z-index:2147483001!important;
  }

  body .support-fab,
  body.liry-create-page .support-fab,
  #supportFab.support-fab,
  body .access-toggle,
  body .accessibility-toggle,
  body.liry-create-page .access-toggle,
  body.liry-create-page .accessibility-toggle,
  #accessToggle.access-toggle{
    position:relative!important;
    width:auto!important;
    min-width:96px!important;
    max-width:124px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 15px!important;
    border-radius:999px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    line-height:1!important;
    white-space:nowrap!important;
    background:linear-gradient(135deg,#ff741f,#ff922e)!important;
    color:#fff!important;
    border:1px solid rgba(255,255,255,.72)!important;
    box-shadow:0 12px 30px rgba(255,116,31,.27)!important;
    font-size:14px!important;
    font-weight:950!important;
    text-indent:0!important;
    overflow:hidden!important;
    cursor:pointer!important;
    touch-action:manipulation!important;
    pointer-events:auto!important;
    user-select:none!important;
  }

  /* Keep accessibility button text clean without deleting its DOM or JS listener */
  body .access-toggle,
  body .accessibility-toggle,
  body.liry-create-page .access-toggle,
  body.liry-create-page .accessibility-toggle,
  #accessToggle.access-toggle{
    font-size:0!important;
    gap:0!important;
  }

  body .access-toggle::before,
  body .accessibility-toggle::before,
  body.liry-create-page .access-toggle::before,
  body.liry-create-page .accessibility-toggle::before,
  #accessToggle.access-toggle::before{
    content:"נגישות"!important;
    display:block!important;
    font-size:14px!important;
    font-weight:950!important;
    color:#fff!important;
    line-height:1!important;
    pointer-events:none!important;
  }

  body .access-toggle::after,
  body .accessibility-toggle::after,
  body.liry-create-page .access-toggle::after,
  body.liry-create-page .accessibility-toggle::after,
  #accessToggle.access-toggle::after{
    content:none!important;
    display:none!important;
  }

  body .access-toggle > *,
  body .accessibility-toggle > *,
  body.liry-create-page .access-toggle > *,
  body.liry-create-page .accessibility-toggle > *,
  #accessToggle.access-toggle > *{
    display:none!important;
  }

  body .support-fab span,
  #supportFab.support-fab span{
    width:24px!important;
    height:24px!important;
    min-width:24px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:50%!important;
    background:#fff!important;
    color:#ff741f!important;
    font-size:14px!important;
    font-weight:950!important;
  }

  body .support-fab b,
  #supportFab.support-fab b{
    display:block!important;
    font-size:14px!important;
    font-weight:950!important;
  }

  body .support-panel,
  body.liry-create-page .support-panel,
  #supportPanel.support-panel{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 58px)!important;
    width:calc(100vw - 20px)!important;
    max-width:none!important;
    height:min(68vh, 540px)!important;
    border-radius:22px!important;
    z-index:2147482999!important;
  }

  body .access-panel,
  body .accessibility-panel,
  body.liry-create-page .access-panel,
  body.liry-create-page .accessibility-panel,
  #accessPanel.access-panel{
    position:fixed!important;
    right:10px!important;
    left:10px!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 58px)!important;
    width:calc(100vw - 20px)!important;
    max-width:none!important;
    border-radius:22px!important;
    z-index:2147482999!important;
  }

  .liry-footer,
  body .liry-footer{
    padding-bottom:calc(env(safe-area-inset-bottom, 0px) + 76px)!important;
  }
}
