/* ULOV KLIENTY — VOP (obrazovka + tisk A4) */

@page {
  size: A4;
  margin: 20mm 18mm 22mm 18mm;
}

* { box-sizing: border-box; }

html { font-size: 11pt; }

body {
  font-family: "Segoe UI", "Source Sans 3", Calibri, Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.55;
  max-width: 210mm;
  margin: 0 auto;
  padding: 12mm 16px 24mm;
  background: #f0f2f5;
}

.doc-sheet {
  background: #fff;
  padding: 14mm 16mm 18mm;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.doc-header {
  border-bottom: 2px solid #1e3a5f;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.doc-brand {
  font-size: 9pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5c6b7a;
  margin: 0 0 6px;
}

.doc-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20pt;
  font-weight: 700;
  color: #1e3a5f;
  margin: 0 0 6px;
  line-height: 1.25;
}

.doc-subtitle {
  font-size: 10.5pt;
  color: #444;
  margin: 0;
}

.doc-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 16px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f4f7fa;
  border-radius: 4px;
  font-size: 9.5pt;
}

.doc-meta div { margin: 0; }
.doc-meta dt {
  font-weight: 600;
  color: #5c6b7a;
  margin: 0;
}
.doc-meta dd { margin: 2px 0 0; }

.toc {
  margin: 0 0 28px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.toc h2 {
  font-size: 11pt;
  margin: 0 0 10px;
  color: #1e3a5f;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2;
  column-gap: 1.5rem;
}

.toc li {
  margin: 0.25rem 0;
  break-inside: avoid;
  font-size: 9.5pt;
}

.toc a {
  color: #1e3a5f;
  text-decoration: none;
}

.toc a:hover { text-decoration: underline; }

.article {
  margin-bottom: 1.75rem;
}

.article h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13pt;
  color: #1e3a5f;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #c5d8eb;
}

.article h3 {
  font-size: 10.5pt;
  margin: 14px 0 6px;
  color: #243447;
}

.article p,
.article li {
  font-size: 10pt;
  margin: 0 0 8px;
}

.article ul,
.article ol {
  margin: 0 0 10px;
  padding-left: 1.25rem;
}

.article li { margin-bottom: 4px; }

.placeholder {
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px dashed #d4a017;
  border-radius: 4px;
  font-size: 9.5pt;
  color: #5c4a12;
  margin: 8px 0 0;
}

.placeholder strong { color: #3d320c; }

.party-box {
  padding: 12px 14px;
  background: #f4f7fa;
  border-left: 3px solid #1e3a5f;
  margin: 10px 0 14px;
  font-size: 10pt;
}

.party-box p { margin: 0 0 6px; }
.party-box p:last-child { margin-bottom: 0; }

.footer-note {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
  font-size: 8.5pt;
  color: #777;
  text-align: center;
}

.print-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #1e3a5f;
  color: #fff;
  font-size: 0.9rem;
}

.print-bar a {
  color: #f0d78c;
  text-decoration: none;
  margin-right: 0.75rem;
}

.print-bar a:hover { text-decoration: underline; }

.print-bar button {
  font: inherit;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: linear-gradient(135deg, #f0d78c, #c9a227);
  color: #1a1520;
}

.print-bar button:hover { filter: brightness(1.05); }

.party-and {
  text-align: center;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
  color: #5c6b7a;
}

.party-fields p { margin: 0 0 8px; }
.party-label {
  margin-top: 10px !important;
  font-style: italic;
  color: #5c6b7a;
}

.blank-line {
  display: inline-block;
  min-width: 8rem;
  border-bottom: 1px solid #1a1a1a;
  vertical-align: baseline;
  height: 1em;
}

.blank-line--wide { min-width: 14rem; max-width: 100%; width: 70%; }
.blank-line--place { min-width: 10rem; }
.blank-line--date { min-width: 6rem; }

.sign-block {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
}

.sign-place {
  margin: 0 0 2rem;
  font-size: 10pt;
}

.sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.sign-role {
  font-weight: 600;
  margin: 0 0 2.5rem;
  font-size: 10pt;
}

.sign-line {
  border-bottom: 1px solid #1a1a1a;
  margin: 0 0 8px;
  min-height: 1.5rem;
}

.sign-name {
  margin: 0;
  font-size: 10pt;
}

.footer-note a {
  color: #1e3a5f;
}

/* —— Specifikace (tabulky / zaškrtávací pole) —— */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 10pt;
}

.spec-table th,
.spec-table td {
  border: 1px solid #c5d8eb;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.spec-table th {
  background: #f4f7fa;
  color: #1e3a5f;
  font-weight: 600;
  font-size: 9.5pt;
}

.spec-table td.fill {
  min-width: 55%;
  height: 1.6em;
}

.spec-table .col-check {
  width: 3.5rem;
  text-align: center;
}

.box {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border: 1.5px solid #1a1a1a;
  vertical-align: -0.1em;
  background: #fff;
}

.check-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 8px;
  font-size: 10pt;
}

.check-list .box { flex-shrink: 0; margin-top: 0.15em; }

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1.25rem;
}

.note-block {
  padding: 10px 12px;
  background: #f8fafc;
  border-left: 3px solid #1e3a5f;
  font-size: 9.5pt;
  color: #333;
  margin: 12px 0 0;
}

.notes-area {
  min-height: 6.5rem;
  border: 1px solid #c5d8eb;
  background:
    repeating-linear-gradient(
      transparent,
      transparent calc(1.55em - 1px),
      #e2e8f0 calc(1.55em - 1px),
      #e2e8f0 1.55em
    );
  background-origin: content-box;
  padding: 0.35em 10px 0;
}

.lead-note {
  margin: 0 0 22px;
  padding: 12px 14px;
  background: #f4f7fa;
  border-left: 3px solid #1e3a5f;
  font-size: 10pt;
  color: #243447;
}

.doc-meta a {
  color: #1e3a5f;
  text-decoration: none;
}

.doc-meta a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .toc ol { columns: 1; }
  .doc-meta { grid-template-columns: 1fr; }
  body { padding: 0 0 2rem; }
  .doc-sheet { padding: 1.25rem 1rem 2rem; box-shadow: none; }
  .sign-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .blank-line--wide { width: 55%; min-width: 8rem; }
  .spec-table { font-size: 9.5pt; }
}

@media print {
  body {
    background: #fff;
    padding: 0;
    max-width: none;
  }

  .doc-sheet {
    box-shadow: none;
    padding: 0;
  }

  .no-print {
    display: none !important;
  }

  .article {
    break-inside: avoid;
  }

  .sign-block {
    break-inside: avoid;
  }

  .placeholder {
    border-style: solid;
  }

  .spec-table th {
    background: #f4f7fa !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
