﻿/* ==========================================================================
   BILETBAS - Standart Bilet Boyutunda Şablon Stilleri (ticket.css)
   Kupon / Kart Formatı, Çift QR ve Yazdırma / PDF Çıktısı
   ========================================================================== */

/* Standart Bilet Kartı (Compact Pocket Pass Formatı: ~200mm x 85mm) */
.ticket-standard-pass {
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid #cbd5e1;
  display: flex;
  position: relative;
  font-family: var(--font-family);
  min-height: 220px;
  max-width: 820px;
  margin: 0 auto;
}

/* 1. Sol Şerit (Stub) */
.pass-stub {
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  width: 90px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  border-right: 2px dashed rgba(255, 255, 255, 0.3);
  position: relative;
}

.stub-brand {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #a5b4fc;
}

.stub-pass-type {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 4px;
  border-radius: 6px;
}

.stub-code {
  font-size: 10px;
  font-family: monospace;
  color: #cbd5e1;
}

.stub-price {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
}

/* 2. Orta Ana Gövde */
.pass-main {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 2px dashed #cbd5e1;
}

.pass-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.pass-org-name {
  font-size: 11px;
  font-weight: 600;
  color: #4338ca;
  display: block;
}

.pass-event-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.pass-badge-id {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
  color: #1e1b4b;
  white-space: nowrap;
}

.pass-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 8px;
}

.meta-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.meta-data {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.pass-address-text {
  font-size: 11px;
  color: #334155;
  margin-bottom: 8px;
  line-height: 1.3;
}

.pass-participant-box {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.part-item .part-val {
  font-size: 12px;
  color: #1e1b4b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.pass-footer-note {
  font-size: 9px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

/* 3. Sağ Çift QR Kod Şeridi */
.pass-qr-strip {
  width: 220px;
  background: #f8fafc;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pass-qr-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.qr-label {
  font-size: 10px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.qr-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.qr-img-wrapper img,
.qr-img-wrapper canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.qr-sub {
  font-size: 8px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

/* Yazdırma Modu (@media print) */
@media print {
  body * {
    visibility: hidden;
  }

  .modal-backdrop.active,
  .modal-card,
  .modal-body,
  #ticketPrintArea,
  #ticketPrintArea * {
    visibility: visible;
  }

  .modal-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    padding: 0;
    display: block;
  }

  .modal-card {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  .modal-header,
  .modal-footer {
    display: none !important;
  }

  .ticket-standard-pass {
    box-shadow: none;
    border: 2px solid #000;
    page-break-inside: avoid;
    margin: 20px auto;
    width: 100%;
    max-width: 780px;
  }
}

/* Mobil Uyum */
@media (max-width: 720px) {
  .ticket-standard-pass {
    flex-direction: column;
  }

  .pass-stub {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
    padding: 10px 14px;
  }

  .stub-pass-type {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .pass-main {
    border-right: none;
    border-bottom: 2px dashed #cbd5e1;
  }

  .pass-qr-strip {
    width: 100%;
    flex-direction: row;
  }
}
