/* ==========================================================
   Manuál PiCCOLO – vlastní styly (načítat až po main.css)
   ========================================================== */

:root {
  --default-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --heading-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --nav-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --brand: #0e3e9d;
  --brand-soft: #eaf0fb;
  --brand-line: #c9d7f2;
  --accent-color: var(--brand);
  --heading-color: #16213a;
  --default-color: #2f3a4b;
  --muted: #5f6b7d;
  --line: #e2e7ef;
  --surface-alt: #f6f8fb;

  --nav-color: #2f3a4b;
  --nav-hover-color: var(--brand);
  --nav-dropdown-hover-color: var(--brand);

  --ok: #1f7a4d;
  --ok-soft: #e8f5ee;
  --warn: #8a5a00;
  --warn-soft: #fff6e0;
  --err: #a42828;
  --err-soft: #fdeeee;

  --radius: 10px;
}

body { font-size: 16px; line-height: 1.6; }

/* ---------- hlavička a menu ---------- */
.header { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 0; }
.header .logo img { max-height: 30px; }
.navmenu a, .navmenu a:focus { font-weight: 600; }
.navmenu a.active, .navmenu .active:focus { color: var(--brand); }
@media (min-width: 1200px) {
  .navmenu a.active::after {
    content: ""; position: absolute; left: 15px; right: 15px; bottom: -6px;
    height: 2px; background: var(--brand); border-radius: 2px;
  }
  .navmenu li { position: relative; }
}

/* ---------- záhlaví stránky ---------- */
.page-head {
  background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%);
  padding: 48px 0 28px;
}
.page-head .eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 6px;
}
.page-head h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin: 0 0 8px; color: var(--heading-color); }
.page-head .lead { color: var(--muted); font-size: 18px; margin: 0; max-width: 720px; }

/* ---------- vyhledávání a nástroje ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 8px; }
.search-box { position: relative; flex: 1 1 320px; max-width: 520px; }
.search-box i.bi-search { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input {
  width: 100%; padding: 11px 14px 11px 40px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1000;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(16, 33, 58, .12); max-height: 360px; overflow-y: auto;
}
.search-results:empty { display: none; }
.result-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.result-item:last-child { border-bottom: 0; }
.result-item:hover, .result-item:focus { background: var(--surface-alt); outline: none; }
.result-page { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.result-title { font-weight: 600; color: var(--heading-color); }
.result-snippet { font-size: 14px; color: var(--muted); }
.result-empty { padding: 12px 14px; color: var(--muted); font-size: 14px; }
mark { background: #fff1a8; padding: 0 1px; border-radius: 2px; }

.btn-tool {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: 14px; font-weight: 600;
  color: var(--default-color); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.btn-tool:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- obsah (rozcestník) ---------- */
