/*
 * Consent banner + floating cookie button (includes/tracking.php, assets/tracking.js).
 * Loaded only when a GTM ID is set. Consumes --hv-* / --cf-font-family--* tokens with standalone fallbacks.
 * "Přijmout vše" and "Jen nezbytné" share one style on purpose: rejecting must be as easy as accepting.
 */

.hv-consent {
  position: fixed;
  z-index: 9990;
  inset: auto var(--hv-space-m, 1rem) var(--hv-space-m, 1rem) auto;
  width: min(480px, calc(100% - 2 * var(--hv-space-m, 1rem))); /* px: the site uses a 62.5% (10px) rem baseline */
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--hv-bg-primary, #F5F2ED);
  color: var(--hv-text-primary, hsla(193, 9%, 19%, 1));
  border: 1px solid var(--hv-border-primary, rgba(121, 140, 115, .2));
  border-radius: var(--hv-radius-l, 16px);
  box-shadow: var(--hv-shadow-xl, 0 16px 48px rgba(23, 33, 54, .24));
  font-family: var(--cf-font-family--mulish, 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}
.hv-consent[hidden] { display: none; }
.hv-consent *, .hv-consent *::before, .hv-consent *::after { box-sizing: border-box; }

.hv-consent .hv-consent__inner { display: grid; gap: var(--hv-space-s, .75rem); padding: var(--hv-card-space, 1.25rem); }
.hv-consent .hv-consent__title {
  margin: 0;
  font-family: var(--cf-font-family--lora, 'Lora', Georgia, serif);
  font-size: var(--hv-text-l, 1.125rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--hv-text-heading, hsla(221, 47%, 21%, 1));
}
.hv-consent .hv-consent__text { margin: 0; font-size: var(--hv-text-s, .9rem); line-height: 1.55; color: var(--hv-text-secondary, #5b6470); }
.hv-consent .hv-consent__text a { color: var(--hv-teal, #3f7a80); text-decoration: underline; text-underline-offset: 3px; }
.hv-consent .hv-consent__text a:hover { color: var(--hv-navy, hsla(221, 47%, 20%, 1)); }
.hv-consent .hv-consent__text a:focus-visible { outline: 2px solid var(--hv-border-focus, #5a8c90); outline-offset: 2px; }

.hv-consent .hv-consent__fieldset { display: grid; gap: var(--hv-space-xs, .5rem); margin: 0; padding: 0; border: 0; }
.hv-consent .hv-consent__sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hv-consent .hv-consent__opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--hv-space-s, .75rem);
  align-items: start;
  padding: var(--hv-space-s, .75rem);
  border: 1px solid var(--hv-border-secondary, rgba(121, 140, 115, .12));
  border-radius: var(--hv-radius-m, 12px);
  background: var(--hv-bg-sand, #E8E0D4);
  font-size: var(--hv-text-s, .9rem);
  line-height: 1.45;
  cursor: pointer;
}
.hv-consent .hv-consent__opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--hv-olive, hsla(106, 23%, 33%, 1)); }
.hv-consent .hv-consent__opt input:disabled { opacity: .7; }
.hv-consent .hv-consent__opt strong { display: block; color: var(--hv-text-heading, hsla(221, 47%, 21%, 1)); }
.hv-consent .hv-consent__opt:has(input:focus-visible) { outline: 2px solid var(--hv-border-focus, #5a8c90); outline-offset: 2px; }

.hv-consent .hv-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hv-space-xs, .5rem); }
.hv-consent .hv-consent__actions [data-consent="prefs"],
.hv-consent .hv-consent__actions [data-consent="save"] { grid-column: 1 / -1; }
.hv-consent .hv-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: var(--hv-btn-space, .7rem 1.4rem);
  border: 1px solid var(--hv-navy, hsla(221, 47%, 20%, 1));
  border-radius: var(--hv-radius-s, 8px);
  background: var(--hv-navy, hsla(221, 47%, 20%, 1));
  color: var(--hv-text-inverse, #F5F2ED);
  font-family: inherit;
  font-size: var(--hv-text-s, .9rem);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.hv-consent .hv-consent__btn:hover { opacity: .9; }
.hv-consent .hv-consent__btn:active { transform: translateY(1px); }
.hv-consent .hv-consent__btn:focus-visible { outline: 2px solid var(--hv-border-focus, #5a8c90); outline-offset: 2px; }
.hv-consent .hv-consent__btn--ghost { background: transparent; border-color: var(--hv-border-accent, hsla(106, 23%, 33%, 1)); color: var(--hv-olive, hsla(106, 23%, 33%, 1)); }
.hv-consent .hv-consent__btn--ghost:hover { background: var(--hv-olive, hsla(106, 23%, 33%, 1)); color: var(--hv-text-inverse, #F5F2ED); opacity: 1; }

.hv-consent-open { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: start; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hv-consent-open:hover { color: var(--hv-teal, #3f7a80); }
.hv-consent-open:focus-visible { outline: 2px solid var(--hv-border-focus, #5a8c90); outline-offset: 2px; }

@media (max-width: 479px) {
  .hv-consent { inset: auto 0 0 0; width: 100%; max-height: 85dvh; border-width: 1px 0 0; border-radius: var(--hv-radius-l, 16px) var(--hv-radius-l, 16px) 0 0; }
  .hv-consent .hv-consent__inner { padding: var(--hv-space-m, 1rem) var(--hv-space-m, 1rem) calc(var(--hv-space-m, 1rem) + env(safe-area-inset-bottom)); }
  .hv-consent .hv-consent__actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .hv-consent:not([hidden]) { animation: hv-consent-in .2s ease-out; }
  @keyframes hv-consent-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* Floating cookie button (bottom right; hidden while the banner is open). Bottom left is taken by the site search button. */
.hv-consent-fab {
  position: fixed;
  z-index: 9980;
  right: var(--hv-space-m, 1rem);
  bottom: calc(var(--hv-space-m, 1rem) + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hv-border-primary, rgba(121, 140, 115, .2));
  border-radius: 50%;
  background: var(--hv-bg-primary, #F5F2ED);
  color: var(--hv-navy, hsla(221, 47%, 20%, 1));
  box-shadow: var(--hv-shadow-m, 0 6px 18px rgba(23, 33, 54, .16));
  cursor: pointer;
  opacity: .9;
  transition: opacity .15s ease, transform .15s ease;
}
.hv-consent-fab:hover { opacity: 1; transform: translateY(-1px); color: var(--hv-olive, hsla(106, 23%, 33%, 1)); }
.hv-consent-fab:active { transform: translateY(0); }
.hv-consent-fab:focus-visible { outline: 2px solid var(--hv-border-focus, #5a8c90); outline-offset: 2px; opacity: 1; }
.hv-consent-fab[hidden] { display: none; }
.hv-consent-fab svg { width: 22px; height: 22px; }
@media (max-width: 479px) { .hv-consent-fab { width: 40px; height: 40px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .hv-consent-fab { transition: none; } }
/* [hidden] inside the banner: declared last so it beats the display rules of the classes above (no !important). */
.hv-consent .hv-consent__prefs[hidden],
.hv-consent .hv-consent__btn[hidden] { display: none; }

@media print { .hv-consent, .hv-consent-fab { display: none; } }
