/* ===================================================
   CAKRAWANGSA EXCLUSIVE VOUCHER MODAL & TICKET STYLES
   Dark Brown & Vintage Gold Luxury Theme
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Playfair+Display:ital,wght@0,600;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

.voucher-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(20, 15, 10, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.voucher-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.voucher-modal-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: #FFFDF8;
  background-image: 
    radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(147, 113, 0, 0.08) 0%, transparent 40%);
  border: 2px solid #D4AF37;
  border-radius: 20px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 30px rgba(212, 175, 55, 0.2);
  padding: 28px 24px;
  text-align: center;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #3D2D1D;
  box-sizing: border-box;
}

.voucher-modal-overlay.active .voucher-modal-card {
  transform: scale(1) translateY(0);
}

/* Custom Scrollbar */
.voucher-modal-card::-webkit-scrollbar {
  width: 5px;
}
.voucher-modal-card::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 10px;
}

/* Close Button */
.voucher-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(166, 125, 43, 0.3);
  background: #F8EFE2;
  color: #6C513F;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}
.voucher-close-btn:hover {
  background: #3D271D;
  color: #FFF;
  border-color: #3D271D;
  transform: rotate(90deg);
}

/* Seal Icon Header */
.voucher-header-seal {
  width: 58px;
  height: auto;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(166, 125, 43, 0.3));
}

.voucher-modal-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3D271D;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.voucher-modal-subtitle {
  font-size: 13px;
  color: #7A624E;
  margin: 0 0 20px;
  line-height: 1.45;
}

/* ===================================================
   FORM STATE
   =================================================== */
.voucher-form-group {
  text-align: left;
  margin-bottom: 18px;
}

.voucher-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #3D271D;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.voucher-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.voucher-input-prefix {
  position: absolute;
  left: 14px;
  font-weight: 600;
  color: #937100;
  font-size: 14px;
  pointer-events: none;
}

.voucher-input {
  width: 100%;
  padding: 13px 14px 13px 44px;
  font-size: 15px;
  font-weight: 600;
  color: #2C1C0F;
  background: #FFF;
  border: 1.5px solid #D4AF37;
  border-radius: 12px;
  outline: none;
  box-shadow: 0 2px 6px rgba(147, 113, 0, 0.08) inset;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.voucher-input:focus {
  border-color: #3D271D;
  box-shadow: 0 0 0 3px rgba(61, 39, 29, 0.15);
}

.voucher-error-msg {
  display: none;
  color: #A04000;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

/* Action Button */
.btn-voucher-generate {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #5C3D2E 0%, #3D271D 100%);
  color: #FFF2DF;
  border: 1.5px solid #D4AF37;
  border-radius: 12px;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(61, 39, 29, 0.35);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-voucher-generate:hover {
  background: linear-gradient(135deg, #704B38 0%, #4A3022 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(61, 39, 29, 0.45);
}

.btn-voucher-generate:active {
  transform: translateY(0);
}

.voucher-terms-note {
  font-size: 11px;
  color: #8C7561;
  margin-top: 14px;
  line-height: 1.4;
}

/* ===================================================
   TICKET STATE
   =================================================== */
.voucher-ticket-container {
  display: none;
  animation: ticketFadeIn 0.5s ease-out both;
}

@keyframes ticketFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.voucher-ticket-card {
  position: relative;
  background: #FFF;
  border: 2px dashed #D4AF37;
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 6px 20px rgba(166, 125, 43, 0.12);
  margin-bottom: 16px;
}

.ticket-discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #937100 0%, #C4971A 100%);
  color: #FFF;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 12px;
  box-shadow: 0 3px 8px rgba(147, 113, 0, 0.25);
}

.ticket-qr-frame {
  background: #FFF;
  padding: 12px;
  display: inline-block;
  border: 1.5px solid #E3CAA5;
  border-radius: 12px;
  margin: 10px auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.ticket-qr-frame canvas,
.ticket-qr-frame img {
  display: block;
  margin: 0 auto;
}

.ticket-code-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8C7561;
  margin-top: 10px;
}

.ticket-code-value {
  font-family: 'Cinzel', monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #3D271D;
  background: #F9F0E0;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid #D4AF37;
  display: inline-block;
  margin-top: 4px;
}

.ticket-details-list {
  border-top: 1px dashed #E0D1BA;
  margin-top: 14px;
  padding-top: 12px;
  text-align: left;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-detail-label {
  color: #7A624E;
}

.ticket-detail-val {
  font-weight: 600;
  color: #2C1C0F;
}

.ticket-valid-tag {
  color: #1E7E34;
  background: #E8F5E9;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
}

/* Screenshot Alert Banner */
.voucher-screenshot-alert {
  background: #FFF8EB;
  border: 1.5px solid #F0DDBE;
  border-left: 4px solid #937100;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.voucher-screenshot-alert .alert-icon {
  font-size: 20px;
  line-height: 1;
}

.voucher-screenshot-alert .alert-text {
  font-size: 12px;
  line-height: 1.45;
  color: #523B2A;
}

.voucher-screenshot-alert .alert-text strong {
  color: #3D271D;
  font-weight: 700;
}

/* Ticket Action Buttons */
.voucher-ticket-actions {
  display: flex;
  gap: 10px;
}

.btn-ticket-secondary {
  flex: 1;
  padding: 11px 14px;
  background: #F4EAE0;
  color: #523B2A;
  border: 1.5px solid #D4AF37;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-ticket-secondary:hover {
  background: #E8DACB;
  color: #2C1C0F;
}

.btn-ticket-primary {
  flex: 1;
  padding: 11px 14px;
  background: #3D271D;
  color: #FFF2DF;
  border: 1.5px solid #3D271D;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-ticket-primary:hover {
  background: #5C3D2E;
  border-color: #5C3D2E;
}