.toc {
  background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 16px 0 28px;
}
.toc h2 { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; }
.toc ol { columns: 2 260px; column-gap: 32px; margin: 0; padding-left: 22px; }
.toc li { break-inside: avoid; padding: 2px 0; font-size: 15px; }
.toc a { color: var(--default-color); }
.toc a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- rámečky ---------- */
.callout {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--brand-line); background: var(--brand-soft); margin: 8px 0 20px;
}
.callout > i { font-size: 22px; color: var(--brand); line-height: 1.2; }
.callout strong { display: block; color: var(--heading-color); margin-bottom: 2px; }
.callout p { margin: 0; }
.callout.tip { border-color: #bfe3cf; background: var(--ok-soft); }
.callout.tip > i { color: var(--ok); }
.callout.warn { border-color: #f0d9a4; background: var(--warn-soft); }
.callout.warn > i { color: var(--warn); }

/* ---------- sekce manuálu ---------- */
.manual-list { margin-bottom: 48px; }
details.manual-item {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  margin-bottom: 10px; scroll-margin-top: 90px; transition: border-color .2s, box-shadow .2s;
}
details.manual-item[open] { border-color: var(--brand-line); box-shadow: 0 4px 18px rgba(14, 62, 157, .06); }
details.manual-item.flash { box-shadow: 0 0 0 3px var(--brand-line); }
details.manual-item > summary {
  display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer;
  padding: 14px 18px; font-weight: 600; font-size: 17px; color: var(--heading-color);
}
details.manual-item > summary::-webkit-details-marker { display: none; }
details.manual-item > summary::marker { content: ""; }
details.manual-item > summary .title { flex: 1; }
details.manual-item > summary::after {
  content: "\F282"; font-family: "bootstrap-icons"; font-size: 14px; color: var(--muted);
  transition: transform .2s;
}
details.manual-item[open] > summary::after { transform: rotate(180deg); color: var(--brand); }
details.manual-item > summary:hover .title { color: var(--brand); }
details.manual-item > summary:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 2px; border-radius: var(--radius); }
.anchor-link {
  opacity: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 4px; border-radius: 6px;
}
details.manual-item > summary:hover .anchor-link, .anchor-link:focus { opacity: 1; }
.anchor-link:hover { color: var(--brand); background: var(--brand-soft); }
.anchor-link.copied { opacity: 1; color: var(--ok); }

.manual-body { padding: 0 18px 18px 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.manual-body p { margin: 0 0 10px; }
.manual-body > :last-child { margin-bottom: 0; }
.manual-body h4.sub { font-size: 15px; font-weight: 700; color: var(--brand); margin: 18px 0 8px; }
.manual-body h4.sub:first-child { margin-top: 0; }
.manual-body ul { margin: 6px 0 10px; padding-left: 22px; }
.manual-body ul li { margin: 3px 0; }

/* číslované kroky */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; margin: 4px 0 12px; }
ol.steps > li { counter-increment: step; position: relative; padding: 4px 0 6px 40px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 4px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 12.5px; top: 32px; bottom: -4px; width: 1px; background: var(--brand-line);
}
ol.steps ul { margin-top: 6px; }

/* ovládací prvky aplikace */
.ui {
  display: inline-block; padding: 0 7px; margin: 1px 0; font-weight: 600; font-size: .93em; line-height: 1.6;
  color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 5px;
  white-space: normal;
}

/* chybové hlášky */
.msg {
  display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 14px; padding: 10px 14px;
  background: var(--err-soft); border-left: 4px solid var(--err); border-radius: 0 var(--radius) var(--radius) 0;
}
.msg i { color: var(--err); font-size: 18px; line-height: 1.3; }
.msg code { color: #5b1a1a; font-size: 14px; white-space: normal; word-break: break-word; background: none; padding: 0; }
code.msg { display: inline; padding: 1px 6px; background: var(--err-soft); color: var(--err); border-radius: 4px; border: 0; }
.manual-body code { color: var(--heading-color); background: var(--surface-alt); padding: 1px 5px; border-radius: 4px; }

/* přehledy – popis funkcí */
dl.features {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr; margin: 12px 0 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
dl.features dt, dl.features dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); }
dl.features dt { font-weight: 600; background: var(--surface-alt); color: var(--heading-color); }
dl.features dt:last-of-type, dl.features dd:last-of-type { border-bottom: 0; }
dl.features dd ul { margin: 0; padding-left: 18px; }
@media (max-width: 640px) {
  dl.features { grid-template-columns: 1fr; }
  dl.features dt { border-bottom: 0; padding-bottom: 2px; }
}

/* štítek verze */
.badge-ver {
  display: inline-block; margin-left: 4px; padding: 1px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; vertical-align: 2px;
  color: #6a3fb5; background: #f1ebfb; border: 1px solid #ddcff5; border-radius: 999px;
}

/* ---------- úvodní stránka ---------- */
.home-hero { background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%); padding: 64px 0 40px; }
.home-hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; color: var(--heading-color); margin-bottom: 10px; }
.home-hero h1 span { color: var(--brand); }
.home-hero .lead { font-size: 19px; color: var(--muted); max-width: 560px; }
.home-hero img { border-radius: 16px; box-shadow: 0 20px 50px rgba(16, 33, 58, .18); }
.home-hero .search-box { max-width: 560px; margin-top: 22px; }

.cards { padding: 24px 0 16px; }
.card-link {
  display: flex; flex-direction: column; height: 100%; padding: 24px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; color: var(--default-color); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card-link:hover { border-color: var(--brand-line); box-shadow: 0 12px 30px rgba(14, 62, 157, .10); transform: translateY(-2px); color: var(--default-color); }
.card-link .icon {
  width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 24px; margin-bottom: 14px;
}
.card-link h2 { font-size: 20px; font-weight: 700; color: var(--heading-color); margin: 0 0 6px; }
.card-link p { margin: 0 0 14px; color: var(--muted); flex: 1; }
.card-link .more { font-weight: 600; color: var(--brand); }

.contact-box {
  margin: 32px 0 56px; padding: 28px; border-radius: 14px; background: var(--heading-color); color: #dfe6f3;
}
.contact-box h2 { color: #fff; font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.contact-box p { margin: 0; }
.contact-box a.contact-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; height: 100%;
}
.contact-box a.contact-item:hover { background: rgba(255, 255, 255, .16); }
.contact-box a.contact-item i { font-size: 22px; }
.contact-box a.contact-item small { display: block; font-weight: 400; color: #b9c4d8; }
.contact-box .prepare { font-size: 14px; color: #b9c4d8; margin-top: 14px; }

/* ---------- patička ---------- */
.footer { border-top: 1px solid var(--line); padding: 22px 0; font-size: 14px; color: var(--muted); }
.footer .copyright p { margin: 0; }
.footer a { color: var(--muted); text-decoration: underline; }
.footer .credits { font-size: 12px; margin-top: 4px; }

/* ---------- tisk ---------- */
@media print {
  .header, .toolbar, .toc, .scroll-top, .footer .credits, .anchor-link { display: none !important; }
  .page-head { background: none; padding: 0 0 12px; }
  details.manual-item { break-inside: avoid; border: 0; box-shadow: none; margin: 0 0 14px; }
  details.manual-item > summary { padding: 0 0 4px; }
  details.manual-item > summary::after { display: none; }
  .manual-body { border: 0; padding: 0; }
  .ui { border: 0; background: none; padding: 0; color: #000; }
  ol.steps > li::before { background: none; color: #000; border: 1px solid #000; }
  a[href^="http"]::after { content: ""; }
}
