/* MBG366 Custom Bottom Menu - Logo Theme Blue Purple Neon v15 */

@media (max-width: 768px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mbg-original-bottom-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #mbgCustomBottomNav {
    position: fixed !important;

    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;

    width: 100% !important;
    height: calc(76px + env(safe-area-inset-bottom, 0px)) !important;

    z-index: 2147483000 !important;

    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    align-items: center !important;

    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 8px !important;
    box-sizing: border-box !important;

    border-radius: 18px 18px 0 0 !important;

    background:
      linear-gradient(180deg, rgba(12, 20, 38, 0.98) 0%, rgba(3, 6, 15, 1) 58%, rgba(1, 3, 8, 1) 100%) !important;

    border-top: 1px solid rgba(0, 226, 255, 0.55) !important;

    box-shadow:
      0 -4px 18px rgba(0, 0, 0, 0.70),
      0 0 14px rgba(0, 198, 255, 0.28),
      0 0 24px rgba(151, 55, 255, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;

    overflow: visible !important;
    transform: none !important;
  }

  #mbgCustomBottomNav::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      rgba(0, 198, 255, 0),
      rgba(255, 255, 255, 0.85),
      rgba(0, 226, 255, 0.85),
      rgba(168, 70, 255, 0.85),
      rgba(0, 198, 255, 0)
    );
    pointer-events: none;
  }

  #mbgCustomBottomNav .mbg-bottom-item {
    width: 100% !important;
    height: 62px !important;
    min-width: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;

    padding: 0 !important;
    margin: 0 !important;

    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    text-decoration: none !important;

    color: #ffffff !important;
    font-family: Arial, Helvetica, sans-serif !important;

    -webkit-tap-highlight-color: transparent !important;
  }

  #mbgCustomBottomNav .mbg-bottom-item:active {
    transform: scale(0.96) !important;
  }

  #mbgCustomBottomNav .mbg-bottom-icon-wrap {
    width: 40px !important;
    height: 40px !important;
    border-radius: 14px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background:
      linear-gradient(145deg, rgba(255,255,255,0.18) 0%, rgba(33, 70, 120, 0.18) 35%, rgba(12, 16, 34, 0.96) 100%) !important;

    border: 1px solid rgba(118, 234, 255, 0.35) !important;

    box-shadow:
      0 0 8px rgba(0, 226, 255, 0.22),
      0 0 14px rgba(137, 61, 255, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.20),
      inset 0 -3px 8px rgba(0, 0, 0, 0.45) !important;
  }

  #mbgCustomBottomNav .mbg-bottom-icon {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }

  #mbgCustomBottomNav .mbg-bottom-icon svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;

    stroke: #eefbff !important;
    fill: none !important;
    stroke-width: 2.25 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;

    filter:
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.55))
      drop-shadow(0 0 6px rgba(0, 226, 255, 0.45))
      drop-shadow(0 0 9px rgba(143, 65, 255, 0.22)) !important;
  }

  #mbgCustomBottomNav .mbg-bottom-label {
    display: block !important;
    width: 100% !important;

    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    letter-spacing: 0.2px !important;

    color: #f6fcff !important;
    text-shadow:
      0 0 3px #000000,
      0 0 5px rgba(0, 226, 255, 0.55),
      0 0 8px rgba(151, 55, 255, 0.35) !important;
  }

  /* CHAT TENGAH - MBG366 BLUE PURPLE CENTER */
  #mbgCustomBottomNav .mbg-bottom-chat {
    position: relative !important;
    z-index: 8 !important;
    transform: translateY(-5px) !important;
  }

  #mbgCustomBottomNav .mbg-bottom-chat .mbg-bottom-icon-wrap {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;

    border-radius: 50% !important;

    background:
      radial-gradient(circle at 28% 20%, #ffffff 0%, #c8fbff 10%, #00e6ff 31%, #1678ff 56%, #9d42ff 100%) !important;

    border: 2px solid rgba(255, 255, 255, 0.36) !important;

    box-shadow:
      0 0 8px rgba(255, 255, 255, 0.55),
      0 0 16px rgba(0, 226, 255, 0.88),
      0 0 30px rgba(22, 120, 255, 0.62),
      0 0 42px rgba(157, 66, 255, 0.55),
      inset 0 2px 4px rgba(255, 255, 255, 0.35),
      inset 0 -5px 10px rgba(0, 0, 0, 0.38) !important;

    overflow: visible !important;
  }

  #mbgCustomBottomNav .mbg-bottom-chat .mbg-bottom-icon {
    width: 27px !important;
    height: 27px !important;
  }

  #mbgCustomBottomNav .mbg-bottom-chat .mbg-bottom-icon svg {
    stroke: #ffffff !important;
    stroke-width: 2.5 !important;
    filter:
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.75))
      drop-shadow(0 0 8px rgba(0, 60, 140, 0.35)) !important;
  }

  #mbgCustomBottomNav .mbg-bottom-chat .mbg-bottom-label {
    font-size: 10px !important;
    font-weight: 900 !important;
    margin-top: 0 !important;
    color: #ffffff !important;
  }

  /* efek highlight kecil di menu aktif saat disentuh */
  #mbgCustomBottomNav .mbg-bottom-item:hover .mbg-bottom-icon-wrap,
  #mbgCustomBottomNav .mbg-bottom-item:active .mbg-bottom-icon-wrap {
    border-color: rgba(255, 255, 255, 0.55) !important;
    box-shadow:
      0 0 10px rgba(0, 226, 255, 0.38),
      0 0 18px rgba(157, 66, 255, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  }
}

@media (min-width: 769px) {
  #mbgCustomBottomNav {
    display: none !important;
  }
}

/* MBG366 Bottom Menu Click Safe */
@media (max-width: 768px) {
  #mbgCustomBottomNav {
    pointer-events: auto !important;
  }

  #mbgCustomBottomNav .mbg-bottom-item {
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  #mbgCustomBottomNav .mbg-bottom-item * {
    pointer-events: none !important;
  }
}

/* Hide bottom menu saat live chat Tawk.to terbuka */
@media (max-width: 768px) {
  body.mbg-livechat-open #mbgCustomBottomNav {
    display: none !important;
  }
}

/* MBG366 Bottom Menu - Samsung Note Click Fix v20 */
@media (min-width: 391px) and (max-width: 430px) {
  #mbgCustomBottomNav {
    z-index: 2147483600 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  #mbgCustomBottomNav .mbg-bottom-item {
    position: relative !important;
    z-index: 2147483601 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
  }

  #mbgCustomBottomNav .mbg-bottom-chat {
    position: relative !important;
    z-index: 2147483602 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  #mbgCustomBottomNav .mbg-bottom-chat::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: -8px;
    bottom: -8px;
    z-index: 1;
    pointer-events: none;
  }

  #mbgCustomBottomNav .mbg-bottom-item * {
    pointer-events: none !important;
  }

  body.mbg-livechat-open #mbgCustomBottomNav {
    display: none !important;
  }
}