/* AliPlay — navegação integrada do Aluno · versão mobile refinada.
   Isolada em classes aliplay-student-* para não alterar CSS/lógica do módulo. */
body.aliplay-student-integrated {
  padding-left: 176px;
}
body.aliplay-student-integrated > .wrap {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
#aliplay-student-sidebar, #aliplay-student-sidebar * { box-sizing:border-box; }
#aliplay-student-sidebar {
  position:fixed; z-index:1000; left:0; top:0; bottom:0;
  width:176px; display:flex; flex-direction:column;
  padding:15px 11px 12px; overflow-y:auto; overflow-x:hidden;
  background:rgba(255,255,255,.96); border-right:1px solid #dfe5ff;
  box-shadow:4px 0 22px rgba(50,45,100,.035);
  font-family:Inter,Segoe UI,Arial,sans-serif; color:#4520e6;
  scrollbar-width:thin;
}
#aliplay-student-sidebar .aliplay-student-brand {
  height:72px; flex:0 0 auto; display:flex; align-items:center;
  justify-content:center; border-bottom:1px solid #edf0ff; margin-bottom:9px;
}
#aliplay-student-sidebar .aliplay-student-brand img {
  width:118px; max-width:calc(100% - 10px); height:auto; display:block;
  filter:drop-shadow(0 4px 12px rgba(39,160,174,.10));
}
#aliplay-student-sidebar .aliplay-student-nav,
#aliplay-student-sidebar .aliplay-student-bottom { display:flex; flex-direction:column; gap:4px; }
#aliplay-student-sidebar .aliplay-student-bottom { margin-top:auto; padding-top:12px; }
#aliplay-student-sidebar a {
  display:flex; align-items:center; gap:8px; width:100%; min-height:39px;
  padding:8px 9px; border-radius:12px; text-decoration:none; color:#4520e6;
  font-size:12px; font-weight:700; line-height:1.2; white-space:nowrap;
  transition:background .16s ease, transform .16s ease;
}
#aliplay-student-sidebar a:hover {background:#f0edff;transform:translateX(1px)}
#aliplay-student-sidebar a:focus-visible {outline:3px solid #7b61ff;outline-offset:2px}
#aliplay-student-sidebar a[aria-current="page"] {background:#ecebff;color:#3714d9}
#aliplay-student-sidebar .aliplay-student-ico {
  width:25px;height:25px;flex:0 0 25px;display:inline-flex;align-items:center;justify-content:center;
  background:#fff;border:2px solid #6944ff;border-radius:8px;font-size:12px;
}
#aliplay-student-sidebar .aliplay-student-ali {
  width:26px;height:26px;flex:0 0 26px;display:grid;place-items:center;
  background:linear-gradient(135deg,#8b5cf6,#f59e0b);border-radius:50%;
  border:2px solid #fff;box-shadow:0 0 0 1px #6d43ff;color:#fff;font-size:13px;
}
#aliplay-student-sidebar .aliplay-student-label {min-width:0}

/* Desktop: a navegação habitual do aluno permanece fixa à esquerda. */
.aliplay-student-mobiletop, .aliplay-student-scrim,
#aliplay-student-sidebar .aliplay-student-close {display:none;}
@media (max-width:820px) {
  body.aliplay-student-integrated { padding-left:0; padding-top:68px; }
  body.aliplay-student-menu-open { overflow:hidden!important; }
  body.aliplay-student-integrated > .wrap { max-width:900px; }
  .aliplay-student-mobiletop, .aliplay-student-mobiletop * {box-sizing:border-box;}
  .aliplay-student-mobiletop {
    position:fixed; inset:0 0 auto 0; height:68px; z-index:1100;
    display:flex; align-items:center; justify-content:space-between;
    padding:8px 16px; background:rgba(255,255,255,.98);
    box-shadow:0 4px 16px rgba(50,45,100,.08); border-bottom:1px solid #dfe5ff;
    font-family:Inter,Segoe UI,Arial,sans-serif;
  }
  .aliplay-student-mobiletop img { display:block; width:100px; max-height:48px; object-fit:contain; }
  .aliplay-student-mobiletop .aliplay-student-toggle,
  #aliplay-student-sidebar .aliplay-student-close {
    appearance:none; border:1px solid #d6d4ff; border-radius:12px;
    background:#f5f3ff; color:#4120c8; cursor:pointer; min-height:44px;
    padding:8px 12px; font-size:16px; font-weight:750;
  }
  .aliplay-student-mobiletop .aliplay-student-toggle {display:flex;align-items:center;gap:9px;}
  .aliplay-student-scrim {
    position:fixed;inset:68px 0 0; background:rgba(13,18,46,.58);
    z-index:1101; display:none;
  }
  body.aliplay-student-menu-open .aliplay-student-scrim {display:block;}
  #aliplay-student-sidebar {
    position:fixed; inset:68px auto 0 0; width:min(292px,86vw); max-width:86vw;
    height:auto; padding:10px 12px 18px; flex-direction:column;
    overflow:hidden; z-index:1102;
    /* Opaco: o texto do módulo não deve aparecer através do menu aberto. */
    background:#fff!important; opacity:1!important; backdrop-filter:none!important;
    transform:translateX(-105%); visibility:hidden; pointer-events:none;
    transition:transform .2s ease,visibility .2s ease;
    box-shadow:12px 0 40px rgba(18,14,52,.16);
  }
  body.aliplay-student-menu-open #aliplay-student-sidebar {
    transform:translateX(0); visibility:visible; pointer-events:auto;
  }
  #aliplay-student-sidebar .aliplay-student-brand {
    height:64px;min-height:64px; flex:0 0 64px;justify-content:space-between; padding:0 4px;
    margin-bottom:10px;border-right:0;border-bottom:1px solid #edf0ff;
  }
  #aliplay-student-sidebar .aliplay-student-brand img {width:107px;}
  #aliplay-student-sidebar .aliplay-student-close {display:block; min-width:44px;}
  #aliplay-student-sidebar .aliplay-student-nav,
  #aliplay-student-sidebar .aliplay-student-bottom {
    display:flex;flex-direction:column; gap:4px;margin:0; padding:0;
  }
  #aliplay-student-sidebar .aliplay-student-nav {
    flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
    overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;
  }
  #aliplay-student-sidebar .aliplay-student-bottom {
    flex:0 0 auto;margin-top:5px;padding:9px 0 0;border-top:1px solid #edf0ff;
  }
  #aliplay-student-sidebar a {width:100%;min-width:0;min-height:43px;height:auto;justify-content:flex-start;padding:9px 10px;}
  #aliplay-student-sidebar .aliplay-student-label {position:static; clip-path:none;width:auto;height:auto;overflow:visible;white-space:normal;}
  #aliplay-student-sidebar .aliplay-student-ico {width:26px;height:26px;flex-basis:26px;}
  @media (prefers-reduced-motion:reduce){#aliplay-student-sidebar{transition:none;}}
}
