/* Mobile overflow fixes: lang/currency dropdown + JivoChat */

/* Language / currency popup (style_openedContainer__HGtug) */
@media only screen and (max-width: 1024px) {
  .style_container__m91XK {
    position: relative;
    z-index: 9999999;
  }

  .style_openedContainer__HGtug {
    position: fixed !important;
    right: 12px !important;
    left: auto !important;
    top: 56px !important;
    width: min(200px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
    z-index: 10000001 !important;
  }

  .style_confirmBtn__M\+ygR {
    width: 100%;
    box-sizing: border-box;
  }
}

/* Prevent horizontal page scroll on small screens */
@media only screen and (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  /* Jivo launcher — pin to bottom-right, above mobile bottom nav */
  jdiv.wrap__TBMlw,
  jdiv[class*="wrap__"][class*="_orientationRight"],
  jdiv[class*="wrap__"][class*="_show"] {
    left: auto !important;
    right: 10px !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    box-sizing: border-box !important;
  }

  jdiv[class*="button__"],
  jdiv[class*="buttonIcon"],
  jdiv#jivo_chat_widget,
  #jivo_custom_widget {
    left: auto !important;
    right: 0 !important;
    max-width: calc(100vw - 20px) !important;
    box-sizing: border-box !important;
  }

  /* Opened Jivo chat panel — keep inside viewport */
  jdiv.notranslate[class*=""],
  jdiv[class*="mobileBody"],
  jdiv[class*="leafCont"],
  jdiv[class*="offlineLabel"] {
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
}
