/* Reusable components. Rendered together at /?knk-styleguide (local only). */

/* ── Buttons ───────────────────────────────────────────────────────────────
   fig: pill 39px high, Inter Bold 16, yellow on black text.
   Make: black "Koupit kurz" with yellow text. One shape everywhere: the pill (full-width buttons too, 10. 10. 2026). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0.625rem 1.375rem;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn--yellow { background: var(--c-yellow); color: var(--c-ink); }
.btn--yellow:hover { background: var(--c-yellow-hover); }
.btn--black { background: var(--c-black); color: var(--c-yellow); }
.btn--black:hover { background: #262626; }
.btn--white { background: var(--c-white); color: var(--c-ink); }
.btn--outline { background: transparent; border-color: currentColor; }
.btn--outline:hover { background: var(--c-ink); color: var(--c-white); border-color: var(--c-ink); }
.btn--ghost { background: transparent; padding-inline: 0; min-height: 0; text-decoration: underline; text-underline-offset: 0.2em; }

.btn--sm { min-height: 36px; padding: 0.4rem 1rem; font-size: var(--fs-small); }
@media (pointer: coarse) { .btn--sm { min-height: 44px; } } /* touch target */
.btn--lg { min-height: 56px; padding: 0.9rem 1.75rem; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* ── Eyebrow (fig: "VYBERTE SI", "KURZY VAŘENÍ V PRAZE") ─────────────────── */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--s-3);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.eyebrow--pill { padding: 0.5rem 1.125rem; border-radius: var(--r-pill); background: rgb(0 0 0 / 0.35); color: var(--c-white); }

.display { font-family: var(--font-heading); font-size: var(--fs-display); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
h2.display { font-size: var(--fs-section); } /* a section title never outsizes the page's H1 */
.lead { font-size: var(--fs-lead); color: var(--c-text-muted); }
.muted { color: var(--c-text-muted); }

/* ── Badges & chips ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.badge--yellow { background: var(--c-yellow); color: var(--c-ink); }
.badge--black { background: var(--c-black); color: var(--c-yellow); }
.badge--alert { background: var(--c-alert); color: var(--c-white); }
.badge--muted { background: rgb(0 0 0 / 0.75); color: var(--c-white); }
.badge .icon { width: 1.1em; height: 1.1em; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-white);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}
.chip:hover, .chip.is-active { background: var(--c-yellow); border-color: var(--c-yellow); }

/* ── Rating ───────────────────────────────────────────────────────────────── */
.rating { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); }
.rating--text { color: var(--c-text-muted); text-decoration: underline; text-underline-offset: 0.15em; }
.rating--text:hover { color: var(--c-ink); }
.rating__stars { display: inline-flex; gap: 1px; color: var(--c-yellow); }
.rating__stars .icon { width: 14px; height: 14px; fill: currentColor; stroke: #d9b92f; stroke-width: 1; }
.rating__stars .icon.is-empty { fill: none; stroke: var(--c-grey-400); }
.rating__value { font-weight: 700; }
.rating__count { color: var(--c-text-subtle); }
.card__rating-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); color: inherit; text-decoration: none; }
.card__rating-link:hover .rating--text { color: var(--c-ink); }
.card__new { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 2px 8px; border-radius: var(--r-pill); background: var(--c-yellow-soft); font-size: var(--fs-xs); font-weight: 700; }
.card__new .icon { fill: var(--c-yellow); stroke: #d9b92f; }

/* ── Card (base for course, post and product cards) ──────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--c-white);
  box-shadow: 0 0 0 1px var(--c-border), var(--shadow-sm);
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.card:hover { box-shadow: 0 0 0 1px var(--c-border), var(--shadow-md); }
@media (min-width: 1024px) { .card { border-radius: var(--r-card-lg); } }
.card--featured { box-shadow: 0 0 0 2px var(--c-yellow), var(--shadow-md); }

.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--c-grey-300); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease); }
.card:hover .card__media img { transform: scale(1.03); }
.card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / 0.3), transparent 55%); pointer-events: none; }
.card__media:has(.card__placeholder)::after { display: none; } /* the gradient is for photos; over the cream illustration it reads as a grey smudge */
.card__badges { position: absolute; inset: var(--s-3) var(--s-3) auto var(--s-3); z-index: 1; display: flex; justify-content: space-between; gap: var(--s-2); }
.card__badges--bottom { inset: auto var(--s-3) var(--s-3) var(--s-3); }

.card__body { display: flex; flex-direction: column; flex: 1; gap: var(--s-2); padding: var(--s-4) var(--s-5) var(--s-5); }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.card__title { margin: 0; font-size: 1.25rem; line-height: 1.2; text-wrap: pretty; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; } /* pretty, not the headings' balance: fill the line before wrapping */
.card__title a { text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; z-index: 0; } /* whole card clickable */
.card__price { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.card__subtitle { margin: 0; color: var(--c-text-subtle); font-size: var(--fs-small); }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin: 0; padding: 0; list-style: none; color: var(--c-text-muted); font-size: var(--fs-small); }
.card__meta li { display: inline-flex; align-items: center; gap: 0.35em; }
.card__meta .icon { width: 15px; height: 15px; }
.card__footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: var(--s-4); border-top: 1px solid var(--c-grey-200); }
.card__footer .btn { flex: 1; }
.spots { font-size: var(--fs-xs); font-weight: 700; color: var(--c-text-subtle); white-space: nowrap; }
.spots--low { color: var(--c-alert); }
.spots--off { color: var(--c-text-subtle); } /* sold out / phone only: not urgent, just unavailable */
.card__footer .spots--group { flex: 0 0 auto; max-width: 9.5em; white-space: normal; text-align: right; line-height: 1.3; } /* "Malá skupina: max. 3 účastníci" wraps next to the button */

