/* ==============================
   NOTIFIKASI PEMBELIAN
============================== */

.buy-notif {
  position: fixed;
  left: 12px;
  z-index: 9997;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 118px);
  padding: 6px 16px 6px 6px;
  overflow: hidden;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #1894F7 0%, #0A5FD0 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  box-shadow:
    0 10px 24px rgba(10, 95, 208, 0.35),
    0 2px 6px rgba(16, 21, 28, 0.12);
  font-family: 'Poppins', sans-serif;
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

/* Muncul dari bawah, hilang ke bawah */
.buy-notif.bawah {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(calc(100% + 40px));
}

/* Muncul dari atas, hilang ke atas (menyelip di bawah navbar) */
.buy-notif.atas {
  top: 78px;
  transform: translateY(calc(-100% - 100px));
}

.buy-notif.show {
  opacity: 1;
  transform: translateY(0);
}

/* Logo aplikasi di kotak putih */
.buy-notif-img {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 3px;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* Satu baris: nomor membeli produk */
.buy-notif-text {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
}

.buy-notif-num {
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #FFFFFF;
}

.buy-notif-prod {
  font-weight: 700;
  color: #FFFFFF;
}

/* Garis waktu tipis di bawah, menyusut selama notif tampil.
   Angka 3s = lama tampil (LAMA di pembelian.js). Ubah kalau LAMA diubah. */
.buy-notif::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.6);
  transform-origin: left;
  transform: scaleX(0);
}

.buy-notif.show::after {
  animation: buyBar 3s linear 0.45s both;
}

@keyframes buyBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .buy-notif {
    transition: opacity 0.3s ease;
  }

  .buy-notif.bawah,
  .buy-notif.atas {
    transform: none;
  }

  .buy-notif.show::after {
    animation: none;
  }
}
