/* Poukaz v1 — společný základ všech vzhledů (PDF i webový náhled).
   Rozměry v mm: plátno A5 na šířku 210 × 148 mm, bezpečný okraj obsahu 11 mm.
   Barvy odpovídají tokenům v css/tokens.css (PDF nemá přístup k proměnným webu). */

.voucher {
  position: relative;
  display: block;
  width: 210mm;
  height: 148mm;
  overflow: hidden;
  background: #FFFFFF;
  color: #102A43;
  font-family: "Inter", "DejaVu Sans", sans-serif;
  font-size: 10pt;
  line-height: 1.35;
  font-kerning: normal;
  text-align: left;
}
.voucher *, .voucher *::before, .voucher *::after { box-sizing: border-box; }
.voucher p, .voucher ul, .voucher li, .voucher figure, .voucher figcaption { margin: 0; padding: 0; }
.voucher ul { list-style: none; }

.v-decor { position: absolute; left: 0; top: 0; width: 210mm; height: 148mm; }
.v-main, .v-side, .v-card, .v-company { position: absolute; }

.v-logo { display: block; height: 13mm; width: auto; }

.v-eyebrow {
  font-size: 8.5pt;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0074B8;
}

.v-amount {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #102A43;
  white-space: nowrap;
  font-feature-settings: "tnum" 1;
}
.amount--xl { font-size: 40pt; }
.amount--l { font-size: 36pt; }
.amount--m { font-size: 30pt; }

.v-rule { display: block; width: 22mm; height: 0.8mm; background: #00A9FF; border-radius: 0.4mm; }

/* Personalizace — vynechané údaje se nevykreslí vůbec (žádné prázdné nadpisy). */
.v-personal { overflow-wrap: anywhere; word-break: normal; hyphens: manual; }
.v-personal__label {
  font-size: 7.5pt;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #52667A;
}
.v-personal__label--inline { margin-right: 1.5mm; }
.voucher .v-personal__name { font-weight: 600; line-height: 1.2; color: #102A43; margin-top: 0.6mm; }
.name--l { font-size: 16pt; }
.name--m { font-size: 14pt; }
.name--s { font-size: 12pt; }
.voucher .v-personal__dedication { color: #334E68; margin-top: 3mm; line-height: 1.4; }
.ded--l { font-size: 11pt; }
.ded--m { font-size: 10pt; }
.voucher .v-personal__from { margin-top: 3mm; font-size: 10.5pt; font-weight: 500; color: #102A43; line-height: 1.3; }

/* Praktická část */
.v-field__label {
  font-size: 7pt;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #52667A;
}
.voucher .v-code {
  margin-top: 0.8mm;
  font-size: 11pt;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  color: #102A43;
  font-feature-settings: "tnum" 1, "ss02" 1;
}
/* Skupiny kódu se nedělí; zalomit lze jen mezi nimi (ADR 0009: 5-5-5 nový, 5-5-5-5-6 starší). */
.voucher .v-code__g { display: inline-block; white-space: nowrap; }
.voucher .v-code--short { font-size: 11.5pt; letter-spacing: 0.03em; }  /* 56–58 mm sloupec Domov / Vánoční */
.voucher .v-code--long { font-size: 11pt; letter-spacing: 0.03em; }
.voucher .v-code--free { overflow-wrap: anywhere; }
.voucher .v-validity { margin-top: 0.8mm; font-size: 11pt; font-weight: 600; color: #102A43; }
.voucher .v-field--validity { margin-top: 3.2mm; }

.v-qr { display: block; width: 33mm; }
.v-qr__code { width: 33mm; height: 33mm; line-height: 0; }
.v-qr__code svg { display: block; width: 33mm; height: 33mm; }
.voucher .v-qr__caption { margin-top: 0.5mm; text-align: center; font-size: 7pt; font-weight: 500; color: #334E68; }

.v-terms { font-size: 7pt; line-height: 1.38; color: #334E68; overflow-wrap: anywhere; }
/* Adresy a e-maily v podmínkách se nezalamují uvnitř (opis z papíru, QA-F13). */
.voucher .v-nobr { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.voucher .v-terms li { position: relative; padding-left: 2.6mm; margin-top: 0.8mm; }
.v-terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2mm;
  width: 1mm;
  height: 1mm;
  border-radius: 0.5mm;
  background: #00A9FF;
}

.v-company { font-size: 6.5pt; color: #52667A; letter-spacing: 0.01em; white-space: nowrap; }

/* Neplatné označení: ukázka (náhled před platbou, galerie) a demo prostředí.
   Vodoznak leží pod textem (pořadí v DOM), takže nesnižuje čitelnost kódu ani QR;
   navíc se u kódu vypíše textové upozornění (.v-invalid). */
.v-mark {
  position: absolute;
  left: 0;
  top: 0;
  width: 210mm;
  height: 148mm;
  text-align: center;
}
.voucher .v-mark span {
  display: block;
  margin-top: 64mm;
  font-size: 40pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transform: rotate(-14deg);
}
.v-mark--specimen span { color: rgba(206, 32, 62, 0.20); }
.voucher .v-mark--demo span { color: rgba(196, 110, 0, 0.24); font-size: 30pt; margin-top: 74mm; }
.voucher.is-specimen .v-mark--demo span { margin-top: 92mm; }
.voucher .v-invalid {
  margin-top: 1mm;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #B4232F;
}
.voucher .v-invalid--demo { color: #8A5300; }

/* Úsporná varianta personalizace: použije se jen tehdy, když se běžná nevejde
   (rozhoduje měření layoutu v pdf_worker). Nejmenší písmo 9 pt — stále čitelné. */
.voucher--compact .v-amount.amount--xl { font-size: 34pt; }
.voucher--compact .v-amount.amount--l { font-size: 32pt; }
.voucher--compact .v-personal__name.name--l,
.voucher--compact .v-personal__name.name--m,
.voucher--compact .v-personal__name.name--s { font-size: 11.5pt; }
.voucher--compact .v-personal__dedication.ded--l,
.voucher--compact .v-personal__dedication.ded--m { font-size: 9pt; line-height: 1.35; }
.voucher.voucher--compact .v-personal__from { font-size: 9.5pt; }

/* Nejúspornější varianta — jen pro extrémní vstupy (např. dlouhá slova bez mezer). */
.voucher--tight .v-amount.amount--xl,
.voucher--tight .v-amount.amount--l,
.voucher--tight .v-amount.amount--m { font-size: 28pt; }
.voucher--tight .v-personal__name.name--l,
.voucher--tight .v-personal__name.name--m,
.voucher--tight .v-personal__name.name--s { font-size: 10.5pt; }
.voucher--tight .v-personal__dedication.ded--l,
.voucher--tight .v-personal__dedication.ded--m { font-size: 8.5pt; line-height: 1.3; }
.voucher.voucher--tight .v-personal__from { font-size: 9pt; }
.voucher.voucher--tight .v-personal__dedication,
.voucher.voucher--tight .v-personal__from { margin-top: 1.5mm; }

/* Webový náhled: skryté prvky (prázdná personalizace) se nezobrazí. */
.voucher [hidden] { display: none !important; }
