/*============================
  Wonder Park - Tickets Modal
  UI/UX Design: Advanced & Clean
============================*/

/* Modal Container */
.tickets-modal-dialog {
  max-width: 420px;
  margin: 1rem auto;
  max-height: calc(100vh - 120px); /* Reserve space for mobile menu */
}

.tickets-modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

/* Modal Header */
.tickets-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  flex-shrink: 0;
}

.tickets-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tickets-icon-container {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #FF006F 0%, #E91E63 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 0, 111, 0.2);
}

.tickets-icon-container i {
  font-size: 20px;
  color: #FFFFFF;
}

.tickets-header-text h4 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.2;
}

.tickets-modal-subtitle {
  font-size: 14px;
  color: #6B7280;
  margin: 4px 0 0 0;
  font-weight: 500;
}

.tickets-close-btn {
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #6B7280;
}

.tickets-close-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #374151;
  transform: scale(1.05);
}

.tickets-close-btn i {
  font-size: 20px;
}

/* Modal Body */
.tickets-modal-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.tickets-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Ticket Cards */
.ticket-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.06);
  position: relative;
}

.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ticket-left {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ticket-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #374151;
  letter-spacing: 0.5px;
}

.ticket-logo i {
  font-size: 18px;
  color: #FF006F;
}

.ticket-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ticket-status.valid {
  background: rgba(34, 197, 94, 0.1);
  color: #059669;
}

.ticket-status.expired {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.ticket-status.upcoming {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
}

.ticket-status i {
  font-size: 14px;
}

.ticket-type {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.2;
}

.ticket-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.ticket-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
}

.ticket-detail i {
  font-size: 14px;
  color: #9CA3AF;
  width: 16px;
  flex-shrink: 0;
}

.ticket-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
}

.price-amount {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.price-currency {
  font-size: 14px;
  font-weight: 600;
  color: #6B7280;
}

/* QR Code Section */
.qr-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #F8FAFC;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 12px;
}

.qr-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticket-id {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  letter-spacing: 0.5px;
}

.qr-label {
  font-size: 12px;
  color: #9CA3AF;
  font-weight: 500;
}

.qr-code {
  width: 48px;
  height: 48px;
  background: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.qr-code:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(255, 0, 111, 0.12);
}

.qr-placeholder i {
  font-size: 20px;
  color: #9CA3AF;
}

/* Ticket States */
.expired-ticket {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.upcoming-ticket {
  border-left: 4px solid #2563EB;
}

.active-ticket {
  border-left: 4px solid #059669;
}

/* Empty State */
.tickets-empty-state {
  text-align: center;
  padding: 64px 32px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.empty-icon i {
  font-size: 36px;
  color: #9CA3AF;
}

.tickets-empty-state h5 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 12px 0;
}

.tickets-empty-state p {
  font-size: 16px;
  color: #6B7280;
  margin: 0 0 32px 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Modal Footer */
.tickets-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #F8FAFC;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.footer-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FF006F 0%, #E91E63 100%);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 0, 111, 0.3);
  color: white;
  text-decoration: none;
}

/* Dark Mode Support */
body.dark-mode .tickets-modal-content {
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .tickets-modal-header {
  background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .tickets-header-text h4 {
  color: #F9FAFB;
}

body.dark-mode .tickets-modal-subtitle {
  color: #9CA3AF;
}

body.dark-mode .ticket-card {
  background: #1F2937;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ticket-type {
  color: #F9FAFB;
}

body.dark-mode .price-amount {
  color: #F9FAFB;
}

body.dark-mode .ticket-right {
  background: #111827;
  border-left-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .qr-code {
  background: #374151;
}

body.dark-mode .tickets-modal-footer {
  background: #1F2937;
  border-top-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .stat-number {
  color: #F9FAFB;
}

/* QR Code Modal */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(10px);
}

.qr-modal.show {
  display: flex;
}

.qr-modal-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  max-width: 300px;
  position: relative;
  animation: qrModalScale 0.3s ease;
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.qr-modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

.qr-large {
  width: 200px;
  height: 200px;
  background: #f8f9fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid #e9ecef;
}

.qr-large i {
  font-size: 64px;
  color: #9CA3AF;
}

@keyframes qrModalScale {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Enhanced Mobile Design */
@media (max-width: 768px) {
  .tickets-modal-dialog {
    margin: 0.5rem;
    max-height: calc(100vh - 100px);
  }
  
  .tickets-header-content {
    gap: 12px;
  }
  
  .tickets-modal-header {
    padding: 16px;
  }
  
  .ticket-details {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .footer-stats {
    gap: 16px;
  }
  
  .footer-cta {
    padding: 12px 20px;
    font-size: 15px;
  }
  
  .qr-modal-content {
    margin: 1rem;
    padding: 24px;
  }
  
  .qr-large {
    width: 190px;
    height: 160px;
  }
  
  .qr-large i {
    font-size: 48px;
  }
}

@media (max-width: 480px) {
  .tickets-modal-dialog {
    margin: 0.25rem;
    max-height: calc(100vh - 90px);
  }
  
  .tickets-modal-header {
    padding: 12px;
  }
  
  .tickets-modal-body {
    padding: 12px;
  }
  
  .ticket-left {
    padding: 16px;
  }
  
  .qr-section {
    padding: 12px 16px;
  }
  
  .tickets-modal-footer {
    padding: 12px 16px;
  }
  
  .tickets-header-text h4 {
    font-size: 20px;
  }
  
  .ticket-type {
    font-size: 16px;
  }
  
  .price-amount {
    font-size: 20px;
  }
  
  .price-currency {
    font-size: 12px;
  }
}
