/* RUYA BOTTOM NAV UNIFY V1
   2026-09-18
   Teacher nav = reference
   Only Parent + Admin are normalized.
*/

@media (max-width:980px){

  /* =========================================================
     VELİ — öğretmen ile aynı beyaz tam oval yüzey
     ========================================================= */
  html body:has(#root .shell.role-parent)
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"],

  html body:has(#root .shell.role-parent)
  .ruyaViewportPortalHost
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]{
    position:fixed!important;

    left:max(12px,env(safe-area-inset-left))!important;
    right:max(12px,env(safe-area-inset-right))!important;
    bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;

    width:auto!important;
    height:68px!important;
    min-height:68px!important;

    margin:0!important;
    padding:6px 7px!important;

    align-items:center!important;
    gap:0!important;

    border:1px solid rgba(23,48,122,.10)!important;
    border-radius:999px!important;

    background:#fff!important;
    background-color:#fff!important;
    background-image:none!important;

    box-shadow:0 7px 18px rgba(24,46,82,.10)!important;

    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;

    transform:none!important;
    -webkit-transform:none!important;

    box-sizing:border-box!important;
    overflow:visible!important;
  }

  html body:has(#root .shell.role-parent)
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]::before,

  html body:has(#root .shell.role-parent)
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]::after,

  html body:has(#root .shell.role-parent)
  .ruyaViewportPortalHost
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]::before,

  html body:has(#root .shell.role-parent)
  .ruyaViewportPortalHost
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]::after{
    content:none!important;
    display:none!important;
  }

  html body:has(#root .shell.role-parent)
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]>button,

  html body:has(#root .shell.role-parent)
  .ruyaViewportPortalHost
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"]>button{
    height:56px!important;
    min-height:56px!important;

    margin:0!important;
    padding:4px 2px!important;

    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;

    border:0!important;
    border-radius:18px!important;

    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;

    box-shadow:none!important;
  }


  /* =========================================================
     YÖNETİCİ — eski 23px radius / yukarı taşan orta buton iptal
     ========================================================= */
  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav{
    position:fixed!important;

    left:max(12px,env(safe-area-inset-left))!important;
    right:max(12px,env(safe-area-inset-right))!important;
    bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;

    width:auto!important;
    height:68px!important;
    min-height:68px!important;

    margin:0!important;
    padding:6px 7px!important;

    align-items:center!important;

    border:1px solid rgba(23,48,122,.10)!important;
    border-radius:999px!important;

    background:#fff!important;
    background-color:#fff!important;
    background-image:none!important;

    box-shadow:0 7px 18px rgba(24,46,82,.10)!important;

    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;

    transform:none!important;
    -webkit-transform:none!important;

    box-sizing:border-box!important;
    overflow:visible!important;
  }

  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav::before,

  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav::after{
    content:none!important;
    display:none!important;
  }

  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav>button{
    height:56px!important;
    min-height:56px!important;

    margin:0!important;
    padding:4px 2px!important;

    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;

    border:0!important;
    border-radius:18px!important;

    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;

    box-shadow:none!important;
  }

  /* Eski admin kuralındaki margin-top:-17px kesin olarak kalkar */
  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav .ruyaMobileCenter{
    height:56px!important;
    min-height:56px!important;

    margin-top:0!important;
    margin-bottom:0!important;

    padding:0!important;

    align-items:center!important;
    justify-content:center!important;

    background:transparent!important;
    background-image:none!important;

    box-shadow:none!important;
    overflow:visible!important;
  }

  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav .ruyaMobileCenter>span{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    min-height:48px!important;

    margin:0!important;

    border:0!important;
    border-radius:50%!important;

    background:#17307a!important;
    background-image:none!important;

    color:#fff!important;
    box-shadow:0 5px 14px rgba(23,48,122,.22)!important;

    transform:none!important;
  }


  /* Veli + yönetici aktif sekme de öğretmen mantığında:
     ayrıca mavi kutu oluşmaz. */
  html body:has(#root .shell.role-parent)
  nav.ruya-hf85-parent-fixed-nav>button.active,

  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav>button.active{
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;

    box-shadow:none!important;
    border-color:transparent!important;
  }
}


/* Dar iPhone'larda öğretmenle aynı yan boşluk */
@media (max-width:390px){

  html body:has(#root .shell.role-parent)
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"],

  html body:has(#root .shell.role-parent)
  .ruyaViewportPortalHost
  nav.ruya-hf85-parent-fixed-nav[aria-label="Mobil navigasyon"],

  html.ruyaMobileShell body:has(#root .shell.role-admin)
  #ruyaMobileBottomNav{
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
  }
}
