/* ==========================================================================
   TICKET CONFIRMATION CARD & CONFETTI STYLES
   Exact 1:1 match to React ticket-confirmation-card with BDT & QR code
   ========================================================================== */

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes ticketZoomIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes checkBounce {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 2px;
}

/* Modal Overlay (Scrollable top-safe centering across desktop & mobile) */
.ticket-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 14px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Ticket Paper Card */
.ticket-confirmation-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: auto 0;
  flex-shrink: 0;
  background: #ffffff;
  color: #0f172a;
  border-radius: 22px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.12);
  padding: 28px 26px 24px;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  animation: ticketZoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 10;
}

.ticket-notch-left,
.ticket-notch-right {
  display: none !important;
}

/* Header */
.ticket-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.ticket-check-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  animation: checkBounce 0.5s ease-out forwards;
}

.ticket-check-icon-wrap svg {
  width: 32px;
  height: 32px;
  color: #10b981;
}

.ticket-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.ticket-subtitle {
  font-size: 13.5px;
  color: #64748b;
}

/* Dashed Line Separator */
.ticket-dashed-line {
  width: 100%;
  border-top: 2px dashed #e2e8f0;
  margin: 16px 0;
}

/* Two-column Info Grid */
.ticket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
}

.ticket-col-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.ticket-order-id-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14.5px;
  font-weight: 700;
  color: #ea580c;
}

.ticket-amount-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.ticket-date-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
}

/* Payment Method Box */
.ticket-payment-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.ticket-payment-icon {
  width: 44px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ticket-payment-details {
  flex: 1;
}

.ticket-cardholder {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.ticket-payment-desc {
  font-size: 12px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* Barcode & QR Code Section */
.ticket-barcode-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 0;
}

.ticket-qr-wrap {
  width: 104px;
  height: 104px;
  padding: 6px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.ticket-qr-wrap img,
.ticket-qr-wrap svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ticket-scan-hint {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 8px;
}

.ticket-barcode-svg-wrap {
  width: 100%;
  max-width: 240px;
  height: 36px;
  display: flex;
  justify-content: center;
}

.ticket-barcode-svg-wrap svg {
  width: 100%;
  height: 100%;
}

.ticket-barcode-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: #94a3b8;
  margin-top: 4px;
}

/* Action Buttons */
.ticket-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.btn-ticket-invoice {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ea580c;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
  transition: background 0.2s;
}

.btn-ticket-invoice:hover {
  background: #c2410c;
}

.btn-ticket-close {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  color: #475569;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-ticket-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 560px) {
  .ticket-modal-overlay {
    padding: 14px 10px;
  }
  .ticket-confirmation-card {
    padding: 20px 16px 18px;
    border-radius: 18px;
  }
  .ticket-check-icon-wrap {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
  }
  .ticket-title {
    font-size: 21px;
  }
  .ticket-dashed-line {
    margin: 12px 0;
  }
  .ticket-amount-val {
    font-size: 16.5px;
  }
  .ticket-qr-wrap {
    width: 90px;
    height: 90px;
  }
}
