/* ============================================================
   EduTrip - Print Invoice
   ============================================================ */

.pdf-header { display: none; }
.print-invoice { display: none; }

@media print {
  @page { size: A4; margin: 9mm; }
  body { background: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; margin:0 !important; padding:0 !important; }
  body > * { display:none !important; }
  body > #print-invoice { display:block !important; }
  body * { visibility: hidden !important; }
  #print-invoice, #print-invoice * { visibility: visible !important; }
  #print-invoice { display: block !important; position: static !important; inset: auto !important; width: 100%; margin:0 !important; padding:0 !important; color: #172b4d; font-family: 'Cairo', Arial, sans-serif; }
  .invoice-sheet { --invoice-primary:#10284d; --invoice-secondary:#2866ba; --invoice-accent:#dfab31; --invoice-radius:14px; position:relative; z-index:1; box-sizing:border-box; min-height:278.5mm; width:100%; display:flex; flex-direction:column; border: 1px solid #dce5f0; border-radius: var(--invoice-radius); overflow: hidden; background: #fff; }
  .invoice-head { display: flex; justify-content: space-between; align-items: stretch; background: linear-gradient(120deg,var(--invoice-primary),var(--invoice-secondary)); color: white; padding: 22px 26px; }
  .invoice-brand { font-size: 27px; font-weight: 900; line-height: 1.1; }
  .invoice-brand small { display: block; font-size: 11px; font-weight: 500; opacity: .82; margin-top: 7px; }
  .invoice-agency-brand { display:flex; align-items:center; gap:15px; flex:1; min-width:0; }
  .invoice-logo-frame { width:148px; height:92px; overflow:hidden; display:flex; align-items:center; justify-content:center; flex:0 0 148px; }
  .invoice-logo-frame img { width:100%; height:100%; object-fit:contain; transform:scale(2.8); }
  .invoice-agency-brand .agency-copy { min-width:0; }
  .invoice-agency-brand .agency-copy strong { display:block; font-size:16px; line-height:1.45; font-weight:900; }
  .invoice-agency-brand .agency-copy .agency-en { direction:ltr; text-align:right; font-family:Arial,sans-serif; font-size:10px; font-weight:700; opacity:.92; margin-top:2px; }
  .invoice-agency-brand .agency-copy .agency-licenses { font-size:8.5px; line-height:1.65; opacity:.78; margin-top:4px; }
  .invoice-kind { text-align: left; border-right: 1px solid rgba(255,255,255,.32); padding-right: 18px; font-size: 12px; line-height: 1.9; }
  .invoice-kind strong { display:block; font-size:18px; color:var(--invoice-accent); }
  .invoice-body { padding: 22px 26px 0; display:flex; flex:1; flex-direction:column; }
  .invoice-info { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:20px; }
  .invoice-info-box { border:1px solid #dce5f0; border-radius:10px; padding:13px 15px; background:#fbfdff; }
  .invoice-program-box { position:relative; min-height:124px; padding-left:132px; }
  .invoice-program-logo { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:100px; height:100px; border:1px solid #dce5f0; border-radius:10px; background:#fff; padding:10px; display:flex; align-items:center; justify-content:center; }
  .invoice-program-logo img { display:block; width:100%; height:100%; object-fit:contain; }
  .invoice-info-box h3 { font-size:12px; color:var(--invoice-secondary); margin:0 0 7px; }
  .invoice-info-box p { font-size:11px; margin:3px 0; line-height:1.7; }
  .invoice-table { width:100%; border-collapse:separate; border-spacing:0; border:1px solid #d9e4f0; border-radius:11px; overflow:hidden; font-size:11px; }
  .invoice-table th { background:linear-gradient(100deg,var(--invoice-primary),var(--invoice-secondary)); color:#fff; padding:11px 13px; text-align:right; font-size:11px; font-weight:900; letter-spacing:.1px; }
  .invoice-table th:last-child { text-align:center; border-right:1px solid rgba(255,255,255,.25); }
  .invoice-table td { padding:10px 13px; vertical-align:middle; border-top:1px solid #e4ebf4; }
  .invoice-table .invoice-item:nth-of-type(even) td { background:#f8fbff; }
  .invoice-table .invoice-description { color:#1b355b; font-weight:650; line-height:1.7; }
  .invoice-table .invoice-price { color:#123967; font-family:Arial,sans-serif; font-size:11.5px; font-weight:800; white-space:nowrap; text-align:center !important; border-right:1px solid #e4ebf4; }
  .invoice-table .invoice-section td { background:#eaf2fc; color:var(--invoice-secondary); font-size:11.5px; font-weight:900; padding:8px 13px; border-top:1px solid #c9dbef; }
  .invoice-table .section-dot { display:inline-block; width:7px; height:7px; margin-left:7px; border-radius:50%; background:var(--invoice-accent); vertical-align:middle; }
  .invoice-table .invoice-negative td { color:#b42318; font-weight:800; background:#fff5f4 !important; }
  .invoice-table .invoice-negative .invoice-price { color:#b42318; }
  .invoice-table .invoice-total td { background:var(--invoice-primary); color:#fff; border-top:0; padding:12px 13px; font-size:13px; font-weight:900; }
  .invoice-table .invoice-total .invoice-price { color:#fff; border-right-color:rgba(255,255,255,.18); font-size:14px; }
  .invoice-table .invoice-sar td { background:#fff5d5; color:#745000; border-top:0; padding:10px 13px; font-size:12px; font-weight:900; }
  .invoice-table .invoice-sar .invoice-price { color:#745000; border-right-color:#ead18b; font-size:13px; }

  #print-invoice.invoice-table-tight-1 .invoice-table { font-size:10px; }
  #print-invoice.invoice-table-tight-1 .invoice-table th { padding:8px 10px; font-size:10px; }
  #print-invoice.invoice-table-tight-1 .invoice-table td { padding:7px 10px; }
  #print-invoice.invoice-table-tight-1 .invoice-table .invoice-description { line-height:1.5; }
  #print-invoice.invoice-table-tight-1 .invoice-table .invoice-section td { padding:5px 10px; font-size:10px; }
  #print-invoice.invoice-table-tight-1 .invoice-table .invoice-total td { padding:9px 10px; font-size:12px; }
  #print-invoice.invoice-table-tight-1 .invoice-table .invoice-sar td { padding:8px 10px; font-size:11px; }
  #print-invoice.invoice-table-tight-2 .invoice-table { font-size:9px; }
  #print-invoice.invoice-table-tight-2 .invoice-table th { padding:6px 8px; font-size:9px; }
  #print-invoice.invoice-table-tight-2 .invoice-table td { padding:5px 8px; }
  #print-invoice.invoice-table-tight-2 .invoice-table .invoice-description { line-height:1.35; }
  #print-invoice.invoice-table-tight-2 .invoice-table .invoice-price { font-size:9.5px; }
  #print-invoice.invoice-table-tight-2 .invoice-table .invoice-section td { padding:4px 8px; font-size:9.5px; }
  #print-invoice.invoice-table-tight-2 .invoice-table .invoice-total td { padding:7px 8px; font-size:11px; }
  #print-invoice.invoice-table-tight-2 .invoice-table .invoice-sar td { padding:6px 8px; font-size:10px; }
  #print-invoice.invoice-table-tight-3 .invoice-table { font-size:8px; }
  #print-invoice.invoice-table-tight-3 .invoice-table th { padding:4px 6px; font-size:8.5px; }
  #print-invoice.invoice-table-tight-3 .invoice-table td { padding:3px 6px; }
  #print-invoice.invoice-table-tight-3 .invoice-table .invoice-description { line-height:1.2; }
  #print-invoice.invoice-table-tight-3 .invoice-table .invoice-price { font-size:8.5px; }
  #print-invoice.invoice-table-tight-3 .invoice-table .invoice-section td { padding:3px 6px; font-size:8.5px; }
  #print-invoice.invoice-table-tight-3 .invoice-table .invoice-total td { padding:5px 6px; font-size:10px; }
  #print-invoice.invoice-table-tight-3 .invoice-table .invoice-sar td { padding:4px 6px; font-size:9px; }
  .invoice-notes { margin-top:18px; padding:14px 17px; border:1px solid #dce5f0; border-right:4px solid var(--invoice-accent); border-radius:10px; background:#fbfdff; }
  .invoice-notes h3 { margin:0 0 8px; color:var(--invoice-primary); font-size:12px; font-weight:900; }
  .invoice-notes ul { margin:0; padding:0 18px 0 0; color:#344d70; font-size:10.5px; line-height:2; }
  .invoice-notes li::marker { color:var(--invoice-accent); }
  .invoice-notes .invoice-note-warning { color:#b42318; font-weight:700; }
  .invoice-notes .invoice-note-strong { color:#10284d; font-weight:900; }
  .invoice-foot { position:relative; isolation:isolate; overflow:hidden; flex:0 0 auto; min-height:25mm; margin-top:auto; padding:0; display:block; color:#fff; font-size:8.7px; line-height:1.75; background:linear-gradient(180deg,#fff 0%,#f8fbff 100%); border-top:1px solid #d8e2ee; border-radius:0 0 10px 10px; }
  .invoice-foot::before { content:''; position:absolute; inset:5mm 0 0 auto; z-index:0; width:61%; background:linear-gradient(112deg,var(--invoice-primary) 0%,var(--invoice-primary) 67%,var(--invoice-secondary) 100%); clip-path:polygon(8% 0,100% 0,100% 100%,0 100%); }
  .invoice-foot::after { content:''; position:absolute; left:0; bottom:0; z-index:0; width:45%; height:10mm; background:linear-gradient(112deg,var(--invoice-primary) 0 31%,var(--invoice-accent) 31% 55%,var(--invoice-accent) 55% 72%,transparent 72%); clip-path:polygon(0 0,100% 0,87% 100%,0 100%); }
  .invoice-foot > div:first-child { position:absolute; right:10%; top:7.5mm; z-index:1; width:46%; font-weight:600; color:rgba(255,255,255,.92); }
  .invoice-foot > div:last-child { position:absolute; right:10%; top:14.5mm; z-index:1; padding-top:2.5mm; width:46%; border-top:1px solid rgba(223,171,49,.78); font-weight:900; color:#fff0bd; }
  .invoice-info-box, .invoice-table tr, .invoice-notes, .invoice-foot { break-inside:avoid; page-break-inside:avoid; }
  #print-invoice.invoice-tight .invoice-head { padding:17px 21px; }
  #print-invoice.invoice-tight .invoice-body { padding:16px 20px 0; }
  #print-invoice.invoice-tight .invoice-info { gap:10px; margin-bottom:12px; }
  #print-invoice.invoice-tight .invoice-info-box { padding:9px 11px; }
  #print-invoice.invoice-tight .invoice-program-box { min-height:100px; padding-left:108px; }
  #print-invoice.invoice-tight .invoice-program-logo { left:10px; width:82px; height:82px; padding:8px; }
  #print-invoice.invoice-tight .invoice-info-box p { margin:2px 0; line-height:1.45; }
  #print-invoice.invoice-tight .invoice-table th { padding:7px 10px; }
  #print-invoice.invoice-tight .invoice-table td { padding:6px 10px; }
  #print-invoice.invoice-tight .invoice-table .invoice-section td { padding:5px 10px; }
  #print-invoice.invoice-tight .invoice-table .invoice-total td { padding:8px 10px; }
  #print-invoice.invoice-tight .invoice-table .invoice-sar td { padding:7px 10px; }
  #print-invoice.invoice-tight .invoice-notes { margin-top:11px; padding:9px 12px; }
  #print-invoice.invoice-tight .invoice-notes h3 { margin-bottom:4px; }
  #print-invoice.invoice-tight .invoice-notes ul { line-height:1.6; }
  #print-invoice.invoice-tight .invoice-foot { min-height:21mm; margin-top:auto; }
  #print-invoice.invoice-tight .invoice-foot::before { inset:4mm 0 0 auto; }
  #print-invoice.invoice-tight .invoice-foot > div:first-child { top:5.5mm; }
  #print-invoice.invoice-tight .invoice-foot > div:last-child { top:11.5mm; padding-top:1.5mm; }
}