/* Baner cookies Enjoyment.pl - wariant A „kompaktowy pasek dolny" (1.82.409).
   Nadpisuje WYŁĄCZNIE wygląd biblioteki Silktide (silktide-consent-manager.css zostaje bez zmian).
   Mechanizm zgód, kategorie i Google Consent Mode v2 działają jak dotąd - patrz cookie-config.js.
   Baner nie blokuje strony (bez przyciemnienia); przyciemnienie zostaje tylko dla okna „Ustawienia",
   które pozostaje oknem modalnym. Oba główne przyciski mają IDENTYCZNY wygląd (bez wyróżniania zgody). */

#silktide-wrapper {
  --primaryColor: #3b2a22;          /* ciemny brąz sklepu - przyciski, linki */
  --textColor: #3b322d;
  --backgroundColor: #ffffff;
  --backdropBackgroundColor: rgba(30, 20, 15, .38);
  --fontFamily: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --cookieIconColor: #3b2a22;
}

/* ---------- Pasek ---------- */
#silktide-wrapper #silktide-banner {
  left: 0; right: 0; bottom: 0; top: auto;
  width: 100%; max-width: 100%; max-height: 70vh;
  border-radius: 14px 14px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .14);
  display: flex; flex-direction: column; gap: 10px;
  /* Wjazd od dołu bez przesunięcia w poziomie (animacja biblioteki zakładała okno w rogu). */
  transform: translateY(16px);
  animation: enj-baner-wjazd 300ms ease-out forwards;
  animation-delay: .2s;
}
@keyframes enj-baner-wjazd { to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #silktide-wrapper #silktide-banner { animation: none; transform: none; opacity: 1; }
}

#silktide-wrapper #silktide-banner p { font-size: 14px; line-height: 20px; margin: 0; }
#silktide-wrapper #silktide-banner p a { color: var(--primaryColor); background: transparent; text-decoration: underline; }

/* Przyciski: dwa równe, obok siebie; „Ustawienia" pod nimi. Kolejność w kodzie = kolejność na ekranie. */
#silktide-wrapper #silktide-banner .actions {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center;
}
#silktide-wrapper #silktide-banner .actions-row { grid-column: 1 / -1; justify-content: center; gap: 0; }
#silktide-wrapper #silktide-banner .st-button,
#silktide-wrapper #silktide-banner .st-button:hover {
  background-color: var(--primaryColor); color: #fff; border: 2px solid var(--primaryColor);
}
#silktide-wrapper #silktide-banner .st-button {
  font-family: var(--fontFamily); font-size: 14px; line-height: 20px; font-weight: 600;
  padding: 11px 6px; min-height: 44px; border-radius: 10px; white-space: nowrap;
}
#silktide-wrapper #silktide-banner .st-button:hover { background-color: #2a1d17; border-color: #2a1d17; }
#silktide-wrapper #silktide-banner .preferences {
  padding: 6px 4px; min-height: 32px; font-size: 14px; color: var(--primaryColor); font-family: var(--fontFamily);
}
#silktide-wrapper #silktide-banner .preferences:after { content: none; }
/* Logo dostawcy w pasku zajmowało miejsce; licencja MIT nie wymaga go w interfejsie (nota zostaje w plikach). */
#silktide-wrapper #silktide-banner a.silktide-logo { display: none; }

/* Czytelny fokus z klawiatury na każdym działaniu (biblioteka ma tylko :focus). */
#silktide-wrapper #silktide-banner a:focus-visible,
#silktide-wrapper #silktide-banner button:focus-visible {
  outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c0392b; border-radius: 10px;
}

/* Bardzo wąskie ekrany (320 px): napisy mogą zawinąć się na dwie linie zamiast wychodzić poza przycisk. */
@media (max-width: 345px) {
  #silktide-wrapper #silktide-banner .st-button { white-space: normal; font-size: 13px; }
}

/* Komputer: wszystko w jednym rzędzie. */
@media (min-width: 900px) {
  #silktide-wrapper #silktide-banner {
    flex-direction: row; align-items: center; justify-content: center; gap: 24px; padding: 14px 32px;
  }
  #silktide-wrapper #silktide-banner p { max-width: 560px; }
  #silktide-wrapper #silktide-banner .actions { display: flex; gap: 10px; }
  #silktide-wrapper #silktide-banner .st-button { min-width: 170px; padding: 11px 16px; }
  #silktide-wrapper #silktide-banner .actions-row { flex-grow: 0; }
}

/* Dopóki pasek jest widoczny, dół strony nie chowa się pod nim (stopka, ostatnie przyciski).
   Przeglądarki bez :has() po prostu tego nie zastosują - nic się nie psuje. */
