/* =====================================================================
   BANER COOKIES — w stylu motywu: ciemna karta, żółty akcent (#facc15),
   wersaliki font-black, rounded-sm. Jasny motyw: html[data-theme="light"].
   Na mobile karta siedzi nad dolnym paskiem (h-16 = 64px).
   ===================================================================== */

.ck {
  position: fixed;
  z-index: 110; /* nad paskiem mobilnym (z-[100]) */
  left: 12px;
  right: 12px;
  bottom: 76px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
  font-family: inherit;
}
.ck[hidden] { display: none; }
.ck--open { opacity: 1; transform: translateY(0); pointer-events: auto; }

@media (min-width: 1024px) {
  .ck { left: 24px; right: auto; bottom: 24px; width: 440px; }
}

.ck__box {
  background: #0d0d0d;
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, .1);
  border-left: 3px solid #facc15;
  border-radius: 2px;
  padding: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.ck__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ck__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  background: rgba(250, 204, 21, .15); color: #facc15; border-radius: 2px;
}
.ck__title {
  color: #fff; margin: 0;
  font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; line-height: 1.25;
}
.ck__text { margin: 0 0 16px; font-size: 13px; line-height: 1.6; }
.ck__link { color: #facc15; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ck__link:hover { color: #fde047; }

/* Ustawienia */
.ck__settings {
  margin: 0 0 16px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.ck__settings[hidden] { display: none; }
.ck__row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; font-size: 12px; line-height: 1.5; }
.ck__check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ck__switch {
  position: relative; flex-shrink: 0; margin-top: 1px;
  width: 36px; height: 20px; border-radius: 9999px;
  background: #27272a; border: 1px solid rgba(255, 255, 255, .1);
  transition: background-color .15s ease;
}
.ck__switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 9999px; background: #9ca3af;
  transition: transform .15s ease, background-color .15s ease;
}
.ck__check:checked + .ck__switch { background: #facc15; border-color: #facc15; }
.ck__check:checked + .ck__switch::after { transform: translateX(16px); background: #000; }
.ck__check:disabled + .ck__switch { opacity: .5; }
.ck__check:focus-visible + .ck__switch { outline: 2px solid #facc15; outline-offset: 2px; }
.ck__row:has(.ck__check:disabled) { cursor: default; }

/* Przyciski */
.ck__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ck__btn {
  flex: 1 1 auto;
  padding: 12px 16px; border-radius: 2px;
  font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ck__btn[hidden] { display: none; }
.ck__btn:focus-visible { outline: 2px solid #facc15; outline-offset: 2px; }
.ck__btn--primary { background: #facc15; color: #000; flex-basis: 100%; }
.ck__btn--primary:hover { background: #eab308; }
.ck__btn--ghost { background: #18181b; color: #fff; border-color: rgba(255, 255, 255, .05); }
.ck__btn--ghost:hover { background: #27272a; }
.ck__btn--text { background: transparent; color: #9ca3af; border-color: rgba(255, 255, 255, .1); }
.ck__btn--text:hover { color: #facc15; border-color: rgba(250, 204, 21, .4); }

@media (min-width: 1024px) {
  .ck__btn--primary { flex-basis: auto; }
}

/* Jasny motyw */
html[data-theme="light"] .ck__box {
  background: #fff; color: #52525b;
  border-color: #e4e4e7; border-left-color: #facc15;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
html[data-theme="light"] .ck__title { color: #09090b; }
html[data-theme="light"] .ck__icon { color: #a16207; }
html[data-theme="light"] .ck__link { color: #a16207; }
html[data-theme="light"] .ck__settings { border-top-color: #e4e4e7; }
html[data-theme="light"] .ck__switch { background: #e4e4e7; border-color: #d4d4d8; }
html[data-theme="light"] .ck__switch::after { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
html[data-theme="light"] .ck__btn--ghost { background: #f4f4f5; color: #09090b; border-color: #e4e4e7; }
html[data-theme="light"] .ck__btn--ghost:hover { background: #e4e4e7; }
html[data-theme="light"] .ck__btn--text { color: #52525b; border-color: #e4e4e7; }
html[data-theme="light"] .ck__btn--text:hover { color: #a16207; border-color: #facc15; }

/* Link „Ustawienia cookies” w stopce */
.ck-open-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.ck-open-link:hover { color: #facc15; }

@media (prefers-reduced-motion: reduce) {
  .ck { transition: none; }
}