/* Card grid (courses, posts, related). Named after its first use; shared by all card lists. */
.course-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .course-grid { gap: var(--s-8); grid-template-columns: repeat(3, 1fr); } }
.course-grid__item { display: contents; }
.card__placeholder { object-fit: contain !important; padding: 12%; background: var(--c-cream); }

/* Breadcrumbs (course hero, articles). */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-4); padding: 0; list-style: none; font-size: var(--fs-small); opacity: 0.85; }
.breadcrumbs li + li::before { content: '›'; margin-right: var(--s-2); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { display: none; }

/* ── Info block (Make: 3px yellow left border) ───────────────────────────── */
.info-block { padding-left: var(--s-4); border-left: 3px solid var(--c-yellow); }
.info-block__title { margin-bottom: var(--s-2); font-size: var(--fs-h4); }
.info-block p:last-child { margin-bottom: 0; }

.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.check-list li { display: flex; gap: var(--s-2); align-items: flex-start; }
.check-list .icon { width: 18px; height: 18px; margin-top: 0.2em; color: var(--c-ink); background: var(--c-yellow); border-radius: 50%; padding: 3px; stroke-width: 3; }

/* ── Facts (pro koho, délka, místo, …) ───────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-4); margin: 0; }
.fact { position: relative; padding-left: calc(20px + var(--s-2)); }
.fact .icon { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; }
.fact dt { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-text-subtle); }
.fact dd { margin: 0; font-weight: 500; line-height: 1.3; }

/* ── Benefit strip (fig: yellow bar with icons) ──────────────────────────── */
.benefits { background: var(--c-yellow); }
.benefits__list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-10); margin: 0; padding: var(--s-4) 0; list-style: none; }
.benefits__list li { display: inline-flex; align-items: center; gap: var(--s-3); font-weight: 700; font-size: var(--fs-small); letter-spacing: 0.03em; text-transform: uppercase; }
.benefits__list .icon { width: 28px; height: 28px; }
@media (min-width: 768px) { .benefits__list li { font-size: var(--fs-body); } }
@media (max-width: 767.98px) { .benefits__list { column-gap: var(--s-5); } }

/* ── Callout (gift CTA, notices) ─────────────────────────────────────────── */
.callout { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-5); border-radius: var(--r-card); background: var(--c-yellow); }
.callout__icon { flex-shrink: 0; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c-white); }
.callout .callout__title { margin: 0 0 var(--s-1); font-family: var(--font-heading); font-size: var(--fs-h4); font-weight: 700; }
.callout p { margin: 0 0 var(--s-3); font-size: var(--fs-small); }

