/* ==============================
   VOUCHER DISKON
============================== */

.voucher-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Kartu tiket: lubang setengah lingkaran di garis sobekan */
.voucher {
  --notch: 8px;
  --left: 84px;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 84px;
  background: #F1F8FF;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  -webkit-mask:
    radial-gradient(circle var(--notch) at var(--left) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at var(--left) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at var(--left) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at var(--left) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}

/* Sisi kiri: logo */
.voucher-logo {
  width: var(--left);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #DCEEFF;
  border-radius: 10px 0 0 10px;
}

.voucher-logo img {
  max-width: 100%;
  max-height: 44px;
  object-fit: contain;
}

/* Sisi kanan: keterangan + tombol */
.voucher-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 2px dashed #A9CFF5;
}

.voucher-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.voucher-info strong {
  font-size: 15px;
  font-weight: 700;
  color: #038df2;
  line-height: 1.3;
}

.voucher-info span {
  font-size: 11.5px;
  color: #4A5568;
  line-height: 1.4;
}

.voucher-info small {
  font-size: 10px;
  color: #8492A6;
  line-height: 1.4;
}

.voucher-info small.urgent {
  color: #E5484D;
  font-weight: 600;
}

.voucher-info small.warn {
  color: #E5484D;
}

.voucher-btn {
  flex: none;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #038df2;
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.voucher-btn:active {
  opacity: 0.8;
}

/* Sedang dipakai */
.voucher.applied {
  background: #E8F4FF;
  box-shadow: inset 0 0 0 2px #038df2;
}

.voucher.applied .voucher-btn {
  background: #FFFFFF;
  color: #038df2;
  box-shadow: inset 0 0 0 1.5px #038df2;
}

/* Tidak bisa dipakai (sudah terpakai / belum memenuhi minimal belanja) */
.voucher.disabled {
  filter: grayscale(1);
  opacity: 0.6;
}

.voucher.disabled .voucher-btn {
  background: #B8C2CF;
  color: #FFFFFF;
  cursor: not-allowed;
}

/* Info hemat di bawah kartu */
.voucher-saving {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #20A464;
}

.voucher-saving.show {
  display: block;
}

@media (max-width: 380px) {
  .voucher {
    --left: 70px;
  }

  .voucher-body {
    padding: 10px;
    gap: 8px;
  }

  .voucher-btn {
    padding: 8px 11px;
  }
}

.order-box .toast {
  width: max-content;
  min-width: 0;
  max-width: calc(100% - 40px);
  padding: 10px 18px;
  white-space: nowrap;
  text-align: center;
}

/* ==============================
   POPUP AJAKAN PAKAI PROMO
============================== */

.promo-pop-overlay {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 21, 28, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.promo-pop-overlay.show {
  opacity: 1;
  visibility: visible;
}

.promo-pop {
  width: 100%;
  max-width: 340px;
  padding: 26px 22px 18px;
  background: #FFFFFF;
  border-radius: 20px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  transform: scale(0.94);
  transition: transform 0.2s ease;
}

.promo-pop-overlay.show .promo-pop {
  transform: scale(1);
}

.promo-pop-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #EAF4FF;
  color: #038df2;
}

.promo-pop h3 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
  color: #10151C;
  line-height: 1.4;
}

.promo-pop p {
  margin-bottom: 14px;
  font-size: 13px;
  color: #5B6B7F;
  line-height: 1.5;
}

.promo-pop-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F1F8FF;
}

.promo-pop-info strong {
  font-size: 15px;
  font-weight: 700;
  color: #038df2;
}

.promo-pop-info span {
  font-size: 12px;
  color: #4A5568;
}

.promo-pop-yes {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: #038df2;
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.promo-pop-yes:active {
  opacity: 0.85;
}

.promo-pop-skip {
  margin-top: 8px;
  padding: 8px;
  border: none;
  background: none;
  color: #8492A6;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
