/* =========================================================
   BARVY JABLONEC — Cookie Consent UI
   Sticky bottom banner + centered modal
   ========================================================= */

/* Brand fallback proměnné (lišta žije v dark variantě, ale tlačítka používají brand) */
.cc-banner,
.cc-modal {
  --cc-navy:    #1A3A6B;
  --cc-blue:    #1A56B0;
  --cc-text:    #222;
  --cc-muted:   #666;
  --cc-border:  #E2E2E0;
  --cc-bg:      #FFFFFF;
  --cc-bg-alt:  #F5F5F3;
  font-family: 'Nunito Sans', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--cc-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}
.cc-banner *,
.cc-modal *  { box-sizing: border-box; }

/* ----------------------- Banner (sticky bottom) --------------------------- */
.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  background: var(--cc-bg);
  color: var(--cc-text);
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .25s ease, transform .25s ease;
  max-width: 1100px;
  margin: 0 auto;
}
.cc-banner.cc-visible {
  opacity: 1;
  transform: translateY(0);
}
.cc-banner-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
}
.cc-banner-text   { flex: 1 1 auto; min-width: 0; }
.cc-banner-title  {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--cc-navy);
  letter-spacing: -.005em;
}
.cc-banner-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--cc-text);
  margin: 0;
}
.cc-banner-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------------------------- Tlačítka ------------------------------------ */
/* DŮLEŽITÉ pro GDPR: secondary (Odmítnout) a primary (Přijmout) musí být
   vizuálně rovnocenné velikostí. Liší se jen výplní, ne důležitostí. */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.2;
  border-radius: 8px;
  border: 2px solid var(--cc-navy);
  cursor: pointer;
  transition: background .15s, color .15s, transform .05s, box-shadow .15s;
  text-align: center;
  white-space: nowrap;
}
.cc-btn:focus-visible {
  outline: 3px solid #F2B705;
  outline-offset: 2px;
}
.cc-btn:active { transform: translateY(1px); }

.cc-btn-primary {
  background: var(--cc-navy);
  color: #fff;
}
.cc-btn-primary:hover {
  background: #14305A;
  border-color: #14305A;
}

.cc-btn-secondary {
  background: #fff;
  color: var(--cc-navy);
}
.cc-btn-secondary:hover {
  background: var(--cc-bg-alt);
}

/* --------------------------- Modal ---------------------------------------- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .2s ease;
}
.cc-modal.cc-visible { opacity: 1; }
.cc-modal[hidden]    { display: none; }

.cc-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,20,35,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.cc-modal-dialog {
  position: relative;
  background: var(--cc-bg);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.32);
}
.cc-modal-dialog:focus { outline: none; }

.cc-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--cc-muted);
  cursor: pointer;
  border-radius: 8px;
}
.cc-modal-close:hover { background: var(--cc-bg-alt); color: var(--cc-text); }

.cc-modal-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--cc-navy);
}
.cc-modal-intro {
  font-size: 14px;
  line-height: 1.55;
  color: var(--cc-text);
  margin: 0 0 20px;
}

.cc-link {
  color: var(--cc-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cc-link:hover { color: var(--cc-navy); }

/* Rows */
.cc-rows { margin-bottom: 22px; }
.cc-row {
  padding: 14px 0;
  border-top: 1px solid var(--cc-border);
}
.cc-row:last-child { border-bottom: 1px solid var(--cc-border); }
.cc-row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.cc-row-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cc-text);
}
.cc-row-locked {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--cc-muted);
  background: var(--cc-bg-alt);
  padding: 4px 10px;
  border-radius: 999px;
}
.cc-row-desc {
  margin: 8px 0 0 28px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cc-muted);
}

/* Checkbox (vlastní vzhled) */
.cc-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--cc-navy);
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  position: relative;
  background: #fff;
  flex: 0 0 auto;
  transition: background .15s, border-color .15s;
}
.cc-checkbox:checked {
  background: var(--cc-navy);
}
.cc-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.cc-checkbox:disabled {
  cursor: not-allowed;
  opacity: .6;
}
.cc-checkbox:focus-visible {
  outline: 3px solid #F2B705;
  outline-offset: 2px;
}

/* Modal actions */
.cc-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* --------------------------- Reopen link (patička) ------------------------ */
.cc-reopen {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.cc-reopen:hover { color: #fff; }

/* ------------------------------ Responsive -------------------------------- */
@media (max-width: 768px) {
  .cc-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 12px;
  }
  .cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 18px 16px;
  }
  .cc-banner-actions {
    justify-content: stretch;
  }
  .cc-banner-actions .cc-btn {
    flex: 1 1 100%;
    min-width: 0;
  }
  .cc-modal-dialog {
    padding: 22px 20px 20px;
    border-radius: 12px;
  }
  .cc-modal-actions .cc-btn {
    flex: 1 1 100%;
    min-width: 0;
  }
}

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