/*
 * Souhlas s cookies (v1.4.0) — lišta, blokovaný obsah, odkaz v patičce.
 * Tokeny (--u-*) pocházejí z harmonizace.css. Lišta je position: fixed,
 * takže nijak neposouvá obsah (žádný CLS).
 */

.unipa-consent[hidden],
.unipa-consent__details[hidden],
.unipa-consent__actions [hidden] { display: none !important; }

.unipa-consent {
  position: fixed;
  z-index: 100000; /* nad popupem (99999) */
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 .75rem .75rem;
  pointer-events: none;
}
.unipa-consent:focus { outline: none; }

.unipa-consent__panel {
  pointer-events: auto;
  max-width: 44rem;
  max-height: 80vh;
  max-height: 80dvh;
  overflow-y: auto;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1rem;
  background: #fff;
  color: var(--u-ink, #1f2328);
  border: 1px solid var(--u-line, #dcdfe3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .22);
  font-family: "DM Sans", sans-serif;
  font-size: .9375rem;
  line-height: 1.5;
}
.unipa-consent:focus-visible .unipa-consent__panel,
.unipa-consent__panel:focus-within { outline: 0; }

.unipa-consent__title {
  margin: 0 0 .5rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--u-ink, #1f2328);
}
.unipa-consent__text { margin: 0 0 1rem; }
.unipa-consent__text a { color: var(--u-orange-ink, #bd4118); text-decoration: underline; }

.unipa-consent__details { margin: 0 0 1rem; border-top: 1px solid var(--u-line, #dcdfe3); }
.unipa-consent__cat { margin: 0; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--u-line, #dcdfe3); }
.unipa-consent__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.unipa-consent__cat-label { font-weight: 600; margin: 0; }
.unipa-consent__cat-desc { margin: .25rem 0 0; color: var(--u-ink-2, #4b5563); font-size: .875rem; }
.unipa-consent__cat-services { margin: .25rem 0 0; font-size: .8125rem; color: var(--u-ink-2, #4b5563); }

/* Přepínač: nativní checkbox s vizuálem slideru (plně přístupný z klávesnice) */
.unipa-consent__switch {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  border-radius: 999px;
  background: #6b7280;
  cursor: pointer;
  transition: background-color .15s ease;
}
.unipa-consent__switch::after {
  content: "";
  position: absolute;
  top: .1875rem;
  left: .1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.unipa-consent__switch:checked { background: var(--u-green, #2f6f3e); }
.unipa-consent__switch:checked::after { transform: translateX(1.25rem); }
.unipa-consent__switch:disabled { opacity: .6; cursor: not-allowed; }
.unipa-consent__switch:focus-visible { outline: 3px solid var(--u-orange-ink, #bd4118); outline-offset: 2px; }

.unipa-consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.unipa-consent__actions .btn { flex: 1 1 9rem; }

@media (max-width: 575.98px) {
  .unipa-consent { padding: 0; }
  .unipa-consent__panel { border-radius: 12px 12px 0 0; max-height: 75vh; max-height: 75dvh; }
  .unipa-consent__actions .btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .unipa-consent__switch,
  .unipa-consent__switch::after { transition: none; }
}

/* Blokovaný vložený obsah (iframe do souhlasu) */
.unipa-consent-embed {
  position: relative;
  width: 100%;
  background: #f3f4f6;
  border: 1px solid var(--u-line, #dcdfe3);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 1rem;
}
.ratio > .unipa-consent-embed { aspect-ratio: auto !important; }
.unipa-consent-embed--auto { min-height: 14rem; }
.unipa-consent-embed--auto .unipa-consent-embed__box { position: static; min-height: 14rem; }
.unipa-consent-embed__box {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem;
  text-align: center;
  overflow-y: auto;
  font-size: .9375rem;
}
.unipa-consent-embed__title { margin: 0; font-weight: 600; }
.unipa-consent-embed__text { margin: 0; max-width: 32rem; color: var(--u-ink-2, #4b5563); font-size: .875rem; }
.unipa-consent-embed__text a,
.unipa-consent-embed__link { color: var(--u-orange-ink, #bd4118); text-decoration: underline; }
.unipa-consent-embed__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.unipa-consent-embed__link { font-size: .875rem; }

/* Odkaz „Nastavení cookies“ — vzhled textového odkazu (patička, zásady) */
.unipa-consent-open:not(.btn) {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.unipa-consent-open:not(.btn):hover { text-decoration: none; }

/* Odkaz v patičce: samostatně vpravo, čitelně (na mobilu pod copyrightem, na střed jako ostatní text patičky) */
.unipa-consent-open--footer { font-weight: 600; font-size: 1rem; }
@media (max-width: 991.98px) {
  .kredity .im { text-align: center; }
}