.notice { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--c-grey-100); }
.notice--success { background: #e8f5ec; }
.notice--error { background: #fdecec; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { display: grid; gap: var(--s-1); margin-bottom: var(--s-4); }
.field label, label.field__label { font-size: var(--fs-small); font-weight: 600; }
input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='password'], input[type='number'], input[type='url'], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d4d4d4;
  border-radius: var(--r-md);
  background: var(--c-white);
  font-size: 1rem; /* ≥16px avoids iOS zoom */
  line-height: 1.3;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-ink); box-shadow: 0 0 0 3px var(--c-yellow); }
input[type='checkbox'], input[type='radio'] { width: 1.15rem; height: 1.15rem; accent-color: var(--c-ink); }

.inline-form { display: flex; gap: var(--s-2); }
.inline-form input { flex: 1; min-width: 0; }

.search-form { display: flex; gap: var(--s-2); }
.search-form label { flex: 1; }
.search-form .search-field { width: 100%; }

/* ── Accordion (FAQ) ─────────────────────────────────────────────────────── */
.accordion { border-top: 1px solid var(--c-grey-200); }
.accordion details { border-bottom: 1px solid var(--c-grey-200); }
.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; font-weight: 600; cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .icon { transition: transform var(--t-fast) var(--ease); color: var(--c-text-subtle); }
.accordion details[open] summary .icon { transform: rotate(45deg); }
.accordion__content { padding-bottom: var(--s-4); color: var(--c-text); } /* answers are the content, not meta text */
.faq-cta { margin-top: var(--s-10); padding: var(--s-6); border-radius: var(--r-card); background: var(--c-yellow-soft); }
.faq-cta > p { margin: 0 0 var(--s-3); }
.faq-cta > p:last-child { margin: 0; }
.prose .faq-cta__title { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: 700; }
.prose .faq-cta .btn { text-decoration: none; }

/* ── Prose: long-form content (posts, recipes, pages) ────────────────────── */
.prose { max-width: var(--container-narrow); font-size: 1.0625rem; }
.prose > * + * { margin-top: 0; }
.prose h2 { margin-top: var(--s-10); }
.prose h3 { margin-top: var(--s-8); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--s-1); }
.prose ul li::marker { color: var(--c-yellow-deep); }
.prose img, .prose figure { border-radius: var(--r-card); }
.prose blockquote { margin-inline: 0; padding: var(--s-2) 0 var(--s-2) var(--s-5); border-left: 3px solid var(--c-yellow); font-family: var(--font-heading); font-size: 1.25rem; }
/* The withdrawal form in the terms is a form to copy, not a quote: body font on a grey card. */
.prose #formular ~ blockquote { padding: var(--s-5) var(--s-6); border: 1px dashed var(--c-grey-400); border-radius: var(--r-card); background: var(--c-surface-alt); font-family: var(--font-body); font-size: var(--fs-body); }
/* "Obsah" of long pages (knk_page_toc) */
.page-toc { margin: var(--s-6) 0 var(--s-8); padding: var(--s-5) var(--s-6); border-radius: var(--r-card); background: var(--c-surface-alt); }
.page-toc__title { margin: 0 0 var(--s-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-text-muted); }
.prose .page-toc__list { margin: 0; padding: 0; list-style: none; columns: 2 16rem; column-gap: var(--s-8); } /* the terms number their headings themselves */
.prose .page-toc__list li { margin: 0 0 var(--s-1); break-inside: avoid; }
.prose h2[id] { scroll-margin-top: calc(var(--header-h) + var(--s-4)); }
.prose a { text-decoration-color: var(--c-yellow-deep); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.prose a:hover { text-decoration-color: currentColor; }
.prose mark { padding: 0 .2em; border-radius: 4px; background: var(--c-yellow); color: var(--c-black); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.prose th, .prose td { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
/* Wide tables in content (e.g. GDPR purposes) become one card per row on phones; cells carry data-label. */
@media (max-width: 699.98px) {
	.prose .table--stack, .prose .table--stack tbody, .prose .table--stack tr, .prose .table--stack td { display: block; }
	.prose .table--stack thead { display: none; }
	.prose .table--stack tr { margin-bottom: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-card); background: var(--c-surface-alt); }
	.prose .table--stack td { padding: var(--s-1) 0; border: 0; }
	.prose .table--stack td::before { content: attr(data-label); display: block; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; color: var(--c-text-subtle); }
}

/* ── Illustration decoration ─────────────────────────────────────────────── */
.illustration { pointer-events: none; user-select: none; }
