/* MEDIPHARM Clinical Suite v8.0.11 — Mobile Hero Containment & Existing Personalization Ownership Hotfix.
 * This file is intentionally loaded LAST, after app.css, mobile IA layers and
 * unified-material-shell-beta8.4.css. It owns Landing Hero responsive geometry plus final specialty-card mobile DOM compatibility. */

@media (max-width:1199px){
  .mcs-home-dashboard-head.mcs-home-landing-hero{
    display:flex!important;
    flex-direction:column!important;
    grid-template-columns:none!important;
    grid-template-rows:none!important;
    grid-template-areas:none!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:16px!important;
    min-height:0!important;
    padding:24px 22px!important;
    overflow:hidden!important;
  }
  .mcs-home-landing-hero>.mcs-home-dashboard-copy{
    order:1!important;
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    transform:none!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side{
    order:2!important;
    position:static!important;
    inset:auto!important;
    float:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    transform:none!important;
    translate:none!important;
    z-index:auto!important;
    display:grid!important;
    grid-template-columns:minmax(180px,.34fr) minmax(0,1fr)!important;
    align-items:center!important;
    align-content:initial!important;
    gap:12px!important;
    padding:12px!important;
    border-radius:16px!important;
    box-sizing:border-box!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-box{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-switch{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}

@media (max-width:760px){
  .mcs-home-dashboard-head.mcs-home-landing-hero{
    display:flex!important;
    flex-direction:column!important;
    gap:13px!important;
    padding:17px 15px!important;
    border-radius:19px!important;
  }
  .mcs-home-landing-hero:before,
  .mcs-home-landing-hero:after{display:none!important}
  .mcs-home-landing-hero>.mcs-home-dashboard-copy{
    order:1!important;
    width:100%!important;
    max-width:100%!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side{
    order:2!important;
    display:block!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:9px!important;
    transform:none!important;
    box-sizing:border-box!important;
    border-radius:14px!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-hero-side-copy{
    display:flex!important;
    align-items:baseline!important;
    gap:7px!important;
    margin:0 2px 7px!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-hero-side-copy>span{
    display:inline!important;
    font-size:9.5px!important;
    line-height:1.2!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-hero-side-copy>strong{
    display:inline!important;
    font-size:12.5px!important;
    line-height:1.25!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-hero-side-copy>small{display:none!important}
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-box{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:7px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-switch{
    display:flex!important;
    grid-template-columns:none!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:6px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
    overscroll-behavior-inline:contain;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-switch::-webkit-scrollbar{display:none!important}
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-switch button{
    flex:0 0 auto!important;
    min-width:max-content!important;
    min-height:36px!important;
    padding:6px 11px!important;
    white-space:nowrap!important;
  }
  .mcs-home-landing-hero .mcs-home-hero-jumps{
    display:flex!important;
    flex-wrap:wrap!important;
    overflow:visible!important;
    width:100%!important;
    max-width:100%!important;
    margin:8px 0 0!important;
    padding:0!important;
    gap:6px!important;
  }
  .mcs-home-landing-hero .mcs-home-hero-jumps>span{
    flex:0 0 100%!important;
    width:100%!important;
  }
  .mcs-home-landing-hero .mcs-home-hero-jumps button{flex:0 0 auto!important}
}

@media (max-width:520px){
  .mcs-home-landing-hero h2{font-size:23px!important;line-height:1.12!important}
  .mcs-home-landing-hero .mcs-home-hero-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
  }
  .mcs-home-landing-hero .mcs-home-hero-actions button{width:100%!important}
}



/* Editorial heading simplification: one heading only per Landing section. */
.mcs-home-section-head .mcs-home-section-kicker{display:none!important}

/* v8.0.9 — Specialty launcher mobile/tablet DOM compatibility.
 * beta7 predates .mcs-home-specialty-copy and assigns every direct span to the icon area.
 * This final layer aligns the current DOM explicitly and retires the legacy horizontal specialty rail. */
@media (max-width:900px){
  .mcs-home-specialty-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:none!important;
    grid-auto-flow:row!important;
    grid-auto-columns:auto!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    gap:8px!important;
    overflow:visible!important;
    scroll-snap-type:none!important;
    box-sizing:border-box!important;
  }
  .mcs-home-specialty-card{
    display:grid!important;
    grid-template-columns:38px minmax(0,1fr) auto!important;
    grid-template-areas:"icon copy count"!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    min-height:68px!important;
    height:auto!important;
    padding:9px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    scroll-snap-align:none!important;
  }
  .mcs-home-specialty-card>span:first-child{
    grid-area:icon!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    margin:0!important;
  }
  .mcs-home-specialty-card>.mcs-home-specialty-copy{
    grid-area:copy!important;
    display:grid!important;
    grid-template: none!important;
    align-content:center!important;
    justify-items:start!important;
    gap:2px!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:inherit!important;
    overflow:hidden!important;
  }
  .mcs-home-specialty-card>.mcs-home-specialty-copy>strong{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    font-size:13px!important;
    line-height:1.28!important;
    white-space:normal!important;
    overflow:visible!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;
    -webkit-line-clamp:unset!important;
  }
  .mcs-home-specialty-card>.mcs-home-specialty-copy>small{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    font-size:10.5px!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .mcs-home-specialty-card>em{
    grid-area:count!important;
    position:static!important;
    inset:auto!important;
    align-self:center!important;
    justify-self:end!important;
    min-width:28px!important;
    margin:0!important;
    padding:3px 6px!important;
    font-size:10px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
  }
}

@media (max-width:680px){
  .mcs-home-specialty-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    overflow:visible!important;
  }
  .mcs-home-specialty-card{
    grid-template-columns:36px minmax(0,1fr) auto!important;
    min-height:66px!important;
    padding:8px!important;
  }
  .mcs-home-specialty-card>span:first-child{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
  }
  .mcs-home-specialty-card>.mcs-home-specialty-copy>strong{font-size:12.5px!important}
  .mcs-home-specialty-card>.mcs-home-specialty-copy>small{font-size:10px!important}

  /* One editorial heading per Landing section. */
  .mcs-home-section-head .mcs-home-section-kicker{display:none!important}
}

@media (max-width:360px){
  .mcs-home-specialty-card{
    grid-template-columns:32px minmax(0,1fr) auto!important;
    gap:6px!important;
    padding:7px!important;
  }
  .mcs-home-specialty-card>span:first-child{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
  }
  .mcs-home-specialty-card>.mcs-home-specialty-copy>strong{font-size:12px!important}
  .mcs-home-specialty-card>em{min-width:24px!important;padding:2px 5px!important;font-size:9.5px!important}
}


/* v8.0.10 — hard mobile Hero containment.
 * Prevent intrinsic/max-content children and legacy negative margins from widening the Hero canvas. */
@media (max-width:760px){
  .mcs-home-dashboard,
  .mcs-home-dashboard-head.mcs-home-landing-hero,
  .mcs-home-landing-hero>.mcs-home-dashboard-copy,
  .mcs-home-landing-hero .mcs-home-hero-actions,
  .mcs-home-landing-hero .mcs-home-hero-jumps,
  .mcs-home-landing-hero>.mcs-home-hero-side,
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-box{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  .mcs-home-dashboard-head.mcs-home-landing-hero{
    overflow-x:hidden!important;
    contain:layout paint;
  }
  .mcs-home-landing-hero .mcs-home-hero-eyebrow{
    display:flex!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.3!important;
    box-sizing:border-box!important;
  }
  .mcs-home-landing-hero .mcs-home-hero-actions button,
  .mcs-home-landing-hero .mcs-home-hero-jumps button{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-switch{
    margin:0!important;
    padding:0 0 2px!important;
    box-sizing:border-box!important;
    overscroll-behavior-inline:contain!important;
  }
  .mcs-home-landing-hero>.mcs-home-hero-side .mcs-home-context-switch button{
    max-width:none!important;
    box-sizing:border-box!important;
  }
}

/* v8.0.11 — Unit and laboratory-reference controls are owned only by the existing Personalization page opened from the header gear button. */
.mcs-personalization-section .mcs-menu-unit-segments{max-width:420px!important}
