/*------------------------------------------------
*
* Souhlas s cookies - okno uprostřed obrazovky
*
-------------------------------------------------*/
.cc-overlay {
  --cc-primary: #0852D7;
  --cc-primary-dark: #0641aa;
  --cc-primary-soft: #eef4ff;
  --cc-text: #121518;
  --cc-muted: #6b7280;
  --cc-border: #e4e8ef;

  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 18, 35, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cc-overlay[hidden] {
  display: none;
}

.cc-overlay.is-visible {
  opacity: 1;
}

html.cc-open,
html.cc-open body {
  overflow: hidden;
}

.cc-modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 32px 32px 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px -20px rgba(10, 18, 35, 0.5);
  color: var(--cc-text);
  font-family: "Oswald", sans-serif;
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.cc-overlay.is-visible .cc-modal {
  transform: none;
}

.cc-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--cc-primary-soft);
  color: var(--cc-primary);
  font-size: 1.8rem;
}

.cc-modal__title {
  margin: 0 0 10px;
  color: var(--cc-text);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
}

.cc-modal__text {
  margin: 0;
  color: var(--cc-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.cc-modal__text a {
  color: var(--cc-primary);
  font-weight: 500;
  white-space: nowrap;
}

/* Nastavení jednotlivých kategorií */
.cc-settings {
  margin-top: 20px;
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  text-align: left;
}

.cc-settings[hidden] {
  display: none;
}

.cc-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.cc-option + .cc-option {
  border-top: 1px solid var(--cc-border);
}

.cc-option__text {
  flex: 1;
}

.cc-option__text strong {
  display: block;
  color: var(--cc-text);
  font-size: 1rem;
  font-weight: 500;
}

.cc-option__text span {
  display: block;
  margin-top: 2px;
  color: var(--cc-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Přepínač */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}

.cc-switch input {
  position: absolute;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cfd6e0;
  transition: background-color 0.2s ease;
  pointer-events: none;
}

.cc-switch__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-switch__slider {
  background: var(--cc-primary);
}

.cc-switch input:checked + .cc-switch__slider::after {
  transform: translateX(20px);
}

.cc-switch input:focus-visible + .cc-switch__slider {
  box-shadow: 0 0 0 3px rgba(8, 82, 215, 0.3);
}

.cc-switch.is-locked {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Tlačítka - přijmout i odmítnout jsou stejně velká a stejně snadno dostupná */
.cc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cc-btn[hidden] {
  display: none;
}

.cc-btn:focus-visible {
  outline: 3px solid rgba(8, 82, 215, 0.35);
  outline-offset: 2px;
}

.cc-btn--primary {
  background: var(--cc-primary);
  color: #fff;
}

.cc-btn--primary:hover {
  background: var(--cc-primary-dark);
}

.cc-btn--outline {
  border-color: var(--cc-primary);
  background: #fff;
  color: var(--cc-primary);
}

.cc-btn--outline:hover {
  background: var(--cc-primary-soft);
}

.cc-btn--link {
  grid-column: 1 / -1;
  height: 36px;
  background: none;
  color: var(--cc-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-btn--link:hover {
  color: var(--cc-primary);
}

.cc-actions .cc-btn[data-cc="save"] {
  grid-column: 1 / -1;
}

/* Odkaz v patičce */
.cc-footer-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc-footer-link:hover {
  color: #fff;
}

@media (max-width: 575.98px) {
  .cc-modal {
    padding: 24px 20px 20px;
  }

  .cc-modal__title {
    font-size: 1.4rem;
  }

  .cc-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-overlay,
  .cc-modal,
  .cc-switch__slider,
  .cc-switch__slider::after {
    transition: none;
  }
}
