/* Legal Works | Nexo mobile front above bottom menu v410
   Restores the compact mobile guide layout from V407 and keeps the
   real Nexo visible in the left corridor, above the bottom menu.
   Mobile-only additive layer. Desktop and guide logic remain unchanged.
*/

@media (max-width: 700px) {
  html body .lw-nexo-root.is-open .lw-nexo-stage {
    position: fixed !important;
    inset:
      auto
      6px
      calc(
        env(safe-area-inset-bottom, 0px) +
        6px
      )
      96px !important;
    width: auto !important;
    max-width: 304px !important;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
    overflow: visible !important;
    pointer-events: none !important;
    z-index: 2147483644 !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-dialog {
    max-height: min(34dvh, 300px) !important;
    z-index: 2147483644 !important;
  }

  html body .lw-nexo-help {
    display: none !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-avatar-shell {
    position: fixed !important;
    inset:
      auto
      auto
      calc(
        env(safe-area-inset-bottom, 0px) +
        56px
      )
      5px !important;
    z-index: 2147483647 !important;
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
    height: 132px !important;
    min-height: 132px !important;
    max-height: 132px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 20px 20px 16px 16px !important;
    background: transparent !important;
    box-shadow: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    transform: none !important;
    pointer-events: none !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-avatar-shell::before,
  html body .lw-nexo-root.is-open .lw-nexo-avatar-shell::after {
    display: none !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-gesture-frame {
    position: absolute !important;
    top: auto !important;
    right: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    z-index: 3 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform:
      translate3d(-50%, 0, 0)
      scale(.27) !important;
    transform-origin: center bottom !important;
    pointer-events: none !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-gesture-slot,
  html body .lw-nexo-root.is-open .lw-nexo-gesture-body,
  html body .lw-nexo-root.is-open .lw-nexo-gesture-head {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-professional-composite,
  html body .lw-nexo-root.is-open .lw-nexo-rive-canvas,
  html body .lw-nexo-root.is-open .lw-nexo-avatar,
  html body .lw-nexo-root.is-open .lw-nexo-vector-avatar {
    display: none !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-dialog,
  html body .lw-nexo-root.is-open .lw-nexo-topline,
  html body .lw-nexo-root.is-open .lw-nexo-actions {
    position: relative !important;
    z-index: 2 !important;
  }

  .lw-nexo-v406-target {
    scroll-margin: 96px 10px 190px !important;
  }
}

@media (max-width: 380px) {
  html body .lw-nexo-root.is-open .lw-nexo-stage {
    left: 78px !important;
    right: 5px !important;
    bottom:
      calc(
        env(safe-area-inset-bottom, 0px) +
        5px
      ) !important;
    max-width: 285px !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-avatar-shell {
    left: 3px !important;
    bottom:
      calc(
        env(safe-area-inset-bottom, 0px) +
        53px
      ) !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 112px !important;
    min-height: 112px !important;
    max-height: 112px !important;
  }

  html body .lw-nexo-root.is-open .lw-nexo-gesture-frame {
    transform:
      translate3d(-50%, 0, 0)
      scale(.23) !important;
  }
}
