/* MBG366 Lite CSS - APK Banner + Withdraw Popup Home Only Mobile v9 */

body {
  scroll-behavior: smooth;
}

@media (min-width: 769px) {
  .mbg-apk-banner,
  #mbgWithdrawPopup {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .mbg-apk-banner {
    width: 100%;
    max-width: 100%;
    height: 60px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    text-decoration: none !important;
    overflow: hidden;
    background: linear-gradient(110deg, #23008b 0%, #180064 60%, #0bbde0 100%);
    font-family: Arial, Helvetica, sans-serif;
    z-index: 9999 !important;
    border-bottom: 1px solid #10d6ff;
  }

  .mbg-apk-logo {
    margin-left: 7px;
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    object-fit: contain !important;
    border-radius: 6px;
    flex: 0 0 38px;
  }

  .mbg-apk-text {
    margin-left: 7px;
    line-height: 1.05;
    width: 128px;
    flex: 0 0 128px;
    overflow: hidden;
  }

  .mbg-apk-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
    white-space: nowrap;
  }

  .mbg-apk-subtitle {
    color: #eaff00;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
  }

  .mbg-apk-button {
    margin-left: auto;
    margin-right: 7px;
    width: 150px;
    height: 38px;
    border-radius: 24px;
    background: linear-gradient(90deg, #b414b9 0%, #e83ad0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  #mbgWithdrawPopup {
    position: fixed !important;
    left: 50% !important;

    /*
      Default Chrome / Android.
      Posisi dibuat di atas bottom menu.
    */
    bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;

    transform: translateX(-50%) translateY(14px);
    width: 340px;
    max-width: calc(100% - 24px);
    height: 58px;
    z-index: 2147482500 !important;
    display: flex !important;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #071225 0%, #0a1d4a 42%, #411184 100%);
    border: 1px solid #4fdcff;
    border-radius: 16px;
    box-shadow:
      0 0 8px rgba(0, 191, 255, 0.35),
      0 0 14px rgba(138, 43, 226, 0.20);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  /*
    Safari / iPhone.
    Dibuat sedikit lebih tinggi karena Safari punya bottom bar.
  */
  body.mbg-browser-safari #mbgWithdrawPopup {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /*
    Chrome.
    Posisi normal.
  */
  body.mbg-browser-chrome #mbgWithdrawPopup {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #mbgWithdrawPopup.mbg-wd-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .mbg-wd-icon {
    width: 41px;
    height: 41px;
    flex: 0 0 41px;
    border-radius: 10px;
    background: #101a35;
    border: 1px solid #8a2be2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mbg-wd-coin {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    border: 2px solid #00d8ff;
    color: #00d8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
  }

  .mbg-wd-content {
    flex: 1;
    color: #ffffff;
    text-align: center;
    line-height: 1.15;
    overflow: hidden;
  }

  .mbg-wd-line1 {
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    color: #ffffff;
  }

  .mbg-wd-check {
    color: #00f0ff;
    font-size: 11px;
  }

  #mbgWdUser {
    color: #ffe600;
    font-weight: 900;
  }

  .mbg-wd-line2 {
    margin-top: 5px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    color: #ffffff;
  }

  #mbgWdAmount {
    color: #ff59ff;
    font-size: 16px;
    font-weight: 900;
  }
}

/* Hide Withdraw Popup saat Live Chat terbuka */
@media (max-width: 768px) {
  body.mbg-livechat-open #mbgWithdrawPopup {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* Hide Withdraw Popup saat Live Chat terbuka */
@media (max-width: 768px) {
  body.mbg-livechat-open #mbgWithdrawPopup {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}