#wh-voucher-page-wrapper {
  /* font-family: "Lato"; */
}

#wh-voucher-page-wrapper li {
  font-size: 16px;
}

#wh-voucher-page-wrapper p {
  font-size: 14px;
}

.wh-voucher-container {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /* font-family: Arial, sans-serif; */
}

.wh-voucher-container h3 {
  text-align: center;
  margin-bottom: 20px;
}

.wh-voucher-form {
  display: flex;
  gap: 10px;
}

#wh-voucher-code {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#wh-redeem-button {
  padding: 10px 20px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#wh-voucher-status {
  margin-top: 20px;
  padding: 15px;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
}

#wh-voucher-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

#wh-voucher-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Container Utama */
.wh-voucher-result-card {
  /* border: 1px solid #e0e0e0; */
  border-radius: 8px;
  padding: 20px;
  background-color: #fff;
  max-width: 800px;
  margin: 30px auto; /* Pusatkan */
  /* box-shadow: 0 4px 8px rgba(0,0,0,0.05); */
}

/* Tombol Check Other Voucher */
.wh-check-other-voucher-btn {
  color: #000; /* Merah sesuai gambar */
  border: 1px solid #000;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.wh-check-other-voucher-btn .dashicons {
  font-size: 18px;
  line-height: 1;
}

/* Detail Voucher Container */
.wh-voucher-details-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  border: 1px solid #d9d9d9; /* Garis pemisah */
  padding: 20px;
}

/* Gambar Produk */
.wh-voucher-image {
  flex: 0 0 200px; /* Lebar tetap untuk gambar */
  overflow: hidden;
}
.wh-voucher-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Pastikan gambar mengisi area tanpa terdistorsi */
  display: block;
}

/* Informasi Voucher */
.wh-voucher-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Untuk menempatkan tombol di bawah */
}
.wh-voucher-info h3 {
  margin-top: 0;
  margin-bottom: 5px;
  color: #000;
  font-size: 16px;
  /* font-family: "Futura Md BT"; */
  font-weight: 500;
}
.wh-voucher-product-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

#voucher-product-short-description {
  color: #808080;
  padding-bottom: 20px;
  margin-bottom: 25px;
  border-bottom: 1px solid #d9d9d9;
}

#voucher-product-description b {
  font-size: 16px;
  margin-bottom: 15px;
  display: block;
}

/* Detail Pelanggan dan Tanggal */
.wh-voucher-customer-details {
  display: flex;
  gap: 30px;
  margin-bottom: 15px;
}
.wh-voucher-customer-details p {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #555;
}
.wh-voucher-customer-details strong {
  color: #000000;
  min-width: 90px; /* Agar sejajar */
  display: inline-block;
}

.wh-voucher-customer-details p span {
  color: #808080;
}

.wh-voucher-customer-details p {
  margin-bottom: 10px;
}

.wh-voucher-customer-details > div {
  width: calc((100% - 30px) / 2);
}

/* Jumlah / Harga */
.wh-voucher-amount {
  font-size: 20px;
  font-weight: bold;
  /* color: #ff9831; */
  margin-top: 25px;
}

/* Tombol Redeem */
.wh-redeem-voucher-btn {
  background-color: #000 !important;
  color: #fff;
  border: none;
  padding: 7px 10px;
  border-radius: 5px !important;
  font-size: 13px !important;
  cursor: pointer !important;
  width: 100%;
  max-width: 130px;
  text-transform: uppercase;
  font-weight: 400 !important;
  transition: background-color 0.3s ease;
}

/* Syarat dan Ketentuan */
.wh-voucher-terms {
  margin-top: 20px;
  padding-top: 20px;
  color: #808080;
}
.wh-voucher-terms b,
.wh-voucher-terms strong {
  color: #000;
}
.wh-voucher-terms h4 {
  color: #333;
  font-size: 16px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.wh-voucher-terms ul {
  list-style: disc;
  margin-left: 20px;
  padding-left: 0;
  font-size: 13px;
}
.wh-voucher-terms ul li {
  margin-bottom: 5px;
}

#voucher-result-display.expired .wh-voucher-details-container,
#voucher-result-display.redeemed .wh-voucher-details-container {
  background-color: rgb(0 0 0 / 3%);
}

/* Responsif dasar */
@media (max-width: 768px) {
  .wh-voucher-details-container {
    flex-direction: column;
  }
  .wh-voucher-image {
    width: 100%;
    height: 250px; /* Sesuaikan tinggi gambar untuk mobile */
  }
  .wh-voucher-customer-details {
    flex-direction: column;
    gap: 10px;
  }
  .wh-redeem-voucher-btn {
    width: 100%;
    max-width: none;
  }
  .wh-voucher-amount {
    text-align: left; /* Sesuaikan posisi harga */
  }
}

/* Styling untuk form input voucher (contoh, sesuaikan dengan form Anda) */
#voucher-check-form {
  max-width: 570px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  text-align: left;
}

