/* Responsive workspace: explicit grid placement and usable plan-editor controls. */
:root{--wp-header-height:84px;--wp-editor-toolbar-height:76px}
body .lmp-platform .lmp-main,body .lmp-platform #lmp-engine-host,body .wp-plan-editor,body .wp-plan-editor .wp-compact-workspace>*{min-width:0}
body .lmp-main:has(.wp-plan-editor) .page-content{width:100%;max-width:none;padding-inline:0}
body .wp-plan-editor :is(input,select,textarea,button){max-width:100%}
body .wp-plan-editor :is(.wp-editor-entry,.wp-editor-finish,.wp-editor-day){scroll-margin-top:calc(var(--wp-header-height) + var(--wp-editor-toolbar-height) + 24px)}
@media screen and (min-width:721px) and (max-width:1023px){
 body .lmp-platform[data-trainer-workspace=true] .lmp-shell{grid-template-columns:minmax(0,1fr);gap:0;max-width:none;padding-inline:16px}
 body .lmp-platform[data-trainer-workspace=true] .wp-trainer-navigation{grid-area:1/1;position:static;display:flex;justify-content:flex-end;padding:12px 0 8px}
 body .lmp-platform[data-trainer-workspace=true] .wp-navigation-frame{grid-area:2/1;display:block;min-width:0}
 body .lmp-platform[data-trainer-workspace=true] .wp-navigation-frame>.lmp-nav{display:flex;flex-wrap:nowrap;position:fixed;inset:auto 0 0;gap:6px;max-height:none;min-width:0}
 body .lmp-platform[data-trainer-workspace=true] .wp-navigation-frame>.lmp-nav>a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:64px;padding:8px 4px;font-size:12px;text-align:center}
 body .lmp-platform[data-trainer-workspace=true] .wp-navigation-frame>.lmp-nav>a>span{white-space:normal;overflow-wrap:anywhere}
 body .lmp-platform[data-trainer-workspace=true] .lmp-main{grid-area:3/1;padding:12px 0 48px;width:100%}
}
@media screen and (min-width:1024px){
 body .lmp-platform[data-trainer-workspace=true]:has(.wp-plan-editor) .lmp-shell{grid-template-columns:220px minmax(0,1fr);max-width:1920px;padding-inline:16px}
 body .lmp-platform[data-trainer-workspace=true]:has(.wp-plan-editor) .lmp-main{padding-inline:20px}
 body .lmp-platform[data-trainer-workspace=true]:has(.wp-plan-editor) .lmp-header{padding-inline:max(24px,calc((100vw - 1888px)/2))}
 body .lmp-platform[data-authenticated=false] .lmp-main:has(.wp-plan-editor){max-width:1720px}
 body .lmp-platform .wp-trainer-navigation{top:calc(var(--wp-header-height) + 12px)}
 body .lmp-platform .wp-trainer-sidebar{max-height:calc(100dvh - var(--wp-header-height) - 24px)}
}
@media screen and (min-width:1100px){
 body .wp-plan-editor.wp-compact-editor{gap:12px}
 body .wp-plan-editor.wp-compact-editor .wp-compact-toolbar{top:calc(var(--wp-header-height) + 8px);flex-wrap:wrap;gap:10px;padding:12px 14px}
 body .wp-plan-editor.wp-compact-editor .wp-compact-toolbar .button-row{flex-wrap:wrap;min-width:0;max-width:100%}
 body .wp-plan-editor.wp-compact-editor .wp-compact-toolbar .small{font-size:.8rem}
 body .wp-plan-editor.wp-compact-editor .wp-compact-workspace{grid-template-columns:minmax(0,1fr) 290px;gap:16px}
 body .wp-plan-editor.wp-compact-editor .wp-compact-library{top:calc(var(--wp-header-height) + var(--wp-editor-toolbar-height) + 24px);max-height:calc(100dvh - var(--wp-header-height) - var(--wp-editor-toolbar-height) - 40px);padding:12px!important}
 body .wp-plan-editor.wp-compact-editor .wp-compact-row{grid-template-columns:minmax(140px,2fr) minmax(48px,.45fr) minmax(76px,.65fr) minmax(60px,.6fr) minmax(76px,.75fr) minmax(88px,.9fr) 76px;gap:7px}
 body .wp-plan-editor.wp-compact-editor .wp-compact-identity strong{font-size:.875rem;line-height:1.4}
 body .wp-plan-editor.wp-compact-editor .wp-compact-identity small{font-size:.75rem}
 body .wp-plan-editor.wp-compact-editor .wp-compact-cell>span:first-child,body .wp-plan-editor.wp-compact-editor .wp-compact-row>.wp-rest-field>span{font-size:.72rem;white-space:normal;line-height:1.25}
 body .wp-plan-editor.wp-compact-editor .wp-compact-cell input,body .wp-plan-editor.wp-compact-editor .wp-compact-row>.wp-rest-field input{height:38px;min-height:38px!important;font-size:.875rem!important}
 body .wp-plan-editor.wp-compact-editor :is(.wp-compact-variable,.wp-compact-expand){min-height:38px;font-size:.75rem}
 body .wp-plan-editor.wp-compact-editor .wp-compact-row-actions .icon-btn{min-width:34px;min-height:34px;padding:6px}
 body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-copy strong{font-size:.85rem}
 body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-copy .small{font-size:.74rem}
 body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-actions>.btn{min-height:36px;font-size:.75rem!important;padding:6px 8px!important}
 body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-filters select{min-height:36px;font-size:.8rem}
 body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-list{display:flex;flex-direction:column}
 @container wp-editor (max-width:1060px){
  body .wp-plan-editor.wp-compact-editor .wp-compact-workspace{grid-template-columns:minmax(0,1fr)}
  body .wp-plan-editor.wp-compact-editor .wp-compact-library{position:static;max-height:620px}
  body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  body .wp-plan-editor.wp-compact-editor .wp-program-days{grid-template-columns:minmax(0,1fr)}
 }
 @container wp-editor (max-width:720px){
  body .wp-plan-editor.wp-compact-editor .wp-compact-row{grid-template-columns:repeat(5,minmax(0,1fr))}
  body .wp-plan-editor.wp-compact-editor .wp-compact-identity{grid-column:1/-1}
  body .wp-plan-editor.wp-compact-editor .wp-compact-row-actions{grid-column:1/-1;flex-direction:row;justify-content:flex-end;gap:10px}
  body .wp-plan-editor.wp-compact-editor .wp-compact-library .wp-inline-picker-list{grid-template-columns:minmax(0,1fr)}
 }
}
@media screen and (any-pointer:coarse) and (min-width:1100px){
 body .wp-plan-editor.wp-compact-editor .wp-compact-row{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
 body .wp-plan-editor.wp-compact-editor .wp-compact-identity{grid-column:1/-1}
 body .wp-plan-editor.wp-compact-editor .wp-compact-row-actions{grid-column:1/-1;flex-direction:row;justify-content:flex-end;gap:12px}
 body .wp-plan-editor.wp-compact-editor :is(.btn,.icon-btn,.wp-compact-variable,.wp-compact-expand,.wp-compact-section-toggle,.wp-day-choice,.back,.choice-trigger,.wp-compact-photo,summary){min-height:44px!important}
 body .wp-plan-editor.wp-compact-editor :is(.icon-btn,.wp-compact-photo){min-width:44px!important}
 body .wp-plan-editor.wp-compact-editor :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:44px!important;height:auto;font-size:16px!important}
 body .wp-plan-editor.wp-compact-editor .wp-compact-effort{gap:8px}
 body .wp-plan-editor.wp-compact-editor :is(.wp-compact-identity,.wp-compact-selection) input[type=checkbox]{width:24px;height:24px;min-width:24px}
}
@media screen and (max-width:720px){
 body .lmp-main:has(.wp-plan-editor){padding-top:16px}
 body .wp-plan-editor .wp-editor-view-switch .btn{min-width:0;flex:1 1 9rem;white-space:normal}
 body .wp-plan-editor .wp-editor-footer-actions>.btn{min-width:0;white-space:normal}
 body .wp-plan-editor .wp-inline-picker-search{min-width:0}
}
@media screen and (max-height:600px){
 body .wp-plan-editor.wp-compact-editor .wp-compact-toolbar,body .wp-plan-editor.wp-compact-editor .wp-compact-library{position:static;max-height:none}
}
@media print{
 body .wp-plan-editor.wp-compact-editor .wp-compact-toolbar,body .wp-plan-editor.wp-compact-editor .wp-compact-library{position:static;max-height:none}
}

