/* Cookie lišta - vlastní CSS soubor (mimo scss/main.css), viz odkaz v index.php <head>.
   Třídy odpovídají markupu z knihovny/cookie-consent.php a chování v js/cookie-consent.js. */

.cookie-consent {
  font-family: 'Figtree', sans-serif;
}

/* ── Spodní lišta ───────────────────────────────────────── */
.cookie-consent__banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 3px solid var(--yellow);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, .14);
  padding: 22px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Stejná specificita jako výchozí [hidden]{display:none} prohlížeče, ale řadí se
   za .cookie-consent__banner - bez tohohle by "display: flex" výše hidden atribut
   z JS (banner.hidden = true po kliknutí) přebilo a lišta by nikdy nezmizela. */
.cookie-consent__banner[hidden] {
  display: none;
}

.cookie-consent__content h3 {
  font-size: 15px; font-weight: 800; color: var(--blue-dark);
  margin: 0 0 6px;
}

.cookie-consent__content p {
  font-size: 13px; color: var(--gray-mid); line-height: 1.6;
  margin: 0; max-width: 680px;
}

.cookie-consent__content a {
  color: var(--blue-mid); text-decoration: underline;
}
.cookie-consent__content a:hover { color: var(--blue-dark); }

.cookie-consent__actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; flex-wrap: wrap;
}

/* ── Tlačítka ───────────────────────────────────────────── */
.cookie-btn {
  font-family: inherit;
  border: none; cursor: pointer;
  border-radius: 3px;
  padding: 12px 20px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap;
  transition: filter .2s, background-color .2s, color .2s, border-color .2s;
}

.cookie-btn--primary {
  background: var(--blue-dark); color: var(--white);
}
.cookie-btn--primary:hover { filter: brightness(1.25); }

.cookie-btn--outline {
  background: transparent; color: var(--blue-dark);
  border: 1.5px solid var(--blue-dark);
  padding: 10.5px 20px;
}
.cookie-btn--outline:hover { background: var(--off); }

.cookie-btn--ghost {
  background: transparent; color: var(--gray-mid);
  text-decoration: underline; padding: 12px 4px;
}
.cookie-btn--ghost:hover { color: var(--blue-dark); }

/* ── Plovoucí tlačítko pro opětovné otevření nastavení ────── */
.cookie-consent__manage {
  position: fixed; left: 20px; bottom: 20px; z-index: 9998;
  background: var(--blue-dark); color: var(--white);
  border: none; cursor: pointer; border-radius: 999px;
  padding: 12px 20px;
  font-family: inherit; font-size: 12px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  transition: filter .2s;
}
.cookie-consent__manage:hover { filter: brightness(1.2); }

/* ── Modál s detailním nastavením ──────────────────────────── */
.cookie-consent__modal {
  position: fixed; inset: 0; z-index: 10000;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}

.cookie-consent__overlay {
  position: absolute; inset: 0;
  background: rgba(8, 44, 87, .55);
}

.cookie-consent__panel {
  position: relative;
  background: var(--white);
  border-radius: 8px;
  width: 100%; max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}

.cookie-consent__close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--off); color: var(--gray-mid);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s, color .2s;
}
.cookie-consent__close:hover { background: var(--gray-line); color: var(--blue-dark); }

.cookie-consent__panel h3 {
  font-size: 20px; font-weight: 800; color: var(--blue-dark);
  margin: 0 24px 12px 0;
}

.cookie-consent__modal-text {
  font-size: 13px; color: var(--gray-mid); line-height: 1.6;
  margin: 0 0 24px;
}

/* ── Kategorie cookies ──────────────────────────────────── */
.cookie-consent__categories {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 28px;
}

.cookie-consent__category {
  border: 1px solid var(--gray-line); border-radius: 6px;
  padding: 16px 18px;
}

.cookie-consent__category-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}

.cookie-consent__category-head h4 {
  font-size: 14px; font-weight: 800; color: var(--blue-dark);
  margin: 0 0 4px;
}

.cookie-consent__category-head p {
  font-size: 12.5px; color: var(--gray-mid); line-height: 1.55;
  margin: 0;
}

.cookie-consent__cookie-list {
  font-size: 11px; color: var(--gray-mid); font-style: italic;
  margin: 10px 0 0;
}

.cookie-consent__always-active {
  font-size: 11px; font-weight: 700; color: var(--blue-mid);
  text-transform: uppercase; letter-spacing: .04em;
  margin: 10px 0 0;
}

/* ── Přepínač (toggle switch) ──────────────────────────────── */
.cookie-switch {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0; width: 0; height: 0; position: absolute;
}

.cookie-switch__slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--gray-line); border-radius: 999px;
  transition: background-color .2s;
}

.cookie-switch__slider::before {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  transition: transform .2s;
}

.cookie-switch input:checked + .cookie-switch__slider {
  background: var(--blue-mid);
}
.cookie-switch input:checked + .cookie-switch__slider::before {
  transform: translateX(20px);
}

.cookie-switch input:disabled + .cookie-switch__slider {
  background: var(--yellow); cursor: not-allowed; opacity: .85;
}

.cookie-consent__modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}

/* Zamknout scroll stránky, když je modál otevřený (nastavuje JS) */
body.cookie-modal-open { overflow: hidden; }

/* ── Mobil ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .cookie-consent__banner {
    flex-direction: column; align-items: stretch;
    padding: 20px; gap: 16px;
  }
  .cookie-consent__content p { max-width: none; }
  .cookie-consent__actions { justify-content: stretch; }
  .cookie-consent__actions .cookie-btn { flex: 1; text-align: center; }
  .cookie-consent__manage { left: 16px; bottom: 16px; }
  .cookie-consent__panel { padding: 28px 20px 24px; }
  .cookie-consent__category-head { flex-wrap: wrap; }
}
