/* Creative Mindset Institute – baner zgody na cookies (consent.js) */

.cmi-cc-banner,
.cmi-cc-dialog {
  --cmi-cc-accent: #8459b6;
  --cmi-cc-accent-hover: #6f4799;
  --cmi-cc-text: #171717;
  --cmi-cc-muted: #525252;
  --cmi-cc-bg: #ffffff;
  --cmi-cc-line: #e8e8e8;
  font-family: "Mulish", system-ui, sans-serif;
  color: var(--cmi-cc-text);
  box-sizing: border-box;
}

.cmi-cc-banner *,
.cmi-cc-dialog * {
  box-sizing: border-box;
}

/* ---------- Baner ---------- */

.cmi-cc-banner {
  position: fixed;
  z-index: 2147483000;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 460px;
  padding: 24px;
  background: var(--cmi-cc-bg);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(23, 23, 23, 0.18);
  animation: cmi-cc-in 0.35s ease-out;
}

@media (min-width: 768px) {
  .cmi-cc-banner {
    left: 24px;
    bottom: 24px;
    right: auto;
  }
}

/* Tylko ruch, bez opacity: baner pozostaje widoczny, nawet gdy animacje są wstrzymane */
@keyframes cmi-cc-in {
  from { transform: translateY(24px); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cmi-cc-banner { animation: none; }
}

/* ---------- Typografia ---------- */

.cmi-cc-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.cmi-cc-text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--cmi-cc-muted);
}

.cmi-cc-text a {
  color: var(--cmi-cc-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Przyciski ---------- */

.cmi-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button.cmi-cc-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 2px solid var(--cmi-cc-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button.cmi-cc-btn--primary {
  background: var(--cmi-cc-accent);
  color: #fff;
}

button.cmi-cc-btn--primary:hover {
  background: var(--cmi-cc-accent-hover);
  border-color: var(--cmi-cc-accent-hover);
}

button.cmi-cc-btn--ghost {
  background: transparent;
  color: var(--cmi-cc-accent);
}

button.cmi-cc-btn--ghost:hover {
  background: rgba(132, 89, 182, 0.08);
}

button.cmi-cc-btn:focus-visible,
button.cmi-cc-close:focus-visible,
.cmi-cc-switch:focus-visible,
.cmi-cc-text a:focus-visible {
  outline: 3px solid #f8b734;
  outline-offset: 2px;
}

/* ---------- Okno ustawień ---------- */

.cmi-cc-dialog {
  width: calc(100% - 32px);
  max-width: 560px;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--cmi-cc-bg);
  box-shadow: 0 20px 60px rgba(23, 23, 23, 0.25);
  overflow: auto;
}

.cmi-cc-dialog[open]:not(:modal) {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 2147483001;
}

.cmi-cc-dialog::backdrop {
  background: rgba(23, 23, 23, 0.45);
}

.cmi-cc-dialog-inner {
  position: relative;
  padding: 28px 24px 24px;
}

button.cmi-cc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--cmi-cc-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

button.cmi-cc-close:hover {
  background: #f4f4f4;
}

.cmi-cc-dialog .cmi-cc-title {
  padding-right: 40px;
}

.cmi-cc-cat {
  padding: 14px 0;
  border-top: 1px solid var(--cmi-cc-line);
}

.cmi-cc-cat:last-of-type {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--cmi-cc-line);
}

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

.cmi-cc-cat-name {
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.cmi-cc-cat-desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cmi-cc-muted);
}

.cmi-cc-always {
  font-size: 12px;
  font-weight: 700;
  color: var(--cmi-cc-accent);
  white-space: nowrap;
}

/* Przełącznik */
.cmi-cc-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 9999px;
  background: #c4c4c4;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.cmi-cc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.cmi-cc-switch:checked {
  background: var(--cmi-cc-accent);
}

.cmi-cc-switch:checked::after {
  transform: translateX(20px);
}

@media (prefers-reduced-motion: reduce) {
  .cmi-cc-switch,
  .cmi-cc-switch::after,
  .cmi-cc-btn {
    transition: none;
  }
}

/* Link w stopce strony */
.cmi-cc-footer-link {
  cursor: pointer;
}
