/* ------------------------------------------------------------------
   Cookie lišta – slovenskekasina.sk
   Svetlý motív, značkové farby (modrá #0068cb). Štruktúra zdieľaná
   s CZ/CH, per-locale sa menia len texty (pozri configCookieConsent.php).
   Rovnocennosť tlačidiel "Prijať" / "Odmietnuť" je zámerná (EDPB).
   ------------------------------------------------------------------ */

.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(12px);
  z-index: 2147483000;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 22px;
  background: #ffffff;
  color: #212529;
  border: 1px solid #e1e5ee;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
}

.cc-banner.cc-open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

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

/* --- 1. vrstva --- */
/* Explicitní override UA pravidla [hidden]{display:none} pro obě vrstvy,
   protože .cc-layer-* nastavuje display a to by [hidden] přebilo. */
.cc-layer[hidden] { display: none !important; }

.cc-layer-main {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cc-text { flex: 1 1 460px; min-width: 0; }

.cc-title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}

.cc-desc {
  margin: 0;
  color: #475569;
  font-size: 14.5px;
  text-align: left; /* přebít případný justify z globálního CSS */
}

.cc-more {
  color: #0068cb;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}
.cc-more:hover { color: #0058b0; }

/* --- Akce / tlačítka --- */
.cc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

/* Přijmout i Odmítnout mají ZÁMĚRNĚ shodný vzhled (equal prominence). */
.cc-btn-primary {
  min-width: 128px;
  padding: 12px 22px;
  background: #0068cb;
  border-color: #0068cb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 104, 203, 0.22);
}
.cc-btn-primary:hover {
  background: #0058b0;
  border-color: #0058b0;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 104, 203, 0.3);
}
.cc-btn-primary:active { transform: translateY(0); }

.cc-btn-link {
  padding: 12px 12px;
  background: transparent;
  color: #475569;
  text-decoration: underline;
  font-weight: 600;
}
.cc-btn-link:hover { color: #0f172a; }

/* "Uložit nastavení" – sekundární (custom volba), aby accept/reject zůstaly
   vzájemně rovnocenné jako primární akce. */
.cc-btn-save {
  min-width: 128px;
  padding: 11px 22px;
  background: #fff;
  border: 1px solid #0068cb;
  color: #0068cb;
}
.cc-btn-save:hover {
  background: #eef5ff;
  transform: translateY(-1px);
}

.cc-btn:focus-visible,
.cc-more:focus-visible,
.cc-close:focus-visible,
.cc-switch input:focus-visible + .cc-slider {
  outline: 3px solid rgba(0, 104, 203, 0.4);
  outline-offset: 2px;
}

/* --- 2. vrstva – nastavení --- */
.cc-layer-settings { max-height: min(70vh, 560px); overflow-y: auto; }
.cc-layer-settings[hidden] { display: none; }

.cc-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.cc-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 8px;
}
.cc-close:hover { color: #0f172a; }

.cc-cat {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f7f9fc;
  border: 1px solid #e7ebf2;
  border-radius: 12px;
}

.cc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-cat-title { font-weight: 700; color: #0f172a; }

.cc-cat-fixed {
  font-size: 13px;
  font-weight: 700;
  color: #1d9d70;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.cc-cat-desc {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13.5px;
}

.cc-state {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  min-width: 62px;
  text-align: right;
  white-space: nowrap;
}

/* Přepínač (switch) s textovým stavem – ne pouze barva */
.cc-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 26px;
  margin: 0;
  cursor: pointer;
}
.cc-slider {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.18s ease;
}
.cc-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  transition: transform 0.18s ease;
}
.cc-switch input:checked + .cc-slider { background: #0068cb; }
.cc-switch input:checked + .cc-slider::before { transform: translateX(18px); }

.cc-actions-settings { margin-top: 20px; }

/* --- Mobil --- */
@media (max-width: 640px) {
  .cc-banner {
    left: 0;
    right: 0;
    transform: translateY(12px);
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .cc-banner.cc-open { transform: translateY(0); }

  .cc-layer-main { flex-direction: column; align-items: stretch; gap: 16px; }
  .cc-text { flex: 0 0 auto; } /* v column layoutu nesmí flex-basis roztáhnout výšku */
  .cc-actions { flex-direction: column; align-items: stretch; }
  .cc-btn-primary, .cc-btn-save { width: 100%; min-width: 0; padding: 14px 22px; }
  .cc-btn-link { width: 100%; text-align: center; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner { transition: opacity 0.01ms; }
  .cc-btn, .cc-slider, .cc-slider::before { transition: none; }
}
