/* v2.1.9 — Mobile frame corrections, no edits to Cocoon Child. */
/* Scope to Cocoon footer-menu mode; outside this mode Cocoon decides visibility. */
@media screen and (max-width: 1023px) {
  body.mobile-button-fmb > .mobile-footer-menu-buttons,
  body.mobile-button-fmb .mobile-footer-menu-buttons.mobile-menu-buttons {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    margin: 0 !important;
    z-index: 99999 !important;
    /* Cocoon and iOS share the same safe-area inset. Preserve all existing colors/icons. */
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    will-change: auto !important;
    transition-property: background-color, box-shadow, border-color !important;
  }
  /* Existing 64px menu height + the safe-area below the home indicator. */
  body.mobile-button-fmb {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* Mobile mascot: keep it about 2/3 of the original size, and make drag bounds symmetric.
   Key fix: take the hidden contact panel out of normal flow so the widget's box equals the visible button,
   otherwise the right-side clamp uses the panel width and pushes the mascot inward. */
@media screen and (max-width: 600px) {
  body.hocdii-ui-v12 .hocdii-contact-widget,
  body.hocdii-ui-v13 .hocdii-contact-widget {
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    min-height: 55px !important;
    max-width: 55px !important;
    max-height: 55px !important;
    display: block !important;
    overflow: visible !important;
  }
  body.hocdii-ui-v12 .hocdii-contact-widget .hocdii-contact-toggle,
  body.hocdii-ui-v13 .hocdii-contact-widget .hocdii-contact-toggle {
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    min-height: 55px !important;
    max-width: 55px !important;
    max-height: 55px !important;
    display: block !important;
    margin: 0 !important;
  }
  body.hocdii-ui-v12 .hocdii-contact-widget .hocdii-contact-toggle-icon,
  body.hocdii-ui-v13 .hocdii-contact-widget .hocdii-contact-toggle-icon {
    width: 100% !important;
    height: 100% !important;
    inset: 0 !important;
  }
  body.hocdii-ui-v12 .hocdii-contact-widget .hocdii-contact-toggle-icon img,
  body.hocdii-ui-v13 .hocdii-contact-widget .hocdii-contact-toggle-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
  body.hocdii-ui-v12 .hocdii-contact-widget .hocdii-contact-links,
  body.hocdii-ui-v13 .hocdii-contact-widget .hocdii-contact-links {
    position: absolute !important;
    right: 0 !important;
    bottom: calc(100% + 12px) !important;
    top: auto !important;
    width: 180px !important;
    max-width: 180px !important;
  }
  body.hocdii-ui-v12 .hocdii-contact-widget.panel-below .hocdii-contact-links,
  body.hocdii-ui-v13 .hocdii-contact-widget.panel-below .hocdii-contact-links {
    top: calc(100% + 12px) !important;
    bottom: auto !important;
  }
}


