/* =====================================================================
   Dokumentacja Integratora KSeF — arkusz DOKUMENTÓW (docs/*.html).

   Dokumenty są samodzielnymi stronami do czytania i druku (także do PDF),
   wyświetlanymi w przeglądarce docs/index.php w ramce albo otwieranymi
   wprost — model jak w dokumentacji vSQL (vsql.pl/docs/). Nie mają paska
   ani nagłówka serwisu; ten daje przeglądarka.

   Reguły poniżej to 1:1 dotychczasowe style instrukcji (wcześniej
   wklejone osobno w każdy plik), żeby makiety okien programu
   (ilustracje/<dokument>/style.css) wyglądały dokładnie jak dotąd. Poniżej
   dołożone: warianty regulaminu (tylko w body.doc--regulamin — ogólne
   reguły tabel nie mogą dotknąć tabel w makietach), klasy komunikatów
   artykułów (callout, panel, kroki), pasek powrotu i druk.
   ===================================================================== */

body {
    font-family: "Segoe UI", Arial, sans-serif;
    max-width: 980px;
    margin: 0 auto;
    padding: 40px 24px 90px 24px;
    color: #1c2430;
    line-height: 1.6;
    background: #ffffff;
}
.brandbar {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    margin: 0 0 22px 0;
}
.brandbar img {
    height: 38px;
    width: auto;
    display: block;
}
.brandbar .name {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.17em;
    color: #13203A;
    line-height: 1;
}
header {
    border-bottom: 3px solid #13203A;
    padding-bottom: 16px;
    margin-bottom: 28px;
}
header h1 {
    color: #13203A;
    margin: 0 0 6px 0;
    font-size: 26px;
}
header .subtitle {
    color: #4a5568;
    font-size: 14px;
}
h2 {
    color: #13203A;
    border-left: 4px solid #12B5D6;
    padding-left: 10px;
    font-size: 19px;
    margin-top: 42px;
}
h3 {
    color: #13203A;
    font-size: 15px;
    margin-top: 24px;
}
p, li {
    font-size: 13.5px;
    text-align: justify;
}
ol.steps {
    padding-left: 20px;
}
ol.steps > li {
    margin-bottom: 6px;
}
table.glossary, table.fields {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0 20px 0;
    font-size: 13px;
}
table.glossary, table.fields, table.glossary th, table.glossary td, table.fields th, table.fields td {
    border: 1px solid #cbd5e0;
}
table.glossary th, table.fields th {
    background: #f0f4f8;
    text-align: left;
    padding: 8px 10px;
}
table.glossary td, table.fields td {
    padding: 7px 10px;
    vertical-align: top;
}
table.glossary td:first-child, table.fields td:first-child {
    font-weight: 600;
    white-space: nowrap;
    color: #13203A;
}
.info-box {
    background: #f0f7fa;
    border: 1px solid #b8e2ec;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 18px 0;
    font-size: 13.5px;
}
.expand-notice {
    display: flex;
    align-items: stretch;
    background: #fff4e5;
    border: 1px solid #f5a623;
    border-radius: 6px;
    margin: 18px 0 0 0;
    overflow: hidden;
    font-size: 13.5px;
}
.expand-notice-icon {
    flex: 0 0 44px;
    background: #ffc107;
    color: #7a4a00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}
.expand-notice-text {
    padding: 12px 18px;
    color: #8a5a00;
}
.warn-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: 12px 18px;
    margin: 14px 0;
    font-size: 13px;
}
.toc {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px 22px;
    margin-bottom: 30px;
    font-size: 13.5px;
}
.toc ol {
    padding-left: 20px;
    margin: 8px 0 0 0;
}
.toc a {
    color: #0b7a94;
    text-decoration: none;
}
.toc a:hover {
    text-decoration: underline;
}
footer {
    margin-top: 55px;
    border-top: 1px solid #cbd5e0;
    padding-top: 14px;
    font-size: 12px;
    color: #718096;
    text-align: center;
}
.illustration {
    margin: 18px 0 4px 0;
}
figcaption { text-align:center; font-size:11px; color:#64748b; margin-top: 6px; margin-bottom: 20px; font-style: italic; }
nav.breadcrumb {
    font-size: 12.5px;
    color: #4a5568;
    margin: 0 0 18px 0;
}
nav.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
nav.breadcrumb li:not(:last-child)::after {
    content: "\203A";
    margin-left: 6px;
    color: #9aa5b1;
}
nav.breadcrumb a { color: #0f7c93; text-decoration: none; }
nav.breadcrumb a:hover { text-decoration: underline; }
nav.breadcrumb li[aria-current="page"] { color: #1c2430; font-weight: 600; }

.doc-related {
    margin-top: 48px;
    padding: 18px 20px;
    background: #f4f7fa;
    border-left: 4px solid #12B5D6;
}
.doc-related h2 {
    margin: 0 0 10px 0;
    border: 0;
    padding: 0;
    font-size: 15px;
    color: #13203A;
}
.doc-related ul { margin: 0; padding-left: 18px; }
.doc-related li { margin-bottom: 5px; font-size: 14px; }
.doc-related a { color: #0f7c93; }

@media (max-width: 760px) {
    .brandbar { gap: 9px; margin-bottom: 18px; }
    .brandbar img { height: 31px; }
    .brandbar .name { font-size: 17px; }
    body { padding-left: 16px; padding-right: 16px; font-size: 15px; }
    table { display: block; overflow-x: auto; }
    .illustration, .win { max-width: 100%; overflow-x: auto; }
}

/* =====================================================================
   REGULAMIN — węższa kolumna, zwykłe tabele i numerowane paragrafy
   ===================================================================== */
body.doc--regulamin { max-width: 900px; padding-bottom: 80px; }
.doc--regulamin h2 { font-size: 18px; margin-top: 34px; }
.doc--regulamin h3 { color: #1c2430; margin-top: 20px; }
.doc--regulamin ol.main { padding-left: 20px; }
.doc--regulamin ol.main > li { margin-bottom: 8px; }
.doc--regulamin table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.doc--regulamin table, .doc--regulamin th, .doc--regulamin td { border: 1px solid #cbd5e0; }
.doc--regulamin th, .doc--regulamin td { padding: 8px 10px; text-align: left; vertical-align: top; }
.doc--regulamin th { background: #f0f4f8; }

/* =====================================================================
   ARTYKUŁY — komunikaty, panel, lista cech, kroki, zrzut ekranu
   (z dawnego dokumentacja/style.css; jeden zestaw dla wszystkich)
   ===================================================================== */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 18px 0; padding: 16px 18px;
  border: 1px solid; border-left-width: 4px; border-radius: 8px; font-size: 13.5px;
}
.callout-icon { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; }
.callout-body { min-width: 0; }
.callout-body > *:first-child { margin-top: 0; }
.callout-body > *:last-child { margin-bottom: 0; }
.callout p { margin: 0 0 8px; text-align: left; }
.callout-title { display: block; margin-bottom: 4px; font-weight: 600; color: #13203A; }
.callout--info   { background: #f2f9fd; border-color: #c9e6f5; border-left-color: #38B6F0; }
.callout--info   .callout-icon { color: #1E7FB8; }
.callout--warn   { background: #fff8ed; border-color: #f7dfb6; border-left-color: #e0a03c; }
.callout--warn   .callout-icon { color: #b4761c; }
.callout--danger { background: #fdf4f3; border-color: #f2d2ce; border-left-color: #d4564f; }
.callout--danger .callout-icon { color: #b03a33; }
.callout--ok     { background: #f3fbf6; border-color: #cbe9d5; border-left-color: #33a061; }
.callout--ok     .callout-icon { color: #1f7a45; }

.panel { margin: 32px 0 0; padding: 22px 24px; border: 1px solid #d7dee8; border-radius: 10px; background: #f7fafc; }
.panel > h2 { margin: 0 0 10px; border-left: 0; padding-left: 0; }
.panel > *:last-child { margin-bottom: 0; }

ul.feature-list { list-style: none; padding: 0; margin: 16px 0; }
ul.feature-list li { position: relative; margin: 0; padding: 10px 0 10px 28px; border-bottom: 1px solid #e3e8ef; }
ul.feature-list li:last-child { border-bottom: 0; }
ul.feature-list li::before { content: "✓"; position: absolute; left: 0; top: 10px; color: #1E7FB8; font-weight: 700; }

.step-list { display: grid; gap: 10px; margin: 18px 0; }
.step-item { padding: 13px 16px; font-size: 13.5px; border: 1px solid #d7dee8; border-left: 4px solid #38B6F0; border-radius: 8px; background: #fff; }
.step-label {
  display: inline-block; min-width: 88px; margin-right: 10px;
  font-family: "JetBrains Mono", Consolas, monospace; font-size: 11.5px; letter-spacing: .04em;
  color: #1E7FB8; font-weight: 600; text-transform: uppercase;
}

.figure { margin: 20px 0; padding: 12px; border: 1px solid #d7dee8; border-radius: 10px; background: #f7fafc; }
.figure img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.figure figcaption { margin-top: 10px; }

.doc-pigulka {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: #eaf7ff; border: 1px solid #b8e2ec; color: #1E7FB8;
  font-family: "JetBrains Mono", Consolas, monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}

/* =====================================================================
   PASEK POWROTU — tylko przy otwarciu dokumentu wprost (np. z Google).
   W ramce przeglądarki docs/ nawigację daje panel boczny, więc skrypt
   w dokumencie ukrywa pasek (klasa „w-ramce" na <html>). Nie drukuje się.
   ===================================================================== */
.doc-pasek {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -12px 0 22px; padding: 10px 14px; border-radius: 8px;
  background: #0a1628; color: #e7ecf4; font-size: 13px;
}
.doc-pasek a { color: #fff; text-decoration: none; font-weight: 600; }
.doc-pasek a:hover { text-decoration: underline; }
.doc-pasek span { color: #94a3b8; }
html.w-ramce .doc-pasek { display: none; }

@media print {
  .doc-pasek, .no-print { display: none !important; }
  body { max-width: none; padding: 0; }
  h2, h3 { page-break-after: avoid; }
  .illustration, .callout, .figure, table { page-break-inside: avoid; }
}