/* Long dashboard labels and counts must shrink inside narrow/folded screens. */
.wp-pt-home-counter>span:last-child{grid-template-columns:minmax(0,1fr);max-width:100%;overflow-wrap:anywhere;flex:1 1 0}
.wp-pt-home-counter small,.wp-pt-home-counter-value{min-width:0;overflow-wrap:anywhere}

@media(max-width:480px){.wp-pt-home-quick{grid-template-columns:minmax(0,1fr)}}

/* One bottom rail on phones and unfolded phones. The seventh shortcut must
   scroll on narrow screens instead of wrapping above the page content. */
@media screen and (max-width:1023px){
 body:not(.wp-public-site) .lmp-platform[data-authenticated=true] .lmp-shell{display:block;grid-template-columns:minmax(0,1fr);max-width:none;width:100%;box-sizing:border-box}
 body:not(.wp-public-site) .lmp-platform[data-authenticated=true] .wp-navigation-frame{position:fixed;inset:auto 0 0;z-index:50;display:block;min-height:0;height:auto;padding:0 24px;margin:0;background:var(--card);border-top:1px solid var(--input)}
 body:not(.wp-public-site) .lmp-platform[data-authenticated=true] .wp-navigation-frame>.lmp-nav{position:relative;inset:auto;z-index:50;display:flex;flex-flow:row nowrap;align-items:stretch;width:100%;max-width:100%;height:auto;max-height:none;margin:0;padding:6px 6px calc(6px + env(safe-area-inset-bottom));gap:4px;overflow-x:auto;overflow-y:hidden;background:var(--card);color:var(--foreground);border-top:0;box-sizing:border-box}
 body:not(.wp-public-site) .lmp-platform[data-authenticated=true] .wp-navigation-frame>.lmp-nav>a{flex:1 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:74px;min-height:64px;padding:6px 8px;gap:4px;font-size:12px;line-height:1.3;text-align:center}
 body:not(.wp-public-site) .lmp-platform[data-authenticated=true] .wp-navigation-frame>.lmp-nav>a>span{white-space:nowrap;overflow-wrap:normal;width:auto;max-width:none}
 body:not(.wp-public-site) .lmp-platform[data-authenticated=true] .lmp-main{padding-bottom:calc(112px + env(safe-area-inset-bottom))!important}
}