.wh-voucher-input-group {
  display: flex;
  gap: 31px;
}

h2.wh-voucher-heading {
  color: #000;
  /* font-family: "Futura Md BT"; */
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

div#voucher-check-form p {
  color: #808080;
  /* font-family: "Lato"; */
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  margin-bottom: 10px;
  margin-top: 25px;
}

#voucher-check-form input[type="text"] {
  width: 100%;
  flex: 1;
  height: 40px;
  flex-shrink: 0;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 16px;
}
#voucher-check-form button {
  display: inline-flex;
  height: 40px;
  padding: 6px 11px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  /* font-family: Lato; */
  width: 135px;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-transform: uppercase;
}
#voucher-check-form button:hover {
  background-color: #ffff;
  color: #000;
}

.wh-message-head img {
  display: none;
}

/* --- Modal Pop-up --- */
.wh-redeemed-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.wh-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.wh-modal-content {
  background-color: #fff;
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 450px;
  position: relative;
  z-index: 10000;
}

.wh-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
}

.wh-modal-icon .dashicons-yes {
  font-size: 60px;
  color: #4caf50; /* Warna hijau */
  background-color: #e8f5e9;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.wh-modal-title {
  font-size: 26px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.wh-modal-text {
  font-size: 16px;
  color: #666;
  line-height: 1.4;
}

.wh-modal-text span {
  font-weight: bold;
}

/* --- Badge Voucher yang Sudah Digunakan (Hijau) --- */
.wh-voucher-image {
  position: relative; /* supaya badge bisa absolute */
}

.wh-redeemed-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* font-family: "Futura Md BT"; */
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  color: #4caf50;
  text-align: center;
  padding: 10px;
}

#wh-redeemed-badge span {
  border: 2px solid #53c65e;
  padding: 10px;
  width: 145px;
  height: 54px;
  margin-bottom: -30px;
}

/* overlay putih transparan */
.wh-redeemed-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: -1;
}

/* lingkaran hijau dengan centang */
.wh-redeemed-badge span::before {
  content: "";
  position: absolute;
  top: calc(50% - 45px);
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url("/wp-content/uploads/2025/09/check_green.png");
  background-size: contain;
}

/* --- Badge Voucher EXPIRED (Merah) --- */
.wh-redeemed-badge.expired {
  color: inherit; /* merah utama */
}

/* overlay putih transparan sama */
.wh-redeemed-badge.expired::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: -1;
}

/* lingkaran merah dengan tanda seru */
#wh-expired-badge span::before {
  top: calc(50% - 25px);
  background-image: url(/wp-content/uploads/2025/09/expired_red.png);
  background-size: contain;
}

#wh-expired-badge span {
  border: 2px solid #000;
  padding: 10px;
  width: 145px;
  height: 37px;
  margin-bottom: -50px;
}

/* --- Tampilan Pesan Error dan Sukses Inline --- */
#wh-message-container {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
}

#wh-message-content {
  padding-top: 15px;
  text-align: center;
}

.wh-message-content-box {
  padding: 20px;
  border-radius: 8px;
}

.wh-message-content-box.success {
  color: #4caf50;
  text-align: center;
  max-width: 500px;
  margin: auto;
}

.wh-message-content-box.error h3 {
  color: inherit;
}

.wh-message-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

.wh-message-icon .dashicons-yes {
  color: #4caf50;
}

.wh-message-icon .dashicons-no-alt {
  color: inherit;
}

.wh-message-title {
  font-size: 45px;
  /* font-weight: bold; */
  margin-bottom: 10px;
}

.wh-message-text {
  font-size: 16px;
  line-height: 1.4;
  color: #555;
}

.wh-helpful-tips {
  text-align: left;
  margin-top: 20px;
  color: #333;
}

#wh-voucher-page-wrapper p.wh-message-text {
  font-size: 16px;
  color: #808080;
  display: flex;
}

.wh-helpful-tips h4 {
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: #000;
}

.wh-helpful-tips ul {
  margin-left: 20px;
  padding-left: 0;
  font-size: 13px;
  list-style: disc;
}
#wh-voucher-page-wrapper .wh-helpful-tips li {
  color: #808080;
}

.wh-message-head {
  display: flex;
  flex-flow: row wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.content .wh-message-head img {
  min-height: auto;
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin: 0;
}

.wh-message-head h3.wh-message-title {
  font-size: 24px;
  /* font-family: "Futura Md BT";
  font-weight: 500; */
  margin: 0;
}

.wh-message-content-box.success img {
  width: 50px;
  min-height: 50px;
  object-fit: contain;
}

.wh-message-content-box.success h3 {
  margin-top: 5px;
}

.wh-message-content-box.success p {
  justify-content: center;
}

.modal.voucher-modal .close-modal {
  top: 25px;
  right: 25px;
}

.voucher-modal.modal {
  position: absolute;
  max-width: 770px;
  width: 90%;
  height: 400px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  align-content: center;
}

.wh-message-content-box.success img {
  display: none;
}
