/* =============================================
   Souhlas s cookies – vzhled (společný pro saxokid.cz, vojtechsedlak.cz, na2ci.cz).
   Barvy a písmo web přepíše proměnnými v :root svého stylu.
   ============================================= */
:root {
  --cc-bg: #111;
  --cc-fg: #f2f2f2;
  --cc-muted: rgba(255, 255, 255, 0.72);
  --cc-border: rgba(255, 255, 255, 0.18);
  --cc-btn-bg: #fff;
  --cc-btn-fg: #111;
  --cc-accent: #fff;
  --cc-radius: 6px;
  --cc-font: inherit;
  --cc-placeholder-bg: #1a1a1a;
  --cc-placeholder-fg: #f2f2f2;
}

.cc-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  max-width: 760px;
  margin: 0 auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--cc-bg);
  color: var(--cc-fg);
  font-family: var(--cc-font);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
}
.cc-bar--visible { opacity: 1; transform: none; }
.cc-bar__inner { padding: 20px 24px; }
.cc-bar__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--cc-fg);
  text-transform: none;
  letter-spacing: 0;
}
.cc-bar__text {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--cc-muted);
}
.cc-bar__text a { color: var(--cc-fg); text-decoration: underline; }
.cc-bar__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.cc-btn {
  font: inherit;
  font-family: var(--cc-font);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 10px 18px;
  border-radius: var(--cc-radius);
  cursor: pointer;
  border: 1px solid var(--cc-btn-bg);
  transition: opacity 0.2s;
}
.cc-btn:hover { opacity: 0.85; }
.cc-btn:focus-visible, .cc-link:focus-visible, .cc-switch input:focus-visible + .cc-switch__track {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}
/* Přijmout i Odmítnout mají stejnou váhu – odmítnutí nesmí být těžší než souhlas. */
.cc-btn--primary { background: var(--cc-btn-bg); color: var(--cc-btn-fg); }
.cc-btn--secondary { background: transparent; color: var(--cc-fg); border-color: var(--cc-border); }

.cc-link {
  font: inherit;
  font-size: 0.85rem;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Kategorie */
.cc-bar__settings { margin: 0 0 16px; border-top: 1px solid var(--cc-border); }
.cc-bar__settings[hidden] { display: none; }
.cc-cat { padding: 12px 0; border-bottom: 1px solid var(--cc-border); }
.cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat__title { font-weight: 600; font-size: 0.92rem; }
.cc-cat__always { font-size: 0.78rem; color: var(--cc-muted); }
.cc-cat__desc { margin: 6px 0 0 50px; font-size: 0.82rem; line-height: 1.5; color: var(--cc-muted); }

.cc-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-switch__track {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--cc-border);
  transition: background 0.2s;
}
.cc-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cc-fg);
  transition: transform 0.2s;
}
.cc-switch input:checked + .cc-switch__track { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(16px); background: var(--cc-bg); }
.cc-switch input:disabled + .cc-switch__track { opacity: 0.6; }
.cc-switch input:disabled ~ .cc-cat__title { cursor: default; }

/* Náhled místo obsahu třetích stran (video, mapa, recenze) */
.cc-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  padding: 20px;
  box-sizing: border-box;
  background: var(--cc-placeholder-bg);
  color: var(--cc-placeholder-fg);
  font-family: var(--cc-font);
  text-align: center;
  border-radius: var(--cc-radius);
}
.cc-placeholder__inner { max-width: 420px; }
.cc-placeholder .cc-placeholder__text { margin: 0 0 14px; font-size: 0.88rem; line-height: 1.5; color: var(--cc-placeholder-fg); }
.cc-bar .cc-bar__text { color: var(--cc-muted); }
.cc-placeholder__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.cc-placeholder .cc-btn--primary { background: var(--cc-placeholder-fg); color: var(--cc-placeholder-bg); border-color: var(--cc-placeholder-fg); }

@media (max-width: 560px) {
  .cc-bar { left: 8px; right: 8px; bottom: 8px; }
  .cc-bar__inner { padding: 16px; }
  .cc-bar__actions .cc-btn { flex: 1 1 100%; }
  .cc-cat__desc { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-bar { transition: none; }
}

/* Skrytý obsah čekající na souhlas – hidden nesmí přebít display ze stylu webu. */
[data-consent-src][hidden],
[data-consent-placeholder][hidden] { display: none !important; }
