/* ===== ROOT ===== */
#cl-manager {
  position: fixed;
  z-index: 999999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #111827;

  /* domyślny akcent – nadpisywany inline z PHP */
  --cl-accent: #ec4899;
  --cl-btn-radius: 0px;
}

/* Pozycje */
.cl--pos-bottom-left { bottom: 16px; left: 16px; }
.cl--pos-bottom-right { bottom: 16px; right: 16px; }
.cl--pos-bottom-center { bottom: 16px; left: 50%; transform: translateX(-50%); }
.cl--pos-top-center { top: 16px; left: 50%; transform: translateX(-50%); }

/* Pozycja ikony */
.cl--icon-bottom-left .cl-toggle { bottom: 16px; left: 16px; }
.cl--icon-bottom-right .cl-toggle { bottom: 16px; right: 16px; }
.cl--icon-bottom-center .cl-toggle { bottom: 16px; left: 50%; transform: translateX(-50%); }
.cl--icon-top-center .cl-toggle { top: 16px; left: 50%; transform: translateX(-50%); }

/* ===== TOGGLE (IKONA) ===== */
.cl-toggle {
  position: fixed;
  width: 42px !important;
  height: 42px;
  border-radius: 0 !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  background: #ffffff;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.cl-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.cl-toggle-icon {
  height: 27px;
  display: block;
}

.cl-toggle-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none !important;
  stroke-width: 2px;
}

.cl-toggle--hidden { display: none !important; }

/* ===== BANNER (GLASS EFFECT + POZIOMY) ===== */
.cl-banner {
  box-sizing: border-box;
  width: 90vw;
  max-width: 1100px;
  min-width: 320px;
  padding: 18px 24px;
  
  /* Twoje wytyczne: zero zaokrągleń, pełna przezroczystość tła, blur 6px */
  border-radius: 0 !important;
  background: rgba(0, 0, 0, 0) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: none !important;
  
  color: #ffffff;
  
  /* Układ jednowierszowy */
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  flex-wrap: nowrap !important;
}

.cl-banner--hidden { display: none !important; }

.cl-banner-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.cl-banner-description {
  font-size: 13px;
  color: #d1d5db;
}

.cl-banner-main {
  margin-bottom: 0;
  flex-grow: 1;
}

.cl-policy-link-wrapper {
  margin-top: 4px;
  margin-bottom: 0;
}

.cl-policy-link {
  color: var(--cl-accent);
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s;
}

.cl-policy-link:hover { opacity: 0.8; }

/* ===== TEMATY ===== */
.cl--theme-dark .cl-banner {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #e5e7eb;
  border-color: rgba(255, 255, 255, 0.2);
}

.cl--theme-dark .cl-banner-description { color: #9ca3af; }

/* ===== BUTTONY (PRZYWRÓCONE ORYGINALNE KOLORY AKCENTÓW + BEZ ZAOKRĄGLEŃ) ===== */
.cl-banner-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}

#cl-manager .cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 0 !important; /* Kąty proste */
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease, filter .1s ease;
}

#cl-manager .cl-btn:focus-visible {
  outline: 2px solid var(--cl-accent);
  outline-offset: 2px;
}

/* PRIMARY */
#cl-manager .cl-btn.cl-btn--primary {
  background: var(--cl-accent) !important;
  border-color: var(--cl-accent) !important;
  color: #ffffff !important;
}

#cl-manager .cl-btn.cl-btn--primary:hover { filter: brightness(0.92); }

/* SECONDARY */
#cl-manager .cl-btn.cl-btn--secondary {
  border-color: var(--cl-accent) !important;
  color: #ffffff !important;
  background: var(--cl-accent) !important;
}

.cl--theme-dark #cl-manager .cl-btn.cl-btn--secondary {
  background: transparent !important;
}

#cl-manager .cl-btn.cl-btn--secondary:hover {
  background: rgba(148, 163, 184, .1);
  filter: brightness(0.92);
}

/* GHOST */
#cl-manager .cl-btn.cl-btn--ghost {
  border-color: var(--cl-accent) !important;
  color: var(--cl-accent);
}

#cl-manager .cl-btn.cl-btn--ghost:hover {
  background: rgba(248, 248, 248, 0.11);
}

.cl--theme-dark #cl-manager .cl-btn.cl-btn--ghost {
  color: #e5e7eb !important;
  border-color: #e5e7eb !important;
}

/* ===== SZCZEGÓŁY / KATEGORIE ===== */
.cl-banner-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: none;
  width: 100%;
}

.cl-banner-details--open { display: block; }

.cl-category { margin-bottom: 10px; }

.cl-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.cl-category-name { font-size: 13px; font-weight: 500; }

.cl-category-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 0 !important; /* Kąty proste */
  background: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.cl--theme-dark .cl-category-pill {
  background: rgba(148, 163, 184, .22);
  color: #e5e7eb;
}

.cl-category-desc { font-size: 12px; color: #cbd5e1; }
.cl--theme-dark .cl-category-desc { color: #9ca3af; }

.cl-banner-bottom { margin-top: 12px; text-align: right; }

/* ===== SWITCH ===== */
.cl-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 22px;
}

.cl-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cl-switch-slider {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #475569;
  border-radius: 0 !important; /* Kąty proste */
  transition: background-color .15s ease;
}

.cl-switch-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 0 !important; /* Kąty proste */
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
  transition: transform .15s ease;
}

.cl-switch input:checked+.cl-switch-slider { background: var(--cl-accent); }
.cl-switch input:checked+.cl-switch-slider::before { transform: translateX(14px); }

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 768px) {
  .cl-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: calc(100vw - 24px);
    min-width: 0;
  }
  
  .cl-banner-actions {
    flex-wrap: wrap !important;
    width: 100%;
  }
  
  .cl-banner-actions .cl-btn {
    flex: 1;
  }
}