/* V155.21: isolated to the legacy Android app's WebView.
   Chromium <dialog>.showModal() uses the browser top layer, bypassing transformed
   dashboard navigation, overflow:hidden, fixed stacking contexts and video layers. */
html.tk-android-webview dialog.tk-wv-dialog-host[open]{
 position:fixed!important;display:flex!important;box-sizing:border-box!important;
 inset:var(--tk-wv-visible-top,0px) 0 auto 0!important;
 margin:0!important;padding:12px!important;border:0!important;
 width:100%!important;max-width:100%!important;
 height:var(--tk-wv-visible-height,100dvh)!important;max-height:none!important;
 background:transparent!important;color:inherit!important;
 overflow:hidden!important;align-items:center!important;justify-content:center!important;
 opacity:1!important;visibility:visible!important;transform:none!important;
 z-index:2147483600!important;
}
html.tk-android-webview dialog.tk-wv-dialog-host::backdrop{background:rgba(8,12,19,.65)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
/* Fallback on old Chromium that does not implement showModal. */
html.tk-android-webview dialog.tk-wv-dialog-host[open]:not(:modal){background:rgba(8,12,19,.65)!important;}
html.tk-android-webview dialog.tk-wv-dialog-host .tk-pending-panel[hidden],
html.tk-android-webview dialog.tk-wv-dialog-host .tk-notification-popover[hidden],
html.tk-android-webview dialog.tk-wv-dialog-host .tk-v140-avatar-overlay[hidden],
html.tk-android-webview dialog.tk-wv-dialog-host .tk-v78-search-panel[hidden]{display:none!important;}
/* Pedidos: same cards and 'Retomar pedido', independent of the floating icon. */
html.tk-android-webview dialog.tk-wv-dialog-pending .tk-pending-panel:not([hidden]){
 position:relative!important;inset:auto!important;margin:auto!important;
 display:flex!important;flex-direction:column!important;flex:0 1 auto!important;
 width:min(100%,420px)!important;max-width:420px!important;
 min-height:0!important;max-height:min(70dvh,530px)!important;
 opacity:1!important;visibility:visible!important;transform:none!important;
 background:#fff!important;color:#222936!important;
 overflow:hidden!important;box-sizing:border-box!important;
}
html.tk-android-webview dialog.tk-wv-dialog-pending .tk-pending-list{min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;touch-action:pan-y;}
/* Notifications: scroll inside the list, never pull-to-refresh the Android screen. */
html.tk-android-webview dialog.tk-wv-dialog-notifications .tk-notification-popover:not([hidden]){
 position:relative!important;inset:auto!important;margin:auto!important;
 display:flex!important;flex-direction:column!important;flex:0 1 auto!important;
 width:min(100%,480px)!important;max-width:480px!important;
 height:min(630px,calc(var(--tk-wv-visible-height,100dvh) - 50px))!important;
 min-height:0!important;max-height:calc(var(--tk-wv-visible-height,100dvh) - 24px)!important;
 opacity:1!important;visibility:visible!important;transform:none!important;
 overflow:hidden!important;box-sizing:border-box!important;z-index:auto!important;
 background:var(--note-bg,#20242c)!important;color:var(--note-ink,#f6f7fb)!important;
}
html.tk-android-webview dialog.tk-wv-dialog-notifications .tk-notification-items{
 display:block!important;flex:1 1 auto!important;min-height:0!important;
 overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;touch-action:pan-y!important;
}
/* The existing avatar card/gallery stays intact; only the containing layer changes. */
html.tk-android-webview dialog.tk-wv-dialog-avatar .tk-v140-avatar-overlay:not([hidden]){
 position:relative!important;inset:auto!important;margin:0!important;
 padding:0!important;width:100%!important;height:100%!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 flex:1 1 auto!important;overflow:hidden!important;
 background:transparent!important;box-shadow:none!important;
 transform:none!important;opacity:1!important;visibility:visible!important;
}
html.tk-android-webview dialog.tk-wv-dialog-avatar .tk-v140-avatar-dialog{
 flex:0 1 440px!important;position:relative!important;
 width:100%!important;max-width:440px!important;
 height:auto!important;min-height:0!important;
 max-height:calc(var(--tk-wv-visible-height,100dvh) - 24px)!important;
 display:flex!important;flex-direction:column!important;
 margin:auto!important;transform:none!important;-webkit-transform:none!important;
 opacity:1!important;visibility:visible!important;overflow:hidden!important;
 background:#fff!important;color:#191b26!important;
}
html.tk-android-webview dialog.tk-wv-dialog-avatar .tk-v141-avatar-picker-scroll{
 display:block!important;min-height:0!important;flex:1 1 auto!important;
 overflow-y:auto!important;touch-action:pan-y!important;
 -webkit-overflow-scrolling:touch!important;overscroll-behavior-y:contain!important;
}
/* Search: keep the original intelligent search component, including suggestions.
   Use viewport height after opening the Android keyboard, not document height. */
html.tk-android-webview dialog.tk-wv-dialog-host.tk-wv-dialog-search[open]{align-items:flex-start!important;padding-top:12px!important;}
html.tk-android-webview dialog.tk-wv-dialog-search .tk-v78-search-panel:not([hidden]){
 position:relative!important;inset:auto!important;top:auto!important;bottom:auto!important;
 left:auto!important;right:auto!important;
 width:min(100%,560px)!important;max-width:560px!important;
 height:auto!important;min-height:0!important;
 max-height:calc(var(--tk-wv-visible-height,100dvh) - 24px)!important;
 display:block!important;flex:0 1 auto!important;
 margin:0 auto!important;padding:18px!important;
 box-sizing:border-box!important;overflow-y:auto!important;overscroll-behavior:contain!important;
 visibility:visible!important;opacity:1!important;transform:none!important;
 background:#fff!important;color:#17202b!important;color-scheme:only light!important;
 border:1px solid #dce2ea!important;border-radius:16px!important;
 box-shadow:0 15px 40px rgba(0,0,0,.25)!important;
}
html.tk-android-webview dialog.tk-wv-dialog-search .tk-v78-search-panel form{
 display:grid!important;grid-template-columns:minmax(0,1fr) 49px!important;
 gap:10px!important;height:auto!important;min-width:0!important;
}
html.tk-android-webview dialog.tk-wv-dialog-search .tk-v78-search-panel input{
 min-width:0!important;width:100%!important;max-width:100%!important;
 height:50px!important;font-size:16px!important;
 background:#fff!important;color:#17202b!important;-webkit-text-fill-color:#17202b!important;
}
html.tk-android-webview dialog.tk-wv-dialog-search .tk-v78-search-panel form button{
 height:50px!important;min-width:0!important;display:grid!important;place-items:center!important;
 background:#17191f!important;color:#fff!important;
}
@media (max-width:380px){html.tk-android-webview dialog.tk-wv-dialog-host[open]{padding:9px!important;}}
/* Keep the same student/instructor dark-light tokens when moving the bell out
   of its original dashboard container and into the browser top layer. */
html.tk-android-webview dialog.tk-wv-dialog-notifications .tk-notification-popover{
 --note-bg:#20242c;--note-panel:#292e39;--note-ink:#f6f7fb;
 --note-sub:#b3bed0;--note-border:#414958;--note-accent:#a995ff;
 --note-unread-bg:#302842;--note-unread-hover:#39304c;
}
html.tk-android-webview[data-tk-student-theme=light] dialog.tk-wv-dialog-notifications .tk-notification-popover,
html.tk-android-webview[data-tk-instructor-theme=light] dialog.tk-wv-dialog-notifications .tk-notification-popover{
 --note-bg:#fff;--note-panel:#f5f6fa;--note-ink:#181b32;
 --note-sub:#65748e;--note-border:#dce3ef;--note-accent:#4b22f4;
 --note-unread-bg:#f1eeff;--note-unread-hover:#eae5ff;
}
