/* Právní stránky (Obchodní podmínky, Zásady): doplněk ke styles.css. Vzory popisuje DESIGN.md. */

/* ---------- Tmavý pás s nadpisem ---------- */
.doc-hero { position: relative; isolation: isolate; overflow: hidden; padding: 6.5rem 0 calc(var(--round) + 2.5rem); background: var(--night); color: var(--white); text-align: center; }
html:not(.js) .doc-hero { padding-top: 2rem; }
.doc-hero .wrap { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.875rem; }
.doc-hero h1 { max-width: 17em; font-size: clamp(2.125rem, 1.2rem + 4.2vw, 3.5rem); line-height: 1.08; }
.doc-date { color: #e2deff; }
.doc-back { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0.25rem 1.25rem 0.25rem 0.875rem; border: 2px solid #b3b5fb; border-radius: 999px; font: 800 1.0625rem/1.3 var(--head); text-decoration: none; }
.doc-back svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Rozložení: na počítači obsah vlevo (drží se na místě), text vpravo ---------- */
.doc { --focus: var(--indigo); padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); background: var(--paper); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 46rem); justify-content: center; align-items: start; gap: 1rem 2rem; }
.doc-main { min-width: 0; }

/* ---------- Obsah ---------- */
.toc { border-radius: 1.75rem; background: var(--white); font-size: 1rem; line-height: 1.4; }
.toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 3.5rem; padding: 0.75rem 1.25rem; border-radius: 1.75rem; font: 900 1.1875rem/1.3 var(--head); list-style: none; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ''; width: 0.625rem; height: 0.625rem; margin-top: -0.25rem; border: solid var(--indigo); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.toc[open] summary::after { margin-top: 0.25rem; transform: rotate(-135deg); }
.toc summary:focus-visible, .toc a:focus-visible { outline-offset: -3px; }
.toc ol { display: grid; gap: 0.125rem; padding: 0 0.5rem 0.75rem; }
.toc a { display: grid; grid-template-columns: 1.875rem minmax(0, 1fr); align-items: center; column-gap: 0.25rem; min-height: 2.75rem; padding: 0.375rem 0.75rem; border-radius: 0.875rem; color: #302b66; text-decoration: none; }
.toc a > :first-child { align-self: start; padding-top: calc((2rem - 1.4em) / 2); color: var(--indigo); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc a > :last-child { padding-block: calc((2rem - 1.4em) / 2); }
.toc a[aria-current] { background: #e8e3ff; color: var(--night); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { background: #f1eeff; } .toc a[aria-current]:hover { background: #e8e3ff; } }
@media (min-width: 64rem) {
  .doc-grid { grid-template-columns: 17.5rem minmax(0, 46rem); }
  .doc-toc { position: sticky; top: 6.25rem; max-height: calc(100vh - 7.25rem); overflow: auto; overscroll-behavior: contain; border-radius: 1.75rem; }
  .js .toc summary { pointer-events: none; }
  .toc a { min-height: 2.5rem; padding-block: 0.25rem; }
  .js .toc summary::after { content: none; }
}

/* ---------- Shrnutí v kostce ---------- */
.doc-sum { padding: clamp(1.25rem, 5vw, 2.25rem) clamp(1.125rem, 5vw, 3rem); border: 2px solid #c9bdff; border-radius: 1.75rem; background: linear-gradient(165deg, #e5deff, #f0ecff); color: #231e55; }
.doc-sum h2 { color: var(--night); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); }
.doc-sum ul { display: grid; gap: 0.75rem; margin-top: 1.25rem; font-size: 1.0625rem; line-height: 1.55; }
.doc-sum li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 0.75rem; max-width: 40.75rem; }
.doc-sum svg { width: 1.5rem; height: 1.5rem; margin-top: 0.05rem; color: var(--indigo); }
.doc-note { padding: 0.75rem clamp(1.125rem, 5vw, 3rem) 0; color: #4a4478; font-size: 0.9375rem; }

/* ---------- Plné znění ---------- */
.doc-text { margin-top: 1.25rem; padding: clamp(1.5rem, 5vw, 3rem) clamp(1.125rem, 5vw, 3rem); border-radius: 1.75rem; background: var(--white); color: #231e55; font-size: 1.0625rem; line-height: 1.7; overflow-wrap: break-word; }
/* Šířka řádku kolem 70 znaků */
.doc-text > :not(table) { max-width: 38.5rem; }
.doc-text h2 { display: flex; align-items: flex-start; gap: 0.875rem; margin-top: 3.25rem; scroll-margin-top: 6.25rem; color: var(--night); font-size: clamp(1.3125rem, 1.1rem + 1vw, 1.6875rem); line-height: 1.22; }
.doc-text h2 > :last-child { min-width: 0; padding-top: 0.2em; }
.doc-text > h2:first-child { margin-top: 0; }
html:not(.js) .doc-text h2 { scroll-margin-top: 1rem; }
/* Číslo článku: malá dlaždice jako ikony na úvodu (plochý stín přímo dolů, natočení se střídá) */
.doc-n { display: grid; flex: none; place-items: center; min-width: 2.375rem; height: 2.375rem; border-radius: 0.625rem; background: var(--indigo); box-shadow: 0 4px 0 #2d288f; color: var(--white); font-size: 1.125rem; font-variant-numeric: tabular-nums; transform: rotate(-6deg); }
.doc-text h2:nth-of-type(even) .doc-n { transform: rotate(6deg); }
.doc-text p { margin-top: 1rem; }
.doc-text ul, .doc-text ol { margin-top: 1rem; padding-left: 1.375rem; list-style: disc; }
.doc-text ol { list-style: decimal; }
.doc-text li { margin-top: 0.375rem; }
.doc-text li::marker { color: var(--indigo); }
.doc-text a, .doc-sum a { color: #342db3; font-weight: 700; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .doc-text a:hover, .doc-sum a:hover { text-decoration-thickness: 3px; } }
/* Vzor oznámení */
.vzor { margin: 1.5rem 0 0; padding: 1.25rem clamp(1.125rem, 3vw, 1.5rem); border: 2px dashed #8f86e8; border-radius: 1.25rem; background: var(--paper); }
.vzor figcaption { color: var(--night); font: 900 1.0625rem/1.35 var(--head); }
.vzor blockquote { margin: 0; }
.vzor p { margin-top: 0.5rem; }

/* ---------- Tabulky ---------- */
.doc-text table { width: 100%; margin-top: 1.5rem; border: 2px solid #d6cffc; border-spacing: 0; border-radius: 1.25rem; overflow: hidden; font-size: 0.9875rem; line-height: 1.5; text-align: left; }
.doc-text th { padding: 0.75rem 1rem; background: #e8e3ff; color: var(--night); font: 900 1rem/1.35 var(--head); text-align: left; vertical-align: bottom; }
.doc-text td { padding: 0.75rem 1rem; border-top: 1px solid #d6cffc; vertical-align: top; }
.doc-text td:first-child { width: 28%; color: var(--night); font-weight: 700; }
.doc-text tbody tr:nth-child(even) { background: #faf9ff; }
@media screen and (max-width: 47.99rem) {
  .doc-text table, .doc-text tbody, .doc-text tr, .doc-text td { display: block; }
  .doc-text table { border: 0; border-radius: 0; overflow: visible; }
  .doc-text thead { position: absolute; display: block; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .doc-text tbody tr { margin-top: 0.75rem; padding: 0.25rem 1rem; border: 2px solid #d6cffc; border-radius: 1.25rem; background: var(--white); }
  .doc-text td { padding: 0.625rem 0; }
  .doc-text td:first-child { width: auto; border-top: 0; font-size: 1.0625rem; }
  .doc-text td::before { content: attr(data-label); content: attr(data-label) / ''; display: block; color: var(--indigo); font: 800 0.875rem/1.45 var(--head); }
}

.doc-up { display: flex; justify-content: center; margin-top: 1.75rem; }
.doc-up .doc-back { border-color: var(--indigo); color: var(--indigo); }
.doc-up svg { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) {
  .doc-hero .doc-back:hover { background: rgb(179 181 251 / 0.16); }
  .doc-up .doc-back:hover { background: #e8e3ff; }
}

/* ---------- Tisk: bílé pozadí, jen text ---------- */
@media print {
  .nav, .skip, .foot, .mesh, .doc-toc, .doc-back, .doc-up { display: none !important; }
  body, .doc-hero, .doc, .doc-sum, .doc-text, .vzor, .doc-text th, .doc-text tbody tr { background: #fff !important; color: #000 !important; }
  body { font-size: 11pt; }
  .wrap { max-width: none; padding: 0; }
  .doc-hero { padding: 0 0 1rem; text-align: left; }
  .doc-hero .wrap { align-items: flex-start; gap: 0.25rem; }
  .doc-hero h1 { font-size: 20pt; }
  .doc-date { color: #000; }
  .deck { margin-top: 0; border-radius: 0; }
  .doc { padding: 0; }
  .doc-grid { display: block; }
  .doc-sum { padding: 0.75rem 1rem; border: 1px solid #000; border-radius: 0; }
  .doc-sum h2, .doc-text h2, .doc-text td:first-child, .vzor figcaption { color: #000; }
  .doc-sum h2 { font-size: 14pt; }
  .doc-sum ul, .doc-text { font-size: 10.5pt; line-height: 1.45; }
  .doc-sum svg { color: #000; }
  .doc-note { padding: 0.5rem 0 0; color: #000; }
  .doc-text { padding: 0; border-radius: 0; }
  .doc-text > :not(table), .doc-sum li { max-width: none; }
  .doc-text h2 { display: block; margin-top: 1.25rem; font-size: 13pt; break-after: avoid; }
  .doc-n, .doc-text h2:nth-of-type(even) .doc-n { display: inline; min-width: 0; height: auto; background: none; box-shadow: none; color: #000; font-size: inherit; transform: none; }
  .doc-n .visually-hidden { position: static; width: auto; height: auto; margin: 0; clip-path: none; }
  .doc-text table { border: 0; border-collapse: collapse; border-radius: 0; font-size: 9.5pt; }
  .doc-text th, .doc-text td { border: 1px solid #777; }
  .vzor { border: 1px dashed #000; border-radius: 0; }
  .doc-text tr, .doc-sum li, .vzor { break-inside: avoid; }
  .doc-text a, .doc-sum a { color: #000; }
  .doc-text th { font-size: 10pt; }
  /* U e-mailu je adresa přímo v textu, adresa v závorce patří jen k odkazům na web */
  a[href^='http']::after { content: ' (' attr(href) ')'; font-weight: 400; }
}
