/* BF24 V75k13b - nur Smartphone, bestehende Desktop-Masshilfe wiederverwenden. */
@media screen and (max-width:700px){
  /* Material wie Staerke/Oberflaeche als natives iOS-Select darstellen. */
  #calculatorView #positionsSection #positions select.material{
    display:block!important;visibility:visible!important;opacity:1!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:43px!important;height:auto!important;padding:10px 28px 10px 10px!important;
    font-size:16px!important;color:#163b63!important;background-color:#fff!important;
    -webkit-appearance:menulist!important;appearance:auto!important;
  }
  #calculatorView #positionsSection #positions .v705-mobile-material-button{display:none!important}

  /* Grafik-Hilfe oberhalb der bestehenden Massfelder. Keine Duplizierung der Logik. */
  #calculatorView #positionsSection #positions tr>td:first-child .bf24-mobile-graphic-button{
    display:flex!important;align-items:center;justify-content:center;gap:8px;
    width:100%!important;max-width:100%!important;margin:11px 0 1px;
    padding:11px 12px;border:1px solid #85b7d5;border-radius:10px;
    background:#edf8ff;color:#075c92;font:700 14px/1.35 Arial,Helvetica,sans-serif;
    text-align:center;cursor:pointer;touch-action:manipulation;
  }
  #calculatorView #positionsSection #positions .bf24-mobile-graphic-button:focus-visible{
    outline:3px solid #28a9e0;outline-offset:2px;
  }

  /* PC-Massformular auf iPhone: dieselbe Zeichnung und dieselben Eingaben,
     aber in einem intern scrollbar gehaltenen Fenster. */
  .fill-help-modal-v702.is-open{
    padding:8px!important;align-items:center!important;justify-content:center!important;
    overflow:hidden!important;overscroll-behavior:contain;
  }
  .fill-help-modal-v702 .modal-card{
    width:100%!important;max-width:100%!important;
    max-height:calc(100dvh - 16px)!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
    border-radius:13px!important;
  }
  .fill-help-modal-v702 .fill-help-head-v702{
    position:sticky;top:0;z-index:2;padding:14px 15px!important;gap:8px!important;
  }
  .fill-help-modal-v702 .fill-help-head-v702 h2{font-size:19px!important;line-height:1.25!important}
  .fill-help-modal-v702 .fill-help-head-v702 p{font-size:12px!important}
  .fill-help-modal-v702 .fill-help-visual-v702{padding:12px!important}
  .fill-help-modal-v702 .fill-help-sketch-v702{padding:8px!important;min-height:0!important}
  .fill-help-modal-v702 .fill-help-sketch-v702 svg{max-height:225px!important}
  .fill-help-modal-v702 .fill-help-form-v702{padding:15px!important}
  .fill-help-modal-v702 .fill-help-field-v702{padding:9px!important;gap:6px!important}
  .fill-help-modal-v702 .fill-help-field-v702 input{font-size:16px!important;min-height:42px!important}
  .fill-help-modal-v702 .fill-help-actions-v702{padding-top:12px!important}
}

/* BF24 V75k13d - iOS Safari: Die Masshilfe selbst scrollt, nicht die Shopseite.
   Auf Mobilgeraeten ist der Overlay die EINZIGE Scrollflaeche. Die bisherige
   verschachtelte Scrollflaeche in einer zentrierten Flexbox war auf iOS instabil. */
@media screen and (max-width:700px){
  .fill-help-modal-v702.is-open{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    box-sizing:border-box!important;
    width:100%!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding:10px 8px calc(18px + env(safe-area-inset-bottom,0px))!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
    touch-action:pan-y!important;
  }
  .fill-help-modal-v702 .modal-card{
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    max-height:none!important;
    margin:0 auto!important;
    overflow:visible!important;
    border-radius:13px!important;
  }
  .fill-help-modal-v702 .fill-help-head-v702{
    position:relative!important;
    top:auto!important;
  }
  .fill-help-modal-v702 .fill-help-actions-v702{
    padding-bottom:12px!important;
  }
  html.bf24-measure-scroll-lock,
  body.bf24-measure-scroll-lock{
    overscroll-behavior:none!important;
  }
  body.bf24-measure-scroll-lock{
    position:fixed!important;
    overflow:hidden!important;
    width:100%!important;
  }
}

/* V75k16d: iPad erhaelt dieselbe native Materialauswahl wie iPhone. */
@media screen and (min-width:701px) and (max-width:1199px) and (pointer:coarse){
  #calculatorView #positionsSection #positions select.material{
    display:block!important;visibility:visible!important;opacity:1!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:43px!important;padding:10px 28px 10px 10px!important;
    font-size:16px!important;background-color:#fff!important;
    -webkit-appearance:menulist!important;appearance:auto!important;
  }
  #calculatorView #positionsSection #positions .v705-mobile-material-button{display:none!important}
}
