/* ═══════════════════════════════════════════════════════════════════
   P4P ONLINE ORDERING — LIVE TRACKING & TICKET STYLING
   Movie Ticket Aesthetic, Status Timeline, Receipt, Order History
   ═══════════════════════════════════════════════════════════════════ */

.tracking-page-container {
  max-width: 780px;
  margin: 2.5rem auto 5rem;
  padding: 0 1rem;
}

/* ── Movie Ticket Card ── */
.movie-ticket-card {
  background: linear-gradient(135deg, #071711 0%, #0d271e 100%);
  border: 2px solid var(--p4p-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(201, 168, 76, 0.25);
  position: relative;
  overflow: hidden;
}

.movie-ticket-card.ticket-cancelled {
  border-color: #ef4444;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(239, 68, 68, 0.25);
}

.ticket-cancel-strip {
  background: linear-gradient(135deg, #991b1b 0%, #450a0a 100%);
  border-bottom: 2px solid #ef4444;
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.ticket-delay-strip {
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.85) 0%, rgba(69, 26, 3, 0.9) 100%);
  border-bottom: 1.5px solid #f59e0b;
  padding: 0.9rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  animation: pulseDelayGlow 2.5s infinite;
}

@keyframes pulseDelayGlow {
  0% { box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: inset 0 0 22px rgba(245, 158, 11, 0.4); }
  100% { box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.2); }
}

/* Perforated edge tear line */
.ticket-tear-line {
  position: relative;
  height: 2px;
  background-image: linear-gradient(to right, rgba(201, 168, 76, 0.4) 50%, rgba(255, 255, 255, 0) 0%);
  background-position: bottom;
  background-size: 14px 2px;
  background-repeat: repeat-x;
  margin: 1.5rem 0;
}

.ticket-tear-line::before, .ticket-tear-line::after {
  content: '';
  position: absolute;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--p4p-black);
  border: 2px solid var(--p4p-gold);
}

.ticket-tear-line::before {
  left: -14px;
  box-shadow: inset -4px 0 6px rgba(0, 0, 0, 0.6);
}

.ticket-tear-line::after {
  right: -14px;
  box-shadow: inset 4px 0 6px rgba(0, 0, 0, 0.6);
}

.ticket-header {
  padding: 2rem 2rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.ticket-title-group h1 {
  font-family: var(--font-cinema);
  font-size: 1.6rem;
  color: var(--p4p-gold);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.ticket-id-tag {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--p4p-cream);
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid var(--p4p-gold);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── Live ETA Banner ── */
.eta-live-strip {
  background: rgba(14, 34, 26, 0.85);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: var(--radius-md);
  margin: 0 2rem;
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.eta-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--p4p-gold-light);
}

.eta-time {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--p4p-cream);
}

/* ── Live Tracking Timeline ── */
.tracking-timeline-box {
  padding: 2rem;
}

.timeline-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  position: relative;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -24px;
  width: 2px;
  background: rgba(201, 168, 76, 0.25);
}

.timeline-step.completed:not(:last-child)::after {
  background: var(--p4p-gold);
}

.step-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.35);
  background: #091a13;
  color: var(--p4p-cream-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-step.active .step-marker {
  border-color: var(--p4p-gold);
  background: var(--p4p-gold);
  color: #040907;
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.6);
  animation: pulseMarker 1.8s infinite;
}

@keyframes pulseMarker {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.timeline-step.completed .step-marker {
  border-color: #10b981;
  background: #10b981;
  color: #ffffff;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--p4p-cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-time-badge {
  font-size: 0.75rem;
  color: var(--p4p-gold);
  font-weight: 600;
}

.step-note {
  font-size: 0.85rem;
  color: var(--p4p-cream-muted);
  margin-top: 0.25rem;
}

/* ── Itemized Receipt Summary ── */
.ticket-receipt-section {
  padding: 0 2rem 2rem;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.receipt-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p4p-gold);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}

.receipt-table td {
  padding: 0.75rem 0;
  font-size: 0.88rem;
  color: var(--p4p-cream);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.receipt-table td.qty-col {
  width: 45px;
  color: var(--p4p-gold-light);
  font-weight: 700;
}

.receipt-table td.price-col {
  text-align: right;
  font-weight: 700;
}

/* ── Ticket Barcode & Footer ── */
.ticket-barcode-section {
  background: #040c09;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  border-top: 1px dashed rgba(201, 168, 76, 0.3);
}

.simulated-barcode {
  font-family: monospace;
  letter-spacing: 4px;
  font-size: 1.1rem;
  color: var(--p4p-gold);
  opacity: 0.8;
}

.ticket-actions-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.whatsapp-share-btn {
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.print-receipt-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--p4p-cream);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
}

/* ── Print Styles ── */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .p4p-header, .p4p-top-strip, .ticket-actions-group {
    display: none !important;
  }
  .movie-ticket-card {
    border: 2px solid #000000;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
  }
  .receipt-table td, .receipt-table th, h1, p, span {
    color: #000000 !important;
  }
}

/* ── Mobile Responsive Tracking Page ── */
@media (max-width: 640px) {
  .tracking-page-container {
    margin: 1.2rem auto 3rem;
    padding: 0 0.75rem;
  }
  .ticket-header {
    padding: 1.4rem 1.2rem 0.9rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .ticket-title-group h1 {
    font-size: 1.25rem;
  }
  .ticket-cancel-strip,
  .ticket-delay-strip {
    padding: 1rem 1.2rem;
  }
  .ticket-tear-line {
    margin: 1.1rem 0;
  }
  /* ETA strip: stack on mobile */
  .eta-live-strip {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  /* Ticket action buttons: full width */
  .ticket-actions-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1.2rem 1.2rem;
  }
  .ticket-actions-group a,
  .ticket-actions-group button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

