/*
 * NTIMA OS Member 2.55 — mobile modal isolation and bottom-content clearance.
 * Presentation only: no savings, payment, permission or navigation behaviour.
 */

html.wfms-ce-consent-open,
body.wfms-ce-consent-open{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}

body > .wfms-ce-consent-modal{
  position:fixed!important;
  inset:0!important;
  z-index:2147483647!important;
  box-sizing:border-box!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  opacity:1!important;
  visibility:hidden!important;
  isolation:isolate!important;
  contain:layout paint!important;
}

body > .wfms-ce-consent-modal.is-open{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
}

body > .wfms-ce-consent-modal .wfms-ce-consent-backdrop{
  position:absolute!important;
  inset:0!important;
  z-index:0!important;
  background:rgba(7,30,22,.82)!important;
  opacity:1!important;
}

body > .wfms-ce-consent-modal .wfms-ce-consent-card{
  position:relative!important;
  z-index:1!important;
  box-sizing:border-box!important;
  opacity:1!important;
  visibility:visible!important;
  background:#fff!important;
  color:#24483a!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  overflow-wrap:anywhere!important;
}

/* Competing fixed controls must never sit above an active consent dialog. */
body.wfms-ce-consent-open :is(
  .wfms-v1082-bottom-nav,
  .wfms-v1089-secondary-nav,
  .wfms-account-popover-viewport,
  .genesis-assistant-launcher,
  .genesis-assistant-dock-restore,
  .genesis-copy-menu,
  .wfms-v1082-more-panel
){
  visibility:hidden!important;
  pointer-events:none!important;
}

@media (max-width:900px){
  /* Enough real scroll space for the final line/card on every member screen. */
  .wfms-app.wfms-member-v1082{
    box-sizing:border-box!important;
    padding-bottom:calc(148px + env(safe-area-inset-bottom,0px))!important;
  }

  .wfms-app.wfms-member-v1082 :is(.wfms-main,.wfms-content,.wfms-v1082-page) > :last-child{
    scroll-margin-bottom:calc(148px + env(safe-area-inset-bottom,0px))!important;
  }

  body > .wfms-ce-consent-modal{
    align-items:stretch!important;
    justify-content:stretch!important;
    padding:0!important;
  }

  body > .wfms-ce-consent-modal .wfms-ce-consent-card{
    width:100%!important;
    height:100vh!important;
    height:100dvh!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:
      calc(20px + env(safe-area-inset-top,0px))
      max(16px,env(safe-area-inset-right,0px))
      calc(30px + env(safe-area-inset-bottom,0px))
      max(16px,env(safe-area-inset-left,0px))!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    scroll-padding-bottom:calc(30px + env(safe-area-inset-bottom,0px))!important;
  }

  body > .wfms-ce-consent-modal .wfms-ce-consent-card h3{
    max-width:100%!important;
    font-size:clamp(21px,6vw,28px)!important;
    line-height:1.2!important;
  }

  body > .wfms-ce-consent-modal .wfms-ce-consent-intro,
  body > .wfms-ce-consent-modal .wfms-ce-consent-card li,
  body > .wfms-ce-consent-modal .wfms-ce-currency-section > p,
  body > .wfms-ce-consent-modal .wfms-ce-consent-question span{
    max-width:100%!important;
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
  }

  body > .wfms-ce-consent-modal .wfms-ce-consent-actions{
    padding-bottom:max(2px,env(safe-area-inset-bottom,0px))!important;
  }
}

@media print{
  body > .wfms-ce-consent-modal{display:none!important}
}
