/* offer-print.css
   Styl dokumentu oferty. Wydzielony z index.html, zeby ten sam arkusz
   obslugiwal podglad w przegladarce i render po stronie serwera
   (pdf-renderer.js). Nie mieszac tu stylow formularza.

   Wszystkie cztery strony sa w ukladzie v9 (klasy z przedrostkiem .v9-).
   Przedrostek nie jest ozdoba: dokument #fr-pdf-doc siedzi w DOM-ie
   index.html, wiec nazwy w rodzaju .total czy .trust zderzylyby sie
   ze stylami zakladek. */

@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}
@font-face {
  font-family: 'Alan Sans';
  src: url('AlanSans-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}
:root{
  --navy:#0d1b3e;
  --orange:#f7a800;
  --bg:#ffffff;
  --border-light:#e2e2e2;

  /* Kolory wzorca v9 roznia sie o wlos od firmowych (#142347 / #f5a400).
     Decyzja, ktore sa wiazace, nalezy do PO - do tego czasu oferta idzie
     na kolorach aplikacji. Zmiana to podmiana dwoch wartosci wyzej. */
  --v9-ink:#24324a;
  --v9-muted:#5c697d;
  --v9-line:#dce3ea;
  --v9-pale:rgba(247,168,0,.08);
  --v9-sel-line:rgba(247,168,0,.28);
}

/* ================== DOKUMENT PDF ==================
   Osobny uklad tylko do pliku PDF. Na ekranie zostaje wzorzec Angebot;
   tutaj oferta wyglada jak dokument handlowy, nie jak wypelniony formularz. */
#fr-pdf-doc{
  position:fixed; left:-12000px; top:0; width:794px;
  z-index:-1; pointer-events:none;
}
.fr-pdf-page{
  width:794px; min-height:1123px; box-sizing:border-box;
  background:#fff; color:var(--navy);
  padding:52px 56px 44px;
  display:flex; flex-direction:column;
  font-family:'Alan Sans','Segoe UI',system-ui,-apple-system,sans-serif;
}

/* ================== UKLAD v9 ==================
   Odwzorowanie reference/silber.html z paczki wdrozeniowej. Wymiary sa
   w milimetrach, bo kartka jest w milimetrach - dzieki temu marginesy
   zgadzaja sie z PDF-em bez przeliczania na piksele.
   Zakazane we wzorcu: opacity na kontenerze, pionowe kolorowe paski,
   cienie, gradienty, powiekszone sumy. */
.fr-pdf-page--v9{
  display:block; position:relative; overflow:hidden;
  padding:15mm 17mm 0;
  color:var(--v9-ink);
  font-size:11.2pt; line-height:1.45;
}
.fr-pdf-page--v9 *{ box-sizing:border-box; }
.fr-pdf-page--v9 p,
.fr-pdf-page--v9 h1,
.fr-pdf-page--v9 h2{ margin:0; }
.fr-pdf-page--v9 h1,
.fr-pdf-page--v9 h2{ color:var(--navy); font-weight:650; }
.fr-pdf-page--v9 a{ color:inherit; text-decoration:none; }

/* ---------- naglowek ---------- */
.v9-head{
  height:16mm; display:flex; justify-content:space-between; align-items:flex-start;
  border-bottom:1px solid var(--v9-line); padding-bottom:6mm;
}
.v9-logo{ width:43mm; height:auto; max-height:10mm; object-fit:contain; object-position:left center; }
.v9-head-contact{
  text-align:right; display:flex; flex-direction:column;
  font-size:9.2pt; line-height:1.5; color:var(--v9-muted);
}

.v9-main{ padding-top:7mm; }

/* ---------- naglowek oferty z adresatem ---------- */
.v9-heading{ display:flex; justify-content:space-between; align-items:center; gap:8mm; }
.v9-heading h1{ font-size:31pt; line-height:1.03; letter-spacing:-.025em; }
.v9-recipient{
  border-left:1px solid var(--v9-line); padding:1mm 0 1mm 5mm; min-width:48mm;
  display:flex; flex-direction:column; gap:1.5mm;
}
.v9-recipient span,
.v9-recipient small{ font-size:9pt; line-height:1.25; color:var(--v9-muted); }
.v9-recipient strong{ font-size:15.5pt; line-height:1.15; color:var(--navy); font-weight:650; }

.v9-claim{ font-size:15pt; line-height:1.2; font-weight:500; letter-spacing:-.01em; color:var(--navy); margin-top:4mm; }
.v9-subtitle{ font-size:10.3pt; color:var(--v9-muted); margin-top:1.2mm; margin-bottom:4mm; }

/* ---------- naglowki sekcji z firmowym podkresleniem ----------
   Podkreslenie to ten sam rysunek, ktory jest pod logo (underline-curve.png).
   Szerokosc bierze sie z dlugosci napisu: opakowanie jest inline-block,
   obrazek dostaje 100% jego szerokosci - tak samo dziala .section-title
   w zakladkach aplikacji. */
.v9-h2{
  display:inline-block; font-size:11.3pt; line-height:1.2;
  padding-bottom:3.4mm;
  background:url('underline-curve.png') no-repeat left bottom;
  background-size:100% 1.7mm;
}

/* ---------- tabele cenowe ---------- */
.v9-prices{ margin-top:3mm; }
.v9-prices table{
  width:100%; border-collapse:collapse; table-layout:fixed;
  font-size:10.1pt; line-height:1.25; font-variant-numeric:tabular-nums;
}
.v9-prices col.desc{ width:62%; }
.v9-prices col:nth-child(2){ width:15%; }
.v9-prices col:nth-child(3){ width:23%; }
/* 450 we wzorcu to font zmienny; przy krojach statycznych 450 zaokragla sie
   w gore do 500, wiec etykiety kolumn dostaja 400 i zostaja lekkie. */
.v9-prices th{
  font-size:7.8pt; color:var(--v9-muted); font-weight:400;
  text-align:right; vertical-align:bottom; padding-bottom:1.6mm;
}
.v9-prices th:first-child{ text-align:left; padding-right:2mm; vertical-align:bottom; }
.v9-prices th:last-child,
.v9-prices td:last-child{ padding-right:3mm; }
.v9-prices td{ padding:1.7mm 0; vertical-align:middle; border-bottom:.5px solid var(--v9-line); }
.v9-prices tr:last-child td{ border-bottom:0; }
.v9-prices td:first-child{ padding-right:3mm; }
.v9-prices td:nth-child(n+2){ text-align:right; font-weight:550; }
.v9-prices td:last-child{ color:var(--navy); }
.v9-prices td small{
  display:inline; font-size:7.8pt; font-weight:400; line-height:1.2;
  margin-left:1mm; color:var(--v9-muted);
}

/* wybrany produkt - podswietlenie kolorem z alfa, nigdy opacity */
.v9-selected table{ border-collapse:separate; border-spacing:0; }
.v9-selected td{
  font-size:11pt; font-weight:600; background:var(--v9-pale);
  padding-top:2.4mm; padding-bottom:2.4mm; border-top:1px solid var(--v9-sel-line);
}
.v9-selected tr:last-child td{ border-bottom:1px solid var(--v9-sel-line); }
.v9-selected td:first-child{
  padding-left:3mm; border-left:1px solid var(--v9-sel-line);
  border-radius:1.5mm 0 0 1.5mm;
}
.v9-selected td:last-child{ border-right:1px solid var(--v9-sel-line); border-radius:0 1.5mm 1.5mm 0; }

.v9-summary td{ padding-top:1.4mm; padding-bottom:1.4mm; }
.v9-summary .v9-subtotal td{ font-weight:650; }
.v9-summary-product{ display:block; font-size:9pt; font-weight:400; color:var(--v9-muted); margin-top:.6mm; }
.v9-minus td:nth-child(n+2){ white-space:nowrap; }

/* ---------- odliczenia ---------- */
.v9-deductions{ margin-top:2.5mm; }
.v9-deductions .v9-h2{ margin-bottom:1mm; }
.v9-ded-box{
  background:var(--v9-pale); border:1px solid var(--v9-sel-line);
  border-radius:1.5mm; padding:1.6mm 3mm;
}
.v9-ded-row{
  display:flex; gap:4mm; align-items:baseline; font-size:10.1pt; line-height:1.35;
  padding:.9mm 0;
}
.v9-ded-row + .v9-ded-row{ border-top:.5px solid var(--v9-sel-line); }
.v9-ded-row > b{ font-weight:600; color:var(--navy); }
.v9-ded-row > span{ font-size:9.5pt; color:var(--v9-muted); }
.v9-ded-row > span b{ font-weight:500; color:var(--v9-ink); }
.v9-ded-row > strong{ margin-left:auto; font-weight:600; white-space:nowrap; color:var(--navy); }

/* ---------- kwota koncowa ---------- */
.v9-total{
  display:flex; align-items:center; gap:5mm; background:var(--navy); color:#fff;
  margin-top:3mm; padding:3.2mm 4mm; border-radius:2mm;
}
.v9-total > div:first-child{ flex:1; }
.v9-total > div:first-child > span{ font-size:11.3pt; font-weight:600; line-height:1.2; display:block; }
.v9-total small{ display:block; font-size:8.8pt; color:#dfe5f0; margin-top:.6mm; }
.v9-total-daily,
.v9-total-monthly{ text-align:right; white-space:nowrap; }
.v9-total-daily strong,
.v9-total-monthly strong{ font-size:11.5pt; line-height:1.2; font-weight:550; color:#fff; }
.v9-total-daily small,
.v9-total-monthly small{ font-size:8pt; letter-spacing:.02em; margin-bottom:.8mm; margin-top:0; }

.v9-share-note{ font-size:8.5pt; color:var(--v9-muted); margin-top:2mm; line-height:1.4; }

/* ---------- opinie ----------
   Same logotypy i odeslanie do zrodla. Bez ocen liczbowych i bez cytatow,
   ktorych nie da sie zweryfikowac. */
.v9-trust{
  display:flex; align-items:center; border-top:1px solid var(--v9-line);
  padding:2.5mm 0 2mm; gap:4mm; margin-top:3mm;
}
.v9-trust-intro{ flex:1; display:flex; flex-direction:column; gap:1mm; }
.v9-trust-intro strong{ font-size:9.7pt; color:var(--navy); font-weight:650; }
.v9-trust-intro span{ font-size:8.5pt; color:var(--v9-muted); }
.v9-trust-brand{
  width:38mm; display:grid; grid-template-rows:10.5mm auto;
  align-items:center; justify-items:start; gap:1.6mm;
}
.v9-trust-brand img{ width:35mm; height:10.5mm; object-fit:contain; object-position:left center; }
.v9-trust-brand:last-child{ width:31mm; }
.v9-trust-brand:last-child img{ width:30mm; height:10.5mm; }
.v9-trust-brand span{ font-size:7.5pt; line-height:1.3; color:var(--navy); white-space:nowrap; }

/* ---------- zastrzezenia ---------- */
.v9-legal{ margin-top:3mm; font-size:8.5pt; line-height:1.38; color:#576378; }
.v9-legal p + p{ margin-top:1mm; }

/* ---------- stopka ---------- */
.v9-foot{
  position:absolute; left:17mm; right:17mm; bottom:10mm;
  border-top:1px solid var(--v9-line); padding-top:3mm;
  display:flex; justify-content:space-between; gap:5mm; align-items:flex-end;
  color:var(--v9-muted); font-size:7.3pt; line-height:1.45;
}
.v9-foot > div{ display:flex; flex-direction:column; }
.v9-folio-title{ font-size:7.7pt; margin-top:.8mm; }
.v9-folio{ font-size:10pt; font-weight:650; color:var(--navy); white-space:nowrap; }
.v9-folio i{ font-style:normal; font-weight:400; color:var(--v9-muted); }

/* ---------- warianty zageszczenia ----------
   Oferta z kompletem dodatkow, dwoma pacjentami i pelnymi odliczeniami jest
   o kilkanascie milimetrow wyzsza od wzorca. frFitPage1() mierzy gotowa
   strone i dokłada te klasy tylko wtedy, gdy tresc nie miesci sie na kartce
   - krotka oferta zostaje w proporcjach wzorca. */
.v9-tight .v9-heading h1{ font-size:27pt; }
.v9-tight .v9-claim{ font-size:13.5pt; margin-top:3mm; }
.v9-tight .v9-subtitle{ margin-bottom:3mm; }
.v9-tight .v9-main{ padding-top:5mm; }
.v9-tight .v9-prices{ margin-top:2.2mm; }
.v9-tight .v9-prices td{ padding-top:1.25mm; padding-bottom:1.25mm; }
.v9-tight .v9-selected td{ padding-top:1.9mm; padding-bottom:1.9mm; }
.v9-tight .v9-summary td{ padding-top:1.05mm; padding-bottom:1.05mm; }
.v9-tight .v9-deductions{ margin-top:2mm; }
.v9-tight .v9-ded-row{ padding:.6mm 0; }
.v9-tight .v9-total{ margin-top:2.2mm; padding:2.6mm 4mm; }
.v9-tight .v9-trust{ margin-top:2mm; padding:2mm 0 1.5mm; }
.v9-tight .v9-legal{ margin-top:2mm; }

.v9-tighter .v9-heading h1{ font-size:24pt; }
.v9-tighter .v9-recipient strong{ font-size:13.5pt; }
.v9-tighter .v9-claim{ font-size:12.5pt; margin-top:2.4mm; }
.v9-tighter .v9-subtitle{ font-size:9.6pt; margin-bottom:2.4mm; }
.v9-tighter .v9-main{ padding-top:4mm; }
.v9-tighter .v9-prices{ margin-top:1.8mm; }
.v9-tighter .v9-prices table{ font-size:9.5pt; }
.v9-tighter .v9-prices td{ padding-top:.95mm; padding-bottom:.95mm; }
.v9-tighter .v9-selected td{ font-size:10.3pt; padding-top:1.5mm; padding-bottom:1.5mm; }
.v9-tighter .v9-summary td{ padding-top:.8mm; padding-bottom:.8mm; }
.v9-tighter .v9-ded-row{ padding:.4mm 0; font-size:9.5pt; }
.v9-tighter .v9-total{ margin-top:1.8mm; padding:2.2mm 3.4mm; }
.v9-tighter .v9-trust{ margin-top:1.6mm; padding:1.6mm 0 1.2mm; }
.v9-tighter .v9-trust-brand{ grid-template-rows:8.5mm auto; }
.v9-tighter .v9-trust-brand img{ height:8.5mm; }
.v9-tighter .v9-legal{ margin-top:1.6mm; font-size:7.9pt; line-height:1.32; }
.v9-tighter .v9-h2{ padding-bottom:3mm; background-size:100% 1.5mm; }

/* Ostatni stopien - wylacznie dla ofert z kompletem dodatkow, dwoma
   pacjentami i pelnymi odliczeniami. Odliczenia ida wtedy w dwie kolumny,
   bo to jedyne miejsce, gdzie da sie odzyskac dwa wiersze bez zmniejszania
   typografii ponizej czytelnosci. */
.v9-tightest .v9-heading h1{ font-size:22pt; }
.v9-tightest .v9-recipient strong{ font-size:12.5pt; }
.v9-tightest .v9-claim{ font-size:11.5pt; margin-top:2mm; }
.v9-tightest .v9-subtitle{ font-size:9.2pt; margin-top:.8mm; margin-bottom:2mm; }
.v9-tightest .v9-main{ padding-top:3.4mm; }
.v9-tightest .v9-h2{ font-size:10.6pt; padding-bottom:2.7mm; background-size:100% 1.4mm; }
.v9-tightest .v9-prices{ margin-top:1.4mm; }
.v9-tightest .v9-prices table{ font-size:9.2pt; }
.v9-tightest .v9-prices th{ padding-bottom:1.1mm; }
.v9-tightest .v9-prices td{ padding-top:.75mm; padding-bottom:.75mm; }
.v9-tightest .v9-selected td{ font-size:10pt; padding-top:1.3mm; padding-bottom:1.3mm; }
.v9-tightest .v9-summary td{ padding-top:.6mm; padding-bottom:.6mm; }
.v9-tightest .v9-deductions{ margin-top:1.4mm; }
.v9-tightest .v9-ded-box{ display:grid; grid-template-columns:1fr 1fr; column-gap:5mm; padding:1.2mm 3mm; }
.v9-tightest .v9-ded-row{ padding:.35mm 0; font-size:9.2pt; }
.v9-tightest .v9-ded-row + .v9-ded-row{ border-top:0; }
.v9-tightest .v9-ded-row:nth-child(n+3){ border-top:.5px solid var(--v9-sel-line); }
.v9-tightest .v9-total{ margin-top:1.4mm; padding:2mm 3.4mm; }
.v9-tightest .v9-share-note{ margin-top:1.2mm; font-size:8pt; }
.v9-tightest .v9-trust{ margin-top:1.2mm; padding:1.2mm 0 1mm; }
.v9-tightest .v9-trust-brand{ grid-template-rows:7.5mm auto; }
.v9-tightest .v9-trust-brand img{ height:7.5mm; }
.v9-tightest .v9-legal{ margin-top:1.2mm; font-size:7.2pt; line-height:1.28; }


/* ================== STRONY 2-4 ==================
   Ta sama rama co strona 1: naglowek, stopka, typografia. Rozni sie tylko
   zawartosc kolumny tresci. */
.v9-doc .v9-main{ padding-top:8mm; }
.v9-page-title{ font-size:31pt; line-height:1.08; letter-spacing:-.025em; }
.v9-page-title span{ display:block; font-size:23pt; line-height:1.15; margin-top:1mm; font-weight:600; }
/* Odstep nad wprowadzeniem musi byc mocniejszy niz zerowanie marginesow
   w ramie strony (.fr-pdf-page--v9 p), dlatego regula jest zagniezdzona. */
.v9-doc .v9-intro{ font-size:11pt; line-height:1.45; color:var(--v9-muted); margin-top:4mm; }
.v9-doc .v9-intro strong{ color:var(--navy); font-weight:600; }
.v9-claim-line{ color:var(--navy); font-size:15.5pt; font-weight:500; letter-spacing:-.01em; }

/* ---------- strona 2: pakiety jezykowe ----------
   Wybrany pakiet dostaje to samo podswietlenie co wybrana usluga na stronie 1:
   kolor z alfa i cienki obrys, nigdy opacity. */
.v9-languages{ margin-top:7mm; }
.v9-language{
  display:grid; grid-template-columns:39mm 1fr; gap:6mm;
  padding:5mm; border-top:1px solid var(--v9-line);
}
.v9-language:last-child{ border-bottom:1px solid var(--v9-line); }
.v9-language--sel{
  background:var(--v9-pale); border:1px solid var(--v9-sel-line);
  border-radius:1.5mm; margin:1mm 0;
}
.v9-language--sel + .v9-language{ border-top:0; }
.v9-language--sel h2{ font-weight:700; }
.v9-lang-label > span:first-child{ font-size:9.2pt; color:var(--v9-muted); display:block; }
.v9-language h2{ font-size:22pt; line-height:1.15; margin:1mm 0 2mm; }
.v9-words{ font-size:9.5pt; color:var(--v9-muted); display:block; }
.v9-language p{ font-size:11pt; line-height:1.45; }
.v9-sel-label{
  display:inline-block; margin-top:3mm; color:var(--navy);
  font-size:8.5pt; font-weight:700; white-space:nowrap;
}
.v9-quiet{ margin-top:6mm; }
.v9-quiet p{ font-size:10pt; color:var(--v9-muted); line-height:1.5; }
.v9-quiet strong{ color:var(--navy); font-weight:600; }

/* ---------- strona 3: zakres uslugi ---------- */
.v9-services{ margin-top:7mm; }
.v9-service{ border-top:1px solid var(--v9-line); padding:3.8mm 0; }
.v9-service h2{ font-size:13.4pt; line-height:1.25; margin-bottom:2.4mm; }
.v9-service ul{ padding:0; margin:0; list-style:none; }
.v9-service li{ position:relative; padding-left:4.2mm; font-size:10.8pt; line-height:1.4; margin-top:1.3mm; }
.v9-service li::before{
  content:''; position:absolute; left:0; top:1.7mm;
  width:1.3mm; height:1.3mm; border-radius:50%; background:var(--orange);
}
.v9-scope{
  display:grid; grid-template-columns:44mm 1fr; gap:5mm;
  border-top:1px solid var(--v9-line); padding:5mm 0 0; margin-top:2mm;
}
.v9-scope strong{
  font-size:15pt; line-height:1.2; letter-spacing:-.015em;
  color:var(--navy); font-weight:600;
}
.v9-scope p{ font-size:10.5pt; line-height:1.45; }

/* ---------- strona 4: dodatki, kontakt ---------- */
.v9-options{ margin-top:5mm; }
.v9-option{ padding:2.7mm 0; border-top:1px solid var(--v9-line); }
.v9-option-top{ display:flex; align-items:center; justify-content:space-between; gap:3mm; margin-bottom:2mm; }
.v9-option h2{ font-size:13pt; line-height:1.2; display:flex; align-items:center; gap:2mm; }
/* Kropka stoi tylko przy dodatkach wliczonych w te oferte. */
.v9-option--sel h2::before{
  content:''; width:1.5mm; height:1.5mm; flex:none;
  border-radius:50%; background:var(--orange);
}
.v9-option p{ font-size:10.8pt; line-height:1.44; }
.v9-option p + p{ margin-top:2mm; }
.v9-option-label{
  font-size:7.8pt; line-height:1.2; font-weight:500;
  white-space:nowrap; color:var(--v9-muted);
}
.v9-contact{
  background:var(--navy); border-radius:2mm; padding:5mm;
  display:flex; justify-content:space-between; align-items:center;
  color:#fff; margin-top:5mm; gap:5mm;
}
.v9-contact h2{ font-size:20pt; line-height:1.1; color:#fff; letter-spacing:-.02em; }
.v9-contact p{ font-size:10.2pt; line-height:1.35; color:#e1e7f1; margin-top:2.3mm; }
.v9-contact > div:last-child{
  display:flex; flex-direction:column; gap:1mm;
  font-size:10pt; line-height:1.25; white-space:nowrap;
}
.v9-contact > div:last-child > span{ font-size:8.5pt; color:#cdd7e6; }
.v9-contact-phone{ font-size:13.5pt; line-height:1.15; font-weight:600; }
/* Name des persoenlichen Ansprechpartners, wenn er die Daten der Zentrale
   in diesem Angebot ersetzt. */
.v9-contact-name{ font-size:11pt; line-height:1.2; font-weight:700; color:#fff; }
.v9-contact > div:last-child a:last-child{ color:#e1e7f1; font-size:9.3pt; }

/* ---- tryb serwerowy: kartka A4 bez marginesow przegladarki ----
   Na ekranie #fr-pdf-doc stoi poza widokiem; w rendererze jest jedyna
   trescia strony, wiec wraca do normalnego przeplywu. */
@page { size: A4; margin: 0; }
html.pdf-render, html.pdf-render body {
  margin:0; padding:0; background:#fff;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
html.pdf-render #fr-pdf-doc{
  position:static; left:auto; top:auto; width:auto; z-index:auto;
}
html.pdf-render .fr-pdf-page{
  width:794px; height:1123px; min-height:1123px; overflow:hidden;
  break-after:page; page-break-after:always;
}
html.pdf-render .fr-pdf-page:last-child{
  break-after:auto; page-break-after:auto;
}
