/* ==========================================================================
   TERMAL VE A4 YAZICI ÇIKTI STİLLERİ (58mm / 80mm / A4)
   ========================================================================== */

/* Ekran içi önizleme stilleri */
.receipt-wrapper {
  font-family: 'Courier New', Courier, monospace, sans-serif;
  color: #000;
  line-height: 1.35;
  background: #fff;
}

.receipt-header {
  text-align: center;
  margin-bottom: 8px;
}

.receipt-logo {
  max-height: 48px;
  max-width: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px auto;
}

.receipt-title {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.receipt-sub {
  font-size: 10px;
  color: #333;
  margin-bottom: 2px;
}

.receipt-divider {
  border-top: 1px dashed #000;
  margin: 6px 0;
}

.receipt-double-divider {
  border-top: 2px solid #000;
  margin: 8px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 3px;
}

.receipt-row.bold {
  font-weight: 900;
}

.receipt-label {
  font-weight: 700;
}

.receipt-val {
  text-align: right;
}

.receipt-section-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 4px 0 2px 0;
  text-align: center;
  background: #eee;
  padding: 2px;
}

.receipt-text-block {
  font-size: 10.5px;
  margin-bottom: 4px;
  word-break: break-word;
}

.receipt-barcode-box {
  text-align: center;
  margin: 8px 0;
}

.receipt-barcode-box svg,
.receipt-barcode-box img {
  margin: 0 auto;
  display: block;
}

.receipt-barcode-num {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-top: 2px;
}

.receipt-qr-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0;
}

.receipt-footer-terms {
  font-size: 8.5px;
  text-align: justify;
  margin-top: 6px;
  line-height: 1.2;
}

.receipt-sign-box {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 10px;
  text-align: center;
}

.receipt-sign-col {
  width: 45%;
  border-top: 1px solid #000;
  padding-top: 4px;
}

/* ==========================================================================
   A4 SERVİS FORMU STİLLERİ
   ========================================================================== */

.a4-form-wrapper {
  font-family: system-ui, -apple-system, sans-serif;
  color: #1e293b;
  line-height: 1.4;
  background: #fff;
}

.a4-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #2563eb;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.a4-company-name {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.a4-company-details {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

.a4-doc-info {
  text-align: right;
}

.a4-doc-title {
  font-size: 18px;
  font-weight: 800;
  color: #2563eb;
  text-transform: uppercase;
}

.a4-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.a4-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
}

.a4-box-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.a4-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.a4-table th {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 8px;
  font-size: 11px;
  text-align: left;
}

.a4-table td {
  border: 1px solid #cbd5e1;
  padding: 8px;
  font-size: 11px;
}

.a4-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
}

.a4-sign-line {
  width: 200px;
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   PRINT MEDIA QUERY (YAZDIRMA ANINDA ÇALIŞAN KISIM)
   ========================================================================== */

@media print {
  body * {
    visibility: hidden;
  }

  /* Modalları ve arka planları yazdırmadan gizle */
  .modal-overlay,
  .sidebar,
  .top-header,
  #app-container {
    display: none !important;
  }

  #print-render-area,
  #print-render-area * {
    visibility: visible !important;
  }

  #print-render-area {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    z-index: 999999 !important;
  }

  /* 58mm Termal Yazıcı Sayfa Boyutu */
  body.print-thermal-58 {
    width: 58mm;
    margin: 0;
    padding: 0;
  }
  body.print-thermal-58 @page {
    size: 58mm auto;
    margin: 2mm;
  }
  body.print-thermal-58 .receipt-wrapper {
    width: 52mm;
    margin: 0 auto;
    font-size: 10px;
  }

  /* 80mm Termal Yazıcı Sayfa Boyutu */
  body.print-thermal-80 {
    width: 80mm;
    margin: 0;
    padding: 0;
  }
  body.print-thermal-80 @page {
    size: 80mm auto;
    margin: 3mm;
  }
  body.print-thermal-80 .receipt-wrapper {
    width: 74mm;
    margin: 0 auto;
    font-size: 12px;
  }

  /* A4 Standart Form */
  body.print-a4 @page {
    size: A4 portrait;
    margin: 15mm;
  }
  body.print-a4 .a4-form-wrapper {
    width: 100%;
    font-size: 12px;
  }
}
