/*
 * nakupujvcine.cz: site-level additions on top of zakra-child/style.css + hub-page.css.
 * Colours come from the --nv-* variables (brand kit tokens). Prefixed classes only (ad-block lists).
 */

/* Ad units. Google marks a unit it could not fill with data-ad-status="unfilled"; its documented way to
   remove the reserved space is to hide that unit. Filled and still-loading units keep their place. */
ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.code-block:has(> ins.adsbygoogle[data-ad-status="unfilled"]) { margin: 0 !important; display: none; }

/* The unit above the content sits directly in <body>: align it with the page column instead of the window edge. */
body > .code-block { max-width: var(--nv-max-width); margin: 16px auto 0 !important; padding: 0 32px; }
body.page > .code-block { max-width: 860px; padding: 0 24px; }

/* Category hubs: the lead card spans the whole row, so the unit before it takes a row too instead of one lonely cell. */
.nv-articles-grid:has(> .nv-card-featured) > .code-block { grid-column: 1 / -1; }

/* ------------------------------------------------ standalone pages */
.nv-page { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.nv-page .nv-breadcrumb { padding: 20px 0 8px; }
.nv-page-header { margin: 8px 0 24px; }
.nv-page-header .nv-article-title { margin-bottom: 0 !important; }
.nv-page-lead { margin: 14px 0 0; font-size: 1.15rem; line-height: 1.7; color: var(--nv-text-secondary); }
.nv-page .nv-article-body { padding: 44px !important; font-size: 1.08rem; line-height: 1.8; overflow-wrap: break-word; }
.nv-page .nv-article-body > :first-child { margin-top: 0 !important; }
.nv-page .nv-article-body > :last-child { margin-bottom: 0 !important; }
.nv-page .nv-article-body h2 { font-size: 1.5rem !important; }
.nv-page .nv-article-body a { text-decoration: underline; text-underline-offset: 2px; }
.nv-note { margin: 24px 0; padding: 18px 22px; border-radius: var(--nv-radius); background: var(--nv-primary-bg); border: 1px solid #dbe4ff; }
.nv-note > :last-child { margin-bottom: 0 !important; }
.nv-note-warn { background: var(--nv-accent-light); border-color: #ffd8a8; }
.nv-updated { font-size: 0.95rem; color: var(--nv-text-secondary); }
.nv-table-scroll { overflow-x: auto; }
.nv-page .nv-article-body .nv-table-scroll table { margin: 20px 0; }

/* link cards (guide pages) */
.nv-page .nv-article-body ul.nv-link-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.nv-page .nv-article-body ul.nv-link-cards li { margin: 0; }
.nv-page .nv-article-body ul.nv-link-cards a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--nv-border); border-radius: var(--nv-radius); background: var(--nv-white); text-decoration: none; color: var(--nv-dark); font-weight: 600; line-height: 1.4; transition: border-color .2s, background .2s; }
.nv-page .nv-article-body ul.nv-link-cards a:hover { border-color: var(--nv-primary); background: var(--nv-primary-bg); }
.nv-page .nv-article-body ul.nv-link-cards a span { display: block; margin-top: 6px; font-weight: 400; font-size: 0.93rem; color: var(--nv-text-secondary); }

.nv-glossary dt { font-weight: 700; color: var(--nv-dark); margin-top: 22px; scroll-margin-top: 96px; }
.nv-glossary dd { margin: 6px 0 0; }

/* ------------------------------------------------ article breadcrumb */
.nv-breadcrumb.nv-container .nv-breadcrumb-current { margin: 0; color: var(--nv-text); }

/* ------------------------------------------------ footer */
.nv-footer .nv-footer-section h3 { color: #fff !important; }
.nv-footer .nv-footer-links a { color: rgba(255, 255, 255, 0.72); }
.nv-footer .nv-footer-links a:hover { color: #fff; }
.nv-footer-note { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 22px 0 0; font-size: 0.88rem; line-height: 1.6; color: rgba(255, 255, 255, 0.66); }
.nv-footer-note a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.nv-footer-note + .nv-footer-bottom { border-top: 0; }
.nv-footer-legal { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; }

/* ------------------------------------------------ 404 + empty search: one centred column */
.nv-404, .nv-search-empty { max-width: 760px; margin-left: auto; margin-right: auto; }
.nv-404 .nv-search-box, .nv-search-empty .nv-search-box { margin-left: auto; margin-right: auto; }

@media (max-width: 768px) {
    body > .code-block, body.page > .code-block { padding: 0; }
    .nv-page { padding: 0 14px; }
    .nv-page .nv-article-body { padding: 24px 20px !important; font-size: 1.04rem; }
    .nv-page .nv-article-title { font-size: 1.9rem !important; }
    .nv-footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }

    /* Customs calculator: amounts never break ("49 K / č"). */
    body .nv-article-body .clo-results { overflow-wrap: normal; }
    body .nv-article-body .clo-result-row > :last-child { white-space: nowrap; flex-shrink: 0; padding-left: 8px; }

    /* A wide ad or card must not stretch the single column past the screen. */
    .nv-articles-grid { grid-template-columns: minmax(0, 1fr) !important; }

    /* Tables scroll sideways instead of breaking words and amounts mid-way ("30,0 / 0 €"). */
    body .nv-article-body table { display: block; max-width: 100%; overflow-x: auto; }
    body .nv-article-body th, body .nv-article-body td { overflow-wrap: normal; word-break: normal; hyphens: manual; padding: 10px 12px; font-size: 0.95rem; min-width: 92px; }
}
