/* SafetyPulse V23-10 RC20.1 — mobile navigation and review safe-area fix */
@media (max-width:760px){
  .site-header .nav-inner{
    width:100%;
    max-width:100%;
    align-items:stretch!important;
    overflow:hidden;
    gap:11px!important;
    padding:14px 14px 10px!important;
  }
  .site-header .brand{
    width:100%;
    max-width:100%;
  }
  .site-header .nav-links{
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    align-items:center!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:4px!important;
    padding:2px 0 5px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    white-space:nowrap;
    touch-action:pan-x;
  }
  .site-header .nav-links::-webkit-scrollbar{display:none}
  .site-header .nav-link{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    padding:8px 9px!important;
    font-size:12.5px!important;
    line-height:1.2!important;
  }
  .site-header > #spLangSwitch{
    margin:0 14px 12px!important;
    width:max-content;
    max-width:calc(100% - 28px);
  }
  .site-header > #spLangSwitch .sp-lang-select{
    min-height:38px;
    max-width:100%;
  }
}

@media (max-width:430px){
  .site-header .nav-link{
    padding:8px 8px!important;
    font-size:12px!important;
  }
}

@media (max-width:620px){
  body[data-preview-page="review"]{
    padding-top:env(safe-area-inset-top);
    padding-bottom:env(safe-area-inset-bottom);
  }
  body[data-preview-page="review"] .sp-review-shell{
    padding-top:14px!important;
    padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;
  }
  body[data-preview-page="review"] .sp-automation-panel,
  body[data-preview-page="review"] .sp-ingestion-panel{
    scroll-margin-top:calc(18px + env(safe-area-inset-top));
  }
  body[data-preview-page="review"] .sp-automation-actions,
  body[data-preview-page="review"] .sp-ingestion-actions{
    position:relative;
    z-index:1;
  }
}


/* RC20.2 — iPhone Safari viewport containment for Product Review */
@media (max-width:620px){
  html:has(body[data-preview-page="review"]){
    background:#040a18;
    scroll-padding-top:72px;
  }
  body[data-preview-page="review"]{
    padding-top:0!important;
    padding-bottom:0!important;
    background:#040a18;
  }
  body[data-preview-page="review"] .sp-review-shell{
    padding-top:clamp(24px,7vh,62px)!important;
    padding-bottom:calc(230px + env(safe-area-inset-bottom))!important;
  }
  body[data-preview-page="review"] .sp-v23-preview-head,
  body[data-preview-page="review"] .sp-review-lock,
  body[data-preview-page="review"] #reviewApp > section,
  body[data-preview-page="review"] .sp-automation-panel,
  body[data-preview-page="review"] .sp-ingestion-panel{
    scroll-margin-top:72px;
  }
  body[data-preview-page="review"] .sp-ingestion-controls{
    margin-bottom:36px;
  }
  body[data-preview-page="review"] .sp-bottom-preview{
    bottom:calc(82px + env(safe-area-inset-bottom))!important;
  }
}

@media (max-width:620px) and (display-mode:standalone){
  body[data-preview-page="review"] .sp-review-shell{
    padding-top:calc(18px + env(safe-area-inset-top))!important;
    padding-bottom:calc(150px + env(safe-area-inset-bottom))!important;
  }
  body[data-preview-page="review"] .sp-bottom-preview{
    bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
}
