/*
 * Dokumentace pro vývojáře (templates/docs/*): admin /admin/napoveda/widget i veřejná /dokumentace/widget.
 * Nezávislé na Bootstrapu (veřejná verze ho nenačítá); třídy docs-*.
 */
.docs {
    --d-ink: #1c1d26; --d-ink2: #3b4152; --d-muted: #6b7280; --d-line: #e6e8ef; --d-soft: #f6f7fb;
    --d-brand: #5b21e6; --d-brand-soft: #f1ebff; --d-grad: linear-gradient(90deg, #4318ee, #ff3dbf);
    --d-code-bg: #14112b; --d-code-ink: #e8e6ff; --d-code-head: #1e1a3d;
    color: var(--d-ink); font-size: .975rem; line-height: 1.65;
}
.docs-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 40px; align-items: start; }
.docs-toc { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; padding: 4px 0; font-size: .875rem; scrollbar-width: thin; }
.docs-toc-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--d-muted); margin: 0 0 10px 12px; }
.docs-toc ol { list-style: none; margin: 0; padding: 0; }
.docs-toc ol ol { margin: 2px 0 6px 12px; }
.docs-toc a { display: block; padding: 5px 12px; border-left: 2px solid var(--d-line); color: var(--d-ink2); text-decoration: none; line-height: 1.35; }
.docs-toc ol ol a { font-size: .82rem; color: var(--d-muted); padding: 3px 12px; }
.docs-toc a:hover { color: var(--d-brand); border-left-color: #c9b8ff; }
.docs-toc a.is-active { color: var(--d-brand); border-left-color: var(--d-brand); font-weight: 600; background: linear-gradient(90deg, var(--d-brand-soft), transparent); }
.docs-toc-mobile { display: none; }

.docs-content { min-width: 0; max-width: 900px; }
.docs-content section { scroll-margin-top: 90px; }
.docs-content > section + section { margin-top: 56px; padding-top: 8px; }
.docs-content h2 { font: 800 1.55rem/1.25 Montserrat, Inter, sans-serif; letter-spacing: -.02em; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.docs-content h2 .docs-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--d-grad); color: #fff; font-size: .95rem; flex: none; }
.docs-content h3 { font-size: 1.12rem; font-weight: 700; margin: 30px 0 10px; scroll-margin-top: 90px; }
.docs-content h4 { font-size: .98rem; font-weight: 700; margin: 22px 0 8px; }
.docs-content p { margin: 0 0 12px; }
.docs-content ul, .docs-content ol { padding-left: 1.3em; margin: 0 0 12px; }
.docs-content li { margin: 3px 0; }
.docs-content a { color: var(--d-brand); }
.docs-content :not(pre) > code { font: 500 .86em/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--d-soft); border: 1px solid var(--d-line);
    border-radius: 6px; padding: 1px 6px; color: #4a1fb8; white-space: nowrap; }
.docs-lead { font-size: 1.06rem; color: var(--d-ink2); }

/* Kód s tlačítkem Kopírovat */
.docs-code { margin: 14px 0 18px; border-radius: 14px; overflow: hidden; background: var(--d-code-bg); box-shadow: 0 10px 30px -14px rgba(20, 17, 43, .55); }
.docs-code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 8px 7px 16px; background: var(--d-code-head);
    font: 600 .72rem/1 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #a49fd6; }
.docs-code-head .docs-code-title { text-transform: none; letter-spacing: 0; font-weight: 500; color: #cfcaf5; margin-right: auto; margin-left: 10px; }
.docs-copy { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #e8e6ff;
    border-radius: 8px; padding: 5px 10px; font: 600 .76rem/1 Inter, sans-serif; cursor: pointer; text-transform: none; letter-spacing: 0; }
.docs-copy:hover { background: rgba(255, 255, 255, .14); }
.docs-copy.is-done { border-color: #34d399; color: #a7f3d0; }
.docs-copy svg { width: 14px; height: 14px; }
.docs-code pre { font-variant-ligatures: none; margin: 0; padding: 16px 18px 18px; overflow: auto; font: 400 .84rem/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--d-code-ink); tab-size: 2; }
.docs-code pre code { font: inherit; color: inherit; background: none; border: 0; padding: 0; white-space: pre; }

/* Tabulky */
.docs-table-wrap { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--d-line); border-radius: 12px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.docs-table th { text-align: left; background: var(--d-soft); font-weight: 600; color: var(--d-ink2); padding: 9px 14px; border-bottom: 1px solid var(--d-line); white-space: nowrap; }
.docs-table td { padding: 9px 14px; border-bottom: 1px solid var(--d-line); vertical-align: top; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table td:first-child { white-space: nowrap; }

/* Upozornění */
.docs-note { display: flex; gap: 12px; padding: 13px 16px; border-radius: 12px; margin: 14px 0 18px; background: var(--d-brand-soft); border: 1px solid #ddd0ff; color: #2e1a73; font-size: .93rem; }
.docs-note-warn { background: #fff8e6; border-color: #fde7a8; color: #6b4a00; }
.docs-note-ok { background: #ecfdf3; border-color: #bbf0d0; color: #14532d; }
.docs-note > :last-child { margin-bottom: 0; }
.docs-note strong { font-weight: 700; }

.docs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 16px 0; }
.docs-card { border: 1px solid var(--d-line); border-radius: 14px; padding: 14px 16px; background: #fff; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.docs-card:hover { border-color: #c9b8ff; transform: translateY(-1px); }
.docs-card strong { display: block; margin-bottom: 2px; }
.docs-card span { font-size: .85rem; color: var(--d-muted); }
.docs-key { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px dashed #c9b8ff; margin: 16px 0; }
.docs-key code { font-size: 1rem !important; }

.docs-parts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; padding: 0; list-style: none; }
.docs-parts li { margin: 0; }

/* Živé ukázky */
.docs-live { border: 1px solid var(--d-line); border-radius: 16px; background: #fff; margin: 18px 0 22px; overflow: hidden; }
.docs-live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--d-line); background: var(--d-soft); font-size: .85rem; }
.docs-live-head strong { display: inline-flex; align-items: center; gap: 8px; }
.docs-live-head strong::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.docs-live-body { padding: 16px; }
.docs-btn { border: 1px solid var(--d-line); background: #fff; border-radius: 8px; padding: 5px 12px; font: 600 .8rem/1.2 Inter, sans-serif; cursor: pointer; color: var(--d-ink); }
.docs-btn:hover { border-color: var(--d-brand); color: var(--d-brand); }
.docs-btn[aria-pressed="true"] { background: var(--d-brand); border-color: var(--d-brand); color: #fff; }
.docs-log { list-style: none; margin: 0; padding: 10px 14px; max-height: 220px; overflow: auto; background: var(--d-code-bg); color: var(--d-code-ink);
    font: .8rem/1.55 ui-monospace, Consolas, monospace; border-top: 1px solid var(--d-line); }
.docs-log li { padding: 2px 0; border-bottom: 1px dashed rgba(255, 255, 255, .08); white-space: pre-wrap; word-break: break-word; }
.docs-log li b { color: #f0abfc; font-weight: 600; }
.docs-log .docs-log-empty { color: #8f8ab8; border: 0; }

/* Ukázkový „vlastní styl“ (sekce Vzhled) — aktivní po přepnutí tlačítkem. */
.docs-styled [data-reserveit] {
    --rit-primary: #e11d48; --rit-primary-2: #f97316; --rit-radius: 0px; --rit-font: Georgia, serif;
}
.docs-styled [data-reserveit]::part(button-primary) { text-transform: uppercase; letter-spacing: .06em; }
.docs-styled [data-reserveit]::part(slot-selected) { outline: 2px solid #111; outline-offset: 2px; }
.docs-styled [data-reserveit]::part(title) { font-style: italic; }

@media (max-width: 1100px) {
    .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .docs-toc { display: none; }
    .docs-toc-mobile { display: block; margin: 0 0 22px; border: 1px solid var(--d-line); border-radius: 12px; background: #fff; }
    .docs-toc-mobile summary { cursor: pointer; padding: 10px 14px; font-weight: 600; }
    .docs-toc-mobile ol { margin: 0; padding: 0 14px 12px 32px; }
}

/* ── Veřejná verze (bez administrace) ─────────────────────────────── */
.docs-public { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #fbfbfe; color: #1c1d26; }
.docs-public * { box-sizing: border-box; }
.docs-topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid #e6e8ef; }
.docs-topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, #4318ee, #ff3dbf); opacity: .5; }
.docs-topbar-inner { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.docs-topbar a { color: #3b4152; text-decoration: none; font-weight: 500; font-size: .92rem; }
.docs-topbar a:hover { color: #5b21e6; }
.docs-topbar .docs-brand { display: inline-flex; align-items: center; gap: 8px; font: 800 1.2rem/1 Montserrat, sans-serif; color: #1c1d26; letter-spacing: -.03em; }
.docs-topbar .docs-brand img { width: 28px; height: 28px; }
.docs-topbar .docs-brand small { font: 600 .78rem/1 Inter, sans-serif; color: #6b7280; letter-spacing: 0; margin-left: 4px; padding-left: 10px; border-left: 1px solid #e6e8ef; }
.docs-topbar nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.docs-topbar .docs-cta { color: #fff !important; background: linear-gradient(90deg, #4318ee 0%, #6d1fe0 55%, #b8169a 100%); padding: 8px 16px; border-radius: 10px; }
.docs-hero { max-width: 1240px; margin: 0 auto; padding: 44px 20px 18px; }
.docs-hero h1 { font: 800 clamp(1.9rem, 1.3rem + 2vw, 2.6rem)/1.15 Montserrat, Inter, sans-serif; letter-spacing: -.03em; margin: 0 0 10px; }
.docs-hero h1 span { background: linear-gradient(90deg, #4318ee, #ff3dbf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.docs-hero p { margin: 0; color: #4b5163; font-size: 1.08rem; max-width: 760px; }
.docs-public .docs-wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 64px; }
.docs-public .docs-toc { top: 78px; }
.docs-public-footer { border-top: 1px solid #e6e8ef; padding: 26px 20px; text-align: center; color: #6b7280; font-size: .86rem; }
.docs-public-footer a { color: inherit; }
@media (max-width: 640px) {
    .docs-topbar nav a:not(.docs-cta) { display: none; }
    .docs-topbar .docs-brand small { display: none; }
}

/* Pruh „Platby kartou zajišťuje GoPay“ pod patičkou (templates/_payment_badges.html.twig) */
.pay-badges { background: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 14px 16px; color: #4b4f63; font-size: .86rem; }
.pay-badges img { display: block; height: auto; }
.pay-badges-sep { width: 1px; height: 26px; background: #e3e5ee; }

/* Odkazy na právní stránky v patičce (templates/legal/_footer_links.html.twig) */
.legal-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; font-weight: 600; }
.legal-footer-links a { text-decoration: none; }
.legal-footer-links a:hover { text-decoration: underline; }
