/* Nápověda elPokladny.cz - vychází z designu www.elpokladny.cz (Ubuntu, #14ad92, #252122) */

@font-face { font-family: Ubuntu; src: url('/assets/fonts/ubuntu-light.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: Ubuntu; src: url('/assets/fonts/ubuntu-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: Ubuntu; src: url('/assets/fonts/ubuntu-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Ubuntu; src: url('/assets/fonts/ubuntu-medium.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: Ubuntu; src: url('/assets/fonts/ubuntu-bold.woff') format('woff'); font-weight: 700; font-display: swap; }

:root {
  --brand: #14ad92;
  --brand-dark: #0f8a74;
  --brand-light: #e8f5f3;
  --brand-lighter: #f0f9f7;
  --ink: #252122;
  --text: #4a4a4a;
  --muted: #827a7c;
  --line: #e0e0e0;
  --bg-soft: #f7f7f7;
  --radius: 8px;
  --wrap: 1160px;
  --header-h: 72px;
  --shadow: 0 1px 2px rgba(37, 33, 34, .06), 0 4px 16px rgba(37, 33, 34, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: Ubuntu, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 500; line-height: 1.25; }
h1 { font-size: 2rem; margin: 0 0 .5rem; }
:focus-visible { outline: 3px solid rgba(20, 173, 146, .45); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 4px; z-index: 100; }
.skip-link:focus { top: 8px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border-radius: 4px;
  padding: .55em 1.2em;
  text-decoration: none;
  font-weight: 500;
  font-style: italic;
  transition: background .15s;
}
.button:hover { background: var(--brand-dark); color: #fff; }
.button--small { font-size: .9rem; padding: .35em .9em; }

/* ---------- hlavička ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand__logo { width: 160px; height: auto; display: block; }
.brand__label {
  color: var(--ink);
  font-weight: 500;
  font-size: 1rem;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  line-height: 1.6;
}
.site-header .search { flex: 1; max-width: 460px; }
.site-nav { display: flex; align-items: center; gap: 18px; margin-left: auto; font-size: .92rem; }
.site-nav__link { color: var(--text); font-style: italic; text-decoration: none; }
.site-nav__link:hover { color: var(--brand); }
/* ---------- vyhledávání ---------- */

.search { position: relative; }
.search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search__input {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: .55em .9em .55em 2.4em;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
.search__input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(20, 173, 146, .18); }
.search--big { max-width: 680px; margin: 0 auto; }
.search--big .search__input { font-size: 1.1rem; padding: .85em 1em .85em 2.8em; border-radius: 8px; box-shadow: var(--shadow); border-color: #d6d6d6; }
.search--big .search__icon { left: 16px; width: 22px; height: 22px; }
.search__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(37, 33, 34, .16);
  z-index: 30;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  text-align: left;
}
.search__results a, .search__empty { display: block; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid #f0f0f0; }
.search__results a:last-child { border-bottom: 0; }
.search__results a[aria-selected="true"], .search__results a:hover { background: var(--brand-lighter); }
.search__results .r-title { display: block; color: var(--ink); font-weight: 500; }
.search__results .r-meta { display: block; font-size: .8rem; color: var(--muted); }
.search__results .r-snippet { display: block; font-size: .85rem; line-height: 1.45; margin-top: 2px; }
.search__results .r-all { font-size: .88rem; color: var(--brand-dark); background: var(--bg-soft); }
.search__empty { color: var(--muted); font-size: .9rem; }
mark { background: #fff1a8; color: inherit; padding: 0 1px; border-radius: 2px; }

.search-page { margin: 28px 0; }
.search-page__count { color: var(--muted); }
.search-page ol { list-style: none; padding: 0; margin: 0; }
.search-page li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-page li a { font-size: 1.15rem; font-weight: 500; }
.search-page li p { margin: 4px 0 0; font-size: .95rem; }
.search-page .r-meta { color: var(--muted); font-size: .85rem; }

/* ---------- úvod ---------- */

.hero {
  background: linear-gradient(180deg, var(--brand-light), #fff);
  padding: 64px 0 56px;
  text-align: center;
}
.hero h1 { font-size: 2.4rem; }
.hero__lead { font-size: 1.15rem; margin: 0 0 28px; color: var(--text); }

.section { margin: 48px 0; }
.section__title { font-size: 1.35rem; margin: 0 0 20px; }

.category-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.category-card {
  display: flex;
  gap: 16px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.category-card:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--text); transform: translateY(-1px); }
.category-card__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
}
.category-card__icon .icon { width: 24px; height: 24px; margin-top: -4px; }
.category-card__body { display: flex; flex-direction: column; gap: 4px; }
.category-card__title { color: var(--ink); font-weight: 500; font-size: 1.08rem; }
.category-card__desc { font-size: .92rem; line-height: 1.5; }
.category-card__count { font-size: .8rem; color: var(--muted); margin-top: auto; }
.category-grid--compact { margin-top: 32px; }
.category-grid--compact .category-card { align-items: center; padding: 14px 16px; }
.category-grid--compact .category-card__icon { width: 40px; height: 40px; }

.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: flex; gap: 12px; align-items: baseline; padding: 12px 0; text-decoration: none; color: var(--ink); }
.link-list a .icon { color: var(--brand); position: relative; top: 3px; }
.link-list a:hover span { color: var(--brand-dark); text-decoration: underline; }
.more-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; text-decoration: none; }
.more-link .icon { width: 1em; height: 1em; }

/* ---------- drobečky, hlavičky stránek ---------- */

.breadcrumbs { margin: 20px 0 8px; font-size: .88rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li:not(:last-child)::after { content: '›'; margin-left: 6px; color: #bbb; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-dark); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }

.page-header { margin: 12px 0 28px; }
.page-header__lead { font-size: 1.1rem; margin: 0; max-width: 70ch; }
.page-header--center { text-align: center; margin: 48px 0 28px; }
.page-header--center .page-header__lead { margin: 0 auto; }
.error-code { font-size: 4rem; font-weight: 700; color: var(--brand); margin: 0; line-height: 1; }

.subcategories ul { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.subcategories a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.subcategories a:hover { border-color: var(--brand); }
.badge { background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; font-size: .75rem; padding: 0 7px; line-height: 1.6; }

.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.article-card__link { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.article-card__link:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--text); }
.article-card__title { display: block; color: var(--ink); font-weight: 500; font-size: 1.1rem; }
.article-card__desc { display: block; font-size: .95rem; margin-top: 4px; }
.article-card__meta { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.article-list--compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.article-list--compact .article-card__link { height: 100%; }
.article-list--compact .article-card__desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.faq-list { display: grid; gap: 12px; }
.faq-item { padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); }
.faq-item__q { font-size: 1.15rem; margin: 0 0 6px; }
.faq-item__q a { color: var(--ink); text-decoration: none; }
.faq-item__q a:hover { color: var(--brand-dark); text-decoration: underline; }
.faq-item__a { margin: 0 0 6px; }
.faq-item p:last-child { margin: 0; }

/* ---------- návod ---------- */

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; }
.article-layout--no-toc { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.article { min-width: 0; max-width: 820px; }
.article__header { margin: 12px 0 24px; }
.article__meta { font-size: .88rem; color: var(--muted); margin: 0; }
.article__meta a { color: var(--muted); }
.article-aside { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }

.toc { font-size: .9rem; }
.toc summary { font-weight: 500; color: var(--ink); cursor: pointer; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0 0 0 12px; margin: 0; border-left: 2px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 0 4px 8px; margin-left: -14px; border-left: 2px solid transparent; color: var(--text); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--brand-dark); }
.toc a.is-active { border-left-color: var(--brand); color: var(--brand-dark); font-weight: 500; }
.toc__l3 a { padding-left: 20px; font-size: .86rem; }
.toc-mobile { display: none; margin: 0 0 24px; padding: 12px 16px; background: var(--bg-soft); border-radius: var(--radius); }
.toc-mobile ol { border: 0; padding: 0; }
.toc-mobile a { margin: 0; padding-left: 0; border: 0; }
.toc-mobile .toc__l3 a { padding-left: 14px; }

.prose { overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.22rem; margin: 1.8rem 0 .6rem; }
.prose h4 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin: .35rem 0; }
.prose li > ul, .prose li > ol { margin: .35rem 0; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose img {
  display: block;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
  cursor: zoom-in;
  background: var(--bg-soft);
}
.prose blockquote { margin: 1.25rem 0; padding: 14px 18px; background: var(--brand-lighter); border-left: 4px solid var(--brand); border-radius: 0 6px 6px 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose code { background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 500; }
.functions { margin: 40px 0 0; padding: 22px 24px; background: var(--brand-lighter); border: 1px solid var(--brand-light); border-radius: var(--radius); }
.functions__title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.25rem; color: var(--ink); }
.functions__title .icon { width: 24px; height: 24px; color: var(--brand); }
.functions__lead { margin: 0 0 14px; font-size: .92rem; color: var(--muted); }
.functions__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.functions__item { display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; background: #fff; border-radius: 6px; }
.functions__code { flex: none; min-width: 52px; font-size: .8rem; font-weight: 500; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.functions__body { font-size: .95rem; line-height: 1.5; }
.functions__body strong { color: var(--ink); font-weight: 500; }
.functions__body span { color: var(--text); }
@media (max-width: 560px) {
  .functions { padding: 18px 16px; }
  .functions__item { flex-direction: column; gap: 2px; }
}
.related { margin: 56px 0 0; }

.contact-box { margin: 56px 0; padding: 28px; background: var(--bg-soft); border-radius: var(--radius); text-align: center; }
.contact-box h2 { margin: 0 0 4px; font-size: 1.25rem; }
.contact-box p { margin: 0; }
.contact-box__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px !important; }
.contact-box__links a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }

/* lightbox pro screenshoty */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20, 18, 19, .88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #fff; }

/* ---------- patička ---------- */

.site-main { flex: 1; }
.site-footer { background: var(--ink); color: #b8b3b4; font-size: .92rem; margin-top: 24px; }
.site-footer a { color: #e6e3e3; text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin: 0 0 14px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.site-footer li:first-child { border-top: 0; }
.site-footer p { margin: 0 0 12px; }
.site-footer strong { color: #fff; font-weight: 500; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 20px; padding-bottom: 28px; font-size: .85rem; }
.site-footer__bottom p { margin: 0; }
.embed-footer { display: none; }

/* ---------- responzivita ---------- */

@media (max-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { display: none; }
  .toc-mobile { display: block; }
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .site-header__inner { flex-wrap: wrap; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
  .site-header .search { order: 3; flex-basis: 100%; max-width: none; }
  .site-nav__link { display: none; }
  .home-columns { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  html { scroll-padding-top: 130px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .hero { padding: 40px 0 36px; }
  .hero h1 { font-size: 1.75rem; }
  .brand__logo { width: 130px; }
  .brand__label { font-size: .9rem; padding-left: 10px; }
  .category-grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-box { padding: 20px; }
  .prose h2 { font-size: 1.3rem; }
  .prose h3 { font-size: 1.12rem; }
}

/* ---------- vložení do aplikace (modál Centrum pomoci, iframe) ---------- */

/* Mimo aplikaci se lišta neukazuje; v aplikaci nahrazuje hlavičku i patičku webu. */
.app-bar { display: none; }
.embed body { font-size: 16px; }
.embed { --header-h: 56px; scroll-padding-top: 68px; }
.embed .site-header, .embed .site-footer, .embed .contact-box, .embed .skip-link, .embed .search-page__form { display: none; }
.embed .app-bar { display: block; position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
/* Úvod má vlastní velké hledání, lišta by ho jen zdvojila. */
.embed body:has(.hero) .app-bar { display: none; }
.embed .hero { padding: 32px 0 28px; }
.embed .hero h1 { font-size: 1.7rem; }
.embed .hero__lead { margin-bottom: 18px; }
.app-bar__inner { display: flex; align-items: center; gap: 8px; min-height: 56px; }
.app-bar .search { flex: 1; }
.app-bar__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  min-width: 40px;
  padding: 0 10px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
  text-decoration: none;
  cursor: pointer;
}
.app-bar__btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.app-bar__btn[aria-current="page"] { background: var(--brand-light); border-color: var(--brand-light); color: var(--brand-dark); }
.app-bar__btn .icon { width: 20px; height: 20px; }
.app-bar__back[hidden] { display: none; }
.embed .search__input { padding-top: .6em; padding-bottom: .6em; }
.embed .embed-footer { display: block; margin-top: 32px; border-top: 1px solid var(--line); background: var(--bg-soft); font-size: .85rem; text-align: center; padding: 12px 16px; }
.embed .embed-footer p { margin: 0; }
.embed .breadcrumbs { margin-top: 14px; }
.embed .section { margin: 20px 0 28px; }
.embed .section__title { font-size: 1.15rem; margin-bottom: 14px; }
.embed h1 { font-size: 1.6rem; }
.embed .article-layout { grid-template-columns: minmax(0, 1fr); }
.embed .article-aside { display: none; }
.embed .toc-mobile { display: block; }
.embed .related { margin-top: 32px; }
@media (max-width: 560px) {
  .embed .app-bar__back span { display: none; }
}

@media print {
  .site-header, .site-footer, .embed-footer, .toc, .toc-mobile, .related, .contact-box, .breadcrumbs { display: none !important; }
  .article-layout { display: block; }
  .prose img { max-width: 70%; box-shadow: none; }
  a { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
