/* COOKIE CONSENT – clean, spójny wygląd (banner + modal + manage) */
.cc, .cc-modal, .cc-manage { font-family: var(--cc-font); color: var(--cc-text); }

/* Banner */
.cc {
  position: fixed; z-index: 2147483000;
  width: min(100vw - 24px, var(--cc-width));
  background: var(--cc-bg); border-radius: 8px; padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.cc a { color: var(--cc-link); font-weight: 700; text-decoration: none; }
.cc .cc-title { font-size: var(--cc-title); font-weight: 800; margin-bottom: 8px; }
.cc .cc-desc  { font-size: var(--cc-fz); line-height: 1.45; }
.cc .cc-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Pozycje */
.cc-pos-bottom-left { left: 12px; bottom: 12px; }
.cc-pos-bottom-right{ right: 12px; bottom: 12px; }
.cc-pos-bottom-center { left: 50%; transform: translateX(-50%); bottom: 12px; width: min(100vw - 24px, 720px); }
.cc-pos-top-center { left: 50%; transform: translateX(-50%); top: 12px; width: min(100vw - 24px, 720px); }

/* Modal */
.cc-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center;
  z-index: 2147483001;
}
.cc-modal[open], .cc-modal:not([hidden]) { display: flex; }
.cc-modal-box {
  width: min(100vw - 24px, 760px);
  background: var(--cc-bg); color: var(--cc-text);
  border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.cc-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.cc-modal-content { padding: 12px 16px; max-height: min(70vh, 480px); overflow: auto; }
.cc-modal-actions { padding: 12px 16px; display:flex; gap:8px; border-top:1px solid rgba(255,255,255,.08); }

.cc-close { background: transparent; border: 0; color: var(--cc-text); font-size: 24px; cursor: pointer; }

/* Kategorie */
.cc-cat { border: 1px solid rgba(255,255,255,.08); border-radius:8px; padding: 10px 12px; margin-bottom: 10px; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cc-cat-title { font-weight: 700; font-size: calc(var(--cc-fz) + 1px); }
.cc-cat-desc { font-size: var(--cc-fz); opacity: .95; margin-top: 6px; }
.cc-locked { font-size: 12px; opacity: .8; }

/* Toggle */
.cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.cc-switch input { display:none; }
.cc-switch .slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--cc-toggle-off); transition: .2s; border-radius: 999px;
}
.cc-switch .slider:before {
  content:""; position:absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; transition: .2s; border-radius: 999px;
}
.cc-switch input:checked + .slider { background: var(--cc-toggle-on); }
.cc-switch input:checked + .slider:before { transform: translateX(20px); }

/* --- PRZYCISKI: wspólny styl dla BANERA i MODALA --- */
.cc .cc-btn,
.cc-modal .cc-btn {
  font-family: var(--cc-font);
  font-size: var(--cc-btn);
  line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: var(--cc-btn-secondary);
  color: var(--cc-btn-secondary-text);
  user-select: none; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform .06s ease,
    filter .06s ease,
    background-color .12s ease,
    color .12s ease,
    box-shadow .12s ease;
  position: relative; will-change: transform, filter;
}

/* Warianty */
.cc .cc-btn.cc-accept,
.cc-modal .cc-btn.cc-accept {
  background: var(--cc-btn-primary);
  color: var(--cc-btn-primary-text);
}
.cc .cc-btn.cc-customize,
.cc-modal .cc-btn.cc-customize {
  background: transparent;
  color: var(--cc-link);
  border: 1px solid var(--cc-link);
}

/* Interakcje */
.cc .cc-btn:hover,
.cc-modal .cc-btn:hover { filter: brightness(1.05); }
.cc .cc-btn:active, .cc .cc-btn.is-press,
.cc-modal .cc-btn:active, .cc-modal .cc-btn.is-press {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.92);
}
.cc .cc-btn:focus-visible,
.cc-modal .cc-btn:focus-visible {
  outline: 2px solid var(--cc-link);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(255, 45, 45, .25);
}
.cc .cc-btn[disabled],
.cc-modal .cc-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Drobne różnice między wariantami */
.cc .cc-btn.cc-accept:is(:hover, .is-press, :active),
.cc-modal .cc-btn.cc-accept:is(:hover, .is-press, :active) { filter: brightness(0.98); }
.cc .cc-btn.cc-reject:is(:hover, .is-press, :active),
.cc-modal .cc-btn.cc-reject:is(:hover, .is-press, :active)  { filter: brightness(1.06); }
.cc .cc-btn.cc-customize:is(:hover, .is-press, :active),
.cc-modal .cc-btn.cc-customize:is(:hover, .is-press, :active){ background: rgba(255,45,45,.08); }

/* Floating „Ustawienia cookies” */
.cc-manage {
  position: fixed; left: 2px; top: 2px; z-index: 2147483002;
  background: var(--cc-btn-secondary); color: var(--cc-btn-secondary-text);
  border:0; border-radius: 999px; padding: 5px 5px; cursor:pointer; font-size: 11px;
}
