/* The real application remains visible and navigable inside the training canvas. */
html.training-canvas-module body :is(#training-program,#testing-guide,#tp-resume,.tp-practice-marker,#ss-training-step){display:none!important}
html.training-canvas-module body.tg-open .main-content.with-rail{margin-right:0}
html.training-canvas-module body.tg-open .main-content:not(.with-rail){width:auto;margin-right:auto}
html.training-canvas-module body.ss-help-open .app-header,html.training-canvas-module body.ss-help-open .app-nav{right:0}
html.training-canvas-module body #ss-overlay{position:fixed;inset:0;width:100%;padding:0;background:#fff;pointer-events:auto}
html.training-canvas-module body #ss-overlay.hidden{display:none}
html.training-canvas-module body .ss-help-panel{height:100%;width:100%;max-width:none;box-shadow:none}
html.training-canvas-module body .ss-panel-footer button[onclick*="TrainingProgram.open"]{display:none}
html.training-canvas-module .ss-guide-body{padding:1rem;line-height:1.6}
html.training-canvas-module .ss-source-return{display:block;margin:1rem 0;padding:.6rem 1rem;font:inherit}
html.training-canvas-module .ss-search-row{display:grid;grid-template-columns:1fr}
html.training-canvas-module .ss-search-row .ss-search-icon{display:none}
html.training-canvas-module .ss-search-row label{position:static;width:auto;height:auto;padding:0;margin:0 0 6px;overflow:visible;clip:auto;clip-path:none;white-space:normal;font-size:.85rem;font-weight:650;color:#173f46}
html.training-canvas-module .ss-input{background:#fff;border:2px solid #0e7c8a;color:#173f46}
html.training-canvas-module .ss-input::placeholder{color:#526968;opacity:1}

/* The outer canvas already reserves the instructions column. */
html.training-canvas-module body.tp-training-active :is(#modal-overlay,#series-scope-overlay,#series-change-overlay){right:0;bottom:0;width:auto;max-height:100%;box-sizing:border-box}
/* Keep names for ordinary lessons. Creative workspaces use the application's
   compact rail so the calendar and flyer retain their working space. */
html.training-canvas-module{--rail-w:clamp(168px,30vw,200px)}
html.training-canvas-module body .nav-rail,html.training-canvas-module body .nav-rail.rail-compact{width:var(--rail-w)}
html.training-canvas-module body .nav-rail .rail-txt{display:inline;white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.25}
html.training-canvas-module body .nav-rail .rail-grp{display:block}
html.training-canvas-module body .nav-rail .rail-item{justify-content:flex-start;gap:8px;padding:10px 8px}
html.training-canvas-module body .nav-rail .rail-badge,html.training-canvas-module body .nav-rail .rail-badge-group{position:static;margin-left:auto;font-size:.7rem;padding:3px 7px}
html.training-canvas-module body .nav-rail .rail-badge-group .rail-badge{margin-left:0}
html.training-canvas-module body .main-content.with-rail,html.training-canvas-module body .main-content.with-rail.rail-compact{margin-left:var(--rail-w)}
html.training-canvas-module body .app-header .ss-pill-label{display:inline}
html.training-canvas-module body .app-header .ss-pill{padding:6px 12px}
html.training-canvas-module body .app-header .notif-btn{width:auto;border-radius:999px;padding:0 12px;gap:6px}
html.training-canvas-module body .app-header .notif-btn::after{content:"Notifications";font-size:.8rem;font-weight:600}
/* Narrow practice frames: the header wraps instead of pushing controls off screen. */
@media (max-width:760px){
 html.training-canvas-module{--header-h:150px}
 html.training-canvas-module body .app-header{flex-wrap:wrap;align-content:center;row-gap:6px;padding:6px 10px}
 html.training-canvas-module body .app-header .header-logo-img{height:36px}
 html.training-canvas-module body .app-header .header-right{flex-wrap:wrap;justify-content:flex-end;row-gap:6px;gap:6px;flex:1 1 100%}
}

/* The instructions live outside this iframe. In-frame guidance must not reserve a
   second side/bottom panel or move the real controls into a narrower viewport. */
html.training-canvas-module{--tg-width:0px}
html.training-canvas-module body:is(.tp-guided,.tp-training-active) :is(#modal-overlay,#quick-add-overlay,#dvir-overlay,.act-overlay,.apv-pop,.act-full,#mb-event,#mb-flyer){right:0;bottom:0;max-height:100dvh;max-width:100%}
html.training-canvas-module body.tp-guided .apv-pop>.apv-card{max-height:calc(100dvh - 32px)}
html.training-canvas-module body:is(.tp-guided,.tp-training-active) .mb-dialog{left:16px;right:16px;top:16px;bottom:16px;max-height:calc(100dvh - 32px);max-width:calc(100vw - 32px)}
html.training-canvas-module body.tp-training-active dialog.ih-booking[open]:not(:modal){left:0;right:0;top:0;bottom:0;max-height:calc(100dvh - 16px)}
html.training-canvas-module body #training-document{inset:8px}
/* Keep the named preview action readable beside an open Activities drawer. */
html.training-canvas-module .act-zoombar{flex-wrap:wrap}
html.training-canvas-module .act-zoombar button{flex-shrink:0}
html.training-canvas-module .act-zoombar .act-hint{flex-basis:100%;margin-left:0}

/* A saved-result review may leave the editor open after guidance classes end. */
html.training-canvas-module .mb-dialog[open]{position:fixed;left:16px;right:16px;top:16px;bottom:16px;max-height:calc(100dvh - 32px);max-width:calc(100vw - 32px);z-index:10000}

/* Match the regular Activities workspace; keep every navigation action available. */
html.training-canvas-module body .nav-rail.rail-compact{width:58px}
html.training-canvas-module body .nav-rail.rail-compact :is(.rail-txt,.rail-grp){display:none}
html.training-canvas-module body .nav-rail.rail-compact .rail-item{justify-content:center;padding:12px 4px}
html.training-canvas-module body .main-content.with-rail.rail-compact{margin-left:58px}
