/* evapolackova.cz - cookie consent bar (static/js/souhlas.js). Loaded only when measurement is switched on
   (content/site.json "mereni.gtm_id"), so the site without measurement is byte for byte unchanged.
   Look of Lucie Sykorova (site.css): white ground, black text, gold line and gold button frame, the site's
   tokens (--bg, --fg, --gold, --gold-d, --gold-soft, --font-body, --track) and its .btn. Both choices share one
   class and look the same (ÚOOÚ: refusing must be as easy and as visible as accepting). Fixed to the bottom:
   no layout shift; the safe-area insets keep it clear of the iPhone home indicator (viewport-fit=cover is set in
   base.html). While it is shown, souhlas.js gives body a bottom padding and the root a scroll-padding of the bar's
   height, so the footer can be scrolled above it and focused elements are never hidden under it. z-index 50: over
   the navigation (20), under the gallery lightbox (60). */

.souhlas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); border-top: 2px solid var(--gold); box-shadow: 0 -8px 28px rgba(0, 0, 0, .14);
  box-sizing: border-box;  /* max-height below then counts padding and border: the bar is at most 85 % of the screen */
  max-height: 85vh; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px max(20px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.souhlas[hidden] { display: none; }
/* reopened from the footer, the bar itself takes focus (tabindex=-1): a ring only for keyboard users */
.souhlas:focus { outline: none; }
.souhlas:focus-visible { outline: 2px solid var(--gold-d); outline-offset: -4px; }
.souhlas__in { max-width: var(--track); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.souhlas p { margin: 0; }
.souhlas__text { font-size: 15px; line-height: 1.6; font-weight: 400; }
.souhlas__text p + p { margin-top: .35em; }
.souhlas__nadpis { font-weight: 700; font-size: 17px; line-height: 1.35; }
.souhlas__vice { margin-top: .5em; font-size: 14px; line-height: 1.6; }
/* the native disclosure marker disappears with display:inline-block (and differs in Safari), so the triangle is
   drawn here: a CSS border triangle in the text colour, pointing right while closed and down while open;
   inline-block keeps the underline of the summary text off it */
.souhlas__vice summary { cursor: pointer; display: inline-block; list-style: none; padding: 4px 0; min-height: 24px;
  text-decoration: underline; text-underline-offset: 3px; }
.souhlas__vice summary::-webkit-details-marker { display: none; }
.souhlas__vice summary::before { content: ""; display: inline-block; width: 0; height: 0; margin-right: .5em;
  vertical-align: .08em; border-style: solid; border-width: .32em 0 .32em .5em;
  border-color: transparent transparent transparent currentColor; transition: transform .15s ease; }
.souhlas__vice[open] summary::before { transform: rotate(90deg); }
.souhlas__vice summary:hover, .souhlas__vice a:hover { color: var(--gold-d); }
.souhlas__vice summary:focus-visible, .souhlas__vice a:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 2px; }
.souhlas__vice ul { margin: .4em 0 .5em; padding-left: 1.2em; }
.souhlas__vice li + li { margin-top: .25em; }
.souhlas__vice a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.souhlas__volba { display: flex; gap: 12px; }
/* .btn of site.css is an <a>-style frame (gold line, radius, letter-spacing): on a <button> it needs its own
   ground, font and cursor; hover keeps the text black (white on gold is too faint for text) */
.souhlas__btn { flex: 1 1 0; min-width: 0; height: 48px; padding: 0 18px; border-radius: 16px; background: var(--bg);
  color: var(--fg); font-family: var(--font-body); font-size: 15px; font-weight: 600; cursor: pointer; }
.souhlas__btn:hover { background: var(--gold-soft); color: var(--fg); }
.souhlas__btn:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 3px; }
@media (min-width: 720px) {
  .souhlas { padding-top: 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .souhlas__in { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .souhlas__text { flex: 1 1 auto; max-width: 760px; }
  .souhlas__volba { flex: 0 0 auto; }
  .souhlas__btn { flex: 0 0 auto; min-width: 150px; }
}
@media (max-width: 980px) {
  /* the open mobile menu (.site-nav.open, static/js/site.js) is a fixed layer from the top: the bar must not
     cover its last items; it comes back when the menu closes */
  body:has(.site-nav.open) .souhlas { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .souhlas__vice summary::before { transition: none; }
}
@media print { .souhlas { display: none; } }

/* after the first choice souhlas.js may move focus to <main> (temporary tabindex=-1): no ring around the content */
main[tabindex="-1"]:focus { outline: none; }

/* "Nastavení cookies" reopens the bar (shown by souhlas.js; without JS there is nothing to set): in the footer
   (dark, next to the copyright) and under the list of the podcast page (light) */
.souhlas-paticka[hidden] { display: none; }
.foot-bottom .souhlas-paticka { margin-right: auto; }
.souhlas-paticka--strana { margin: 0; padding: 0 16px 40px; text-align: center; font-size: 14px; color: var(--muted); }
.souhlas-nastaveni { background: none; border: 0; padding: 4px 0; min-height: 24px; font: inherit; color: inherit;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.souhlas-nastaveni[hidden] { display: none; }
.foot-bottom .souhlas-nastaveni:hover { color: #ba9b6d; }
.souhlas-paticka--strana .souhlas-nastaveni:hover { color: var(--gold-d); }
.site-foot .souhlas-nastaveni:focus-visible { outline: 2px solid #ba9b6d; outline-offset: 3px; }
.souhlas-paticka--strana .souhlas-nastaveni:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 3px; }
