/* ═══ Cookie Consent — Banner ═══════════════════════════════════ */
#cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9990;
  width: min(620px, calc(100vw - 24px));
  background: #fff;
  border: 0.5px solid rgba(0,0,0,.12);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: 18px 20px;
}

.cc-banner-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.cc-banner-text {
  flex: 1;
  min-width: 200px;
}

.cc-banner-text strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.cc-banner-text p {
  font-size: 12px;
  color: #666;
  line-height: 1.55;
  margin: 0;
}

.cc-banner-text a {
  color: var(--green, #1D9E75);
}

.cc-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  min-width: 180px;
}

.cc-btn-full {
  width: 100%;
}

.cc-banner-secondary {
  display: flex;
  gap: 6px;
}

.cc-banner-secondary .cc-btn {
  flex: 1;
  font-size: 12px;
  padding: 7px 10px;
}

/* ═══ Przyciski ══════════════════════════════════════════════════ */
.cc-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: opacity .15s;
}

.cc-btn:hover { opacity: .85; }

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

.cc-btn-secondary {
  background: transparent;
  color: #666;
  border: 0.5px solid rgba(0,0,0,.18);
}

/* ═══ Panel ustawień ═════════════════════════════════════════════ */
#cookie-settings-panel {
  position: fixed;
  inset: 0;
  z-index: 9995;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cc-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}

.cc-panel {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 0.5px solid rgba(0,0,0,.1);
}

.cc-panel-header h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.cc-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #999;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.cc-panel-close:hover { color: #333; }

.cc-panel-body {
  padding: 4px 0;
  flex: 1;
}

.cc-category {
  padding: 14px 20px;
  border-bottom: 0.5px solid rgba(0,0,0,.07);
}

.cc-category:last-child { border-bottom: none; }

.cc-category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.cc-category strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 3px;
}

.cc-category p {
  font-size: 12px;
  color: #777;
  line-height: 1.55;
  margin: 0;
}

.cc-category-required { background: rgba(0,0,0,.02); }

/* Toggle zawsze włączony */
.cc-toggle-locked {
  flex-shrink: 0;
  margin-top: 2px;
}

.cc-toggle-on {
  font-size: 11px;
  color: var(--green, #1D9E75);
  font-weight: 500;
  white-space: nowrap;
}

/* Toggle switch */
.cc-toggle-switch {
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  margin-top: 2px;
  cursor: pointer;
}

.cc-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background .2s;
}

.cc-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.cc-toggle-switch input:checked + .cc-slider {
  background: var(--green, #1D9E75);
}

.cc-toggle-switch input:checked + .cc-slider:before {
  transform: translateX(18px);
}

/* Panel footer */
.cc-panel-footer {
  display: flex;
  gap: 8px;
  padding: 14px 20px 16px;
  border-top: 0.5px solid rgba(0,0,0,.1);
}

.cc-panel-footer .cc-btn { flex: 1; }

/* ═══ Responsive ═════════════════════════════════════════════════ */
@media (max-width: 480px) {
  #cookie-banner { padding: 14px; }
  .cc-banner-inner { flex-direction: column; }
  .cc-banner-actions { width: 100%; min-width: unset; }
  .cc-panel-footer { flex-direction: column; }
}