body:has(#silktide-banner) { padding-bottom: 190px; }
@media (min-width: 900px) { body:has(#silktide-banner) { padding-bottom: 90px; } }

/* ---------- Okno „Ustawienia cookies" (pozostaje modalne) ----------
   Zwarte: nagłówek, trzy wiersze „nazwa + przełącznik" z krótkim opisem pod spodem, jeden przycisk zapisu.
   Przewija się tylko lista kategorii - nagłówek i „Zapisz ustawienia" są zawsze widoczne.
   Telefon: okno wysuwa się od dołu ekranu i ma wysokość treści (nie cały ekran). */
#silktide-wrapper #silktide-modal {
  width: 440px; max-width: calc(100% - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  padding: 0; overflow: hidden; border-radius: 16px; display: none; flex-direction: column;
}
#silktide-wrapper #silktide-modal header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 8px 8px 4px 20px; flex: 0 0 auto;
}
#silktide-wrapper #silktide-modal header h2 { font-size: 18px; line-height: 24px; font-weight: 700; margin: 0; }
#silktide-wrapper #silktide-modal .modal-close {
  width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
}
#silktide-wrapper #silktide-modal .modal-close svg { width: 16px; height: 16px; }
/* Długi wstęp pod tytułem jest zbędny - tytuł i opisy kategorii mówią wszystko. */
#silktide-wrapper #silktide-modal > p { display: none; }

#silktide-wrapper #silktide-modal section {
  margin: 0; padding: 0 20px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}
/* Wiersz kategorii: nazwa, pod nią krótki opis, przełącznik po prawej na wysokości obu linii.
   Legenda z float przestaje być „legendą renderowaną" fieldsetu i staje się zwykłym elementem siatki. */
#silktide-wrapper #silktide-modal fieldset {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nazwa przelacznik" "opis przelacznik";
  align-items: center; column-gap: 16px; row-gap: 1px;
  margin: 0; padding: 10px 0; border: 0; border-bottom: 1px solid #efe6df; min-width: 0;
}
#silktide-wrapper #silktide-modal fieldset:last-of-type { border-bottom: 0; }
#silktide-wrapper #silktide-modal legend { float: left; grid-area: nazwa; align-self: end; margin: 0; padding: 0; font-size: 15px; line-height: 20px; font-weight: 700; }
#silktide-wrapper #silktide-modal .cookie-type-content { display: contents; }
#silktide-wrapper #silktide-modal .cookie-type-description { grid-area: opis; align-self: start; }
#silktide-wrapper #silktide-modal .cookie-type-description p { margin: 0; font-size: 13px; line-height: 18px; color: #6b5f58; }

/* Mniejszy przełącznik (48 × 28), ale z polem dotyku 44 px wysokości. */
#silktide-wrapper #silktide-modal .switch { grid-area: przelacznik; width: 48px; height: 28px; padding: 8px 0; box-sizing: content-box; }
#silktide-wrapper #silktide-modal .switch__pill { width: 48px; height: 28px; background: #b9aea7; }
/* Stan „włączone" w kolorze sklepu (bez tej reguły szary kolor wyłączonego wygrywał specyficznością). */
#silktide-wrapper #silktide-modal .switch input:checked + .switch__pill { background: var(--primaryColor); }
#silktide-wrapper #silktide-modal .switch__dot { top: 10px; left: 2px; width: 24px; height: 24px; }
#silktide-wrapper #silktide-modal .switch input:checked ~ .switch__dot { left: 22px; }
#silktide-wrapper #silktide-modal .switch__on, #silktide-wrapper #silktide-modal .switch__off { display: none; }
#silktide-wrapper #silktide-modal .switch:focus-within { box-shadow: none; }

#silktide-wrapper #silktide-modal footer {
  display: block; margin: 0; flex: 0 0 auto;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #efe6df;
}
#silktide-wrapper #silktide-modal .preferences-save {
  width: 100%; min-height: 46px; padding: 11px 12px; border-radius: 10px;
  font-family: var(--fontFamily); font-size: 15px; line-height: 20px; font-weight: 600;
  background-color: var(--primaryColor); color: #fff; border: 2px solid var(--primaryColor);
}
#silktide-wrapper #silktide-modal .preferences-save:hover { background-color: #2a1d17; border-color: #2a1d17; color: #fff; }

#silktide-wrapper #silktide-modal button:focus-visible,
#silktide-wrapper #silktide-modal a:focus-visible,
#silktide-wrapper #silktide-modal input:focus-visible + .switch__pill {
  outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c0392b;
}

/* Telefon: okno przyklejone do dołu ekranu, pełna szerokość, zaokrąglone tylko górne rogi. */
@media (max-width: 599px) {
  #silktide-wrapper #silktide-modal {
    align-self: flex-end; width: 100%; max-width: 100%;
    max-height: 88vh; max-height: 88dvh; border-radius: 16px 16px 0 0;
  }
}
