/* P05 zgody (cbc6bd84) — style banera FlowFest .ffx-cookie (kolory jako zmienne per strona), bez pływającego przycisku. */

  /* Wrapper bannera — fixed, fade in po decyzji JS, żeby nie było skoku */
  .ff-cc-root { position: fixed; inset: 0 0 0 0; pointer-events: none; z-index: 9999; opacity: 0; transition: opacity .35s ease; }
  .ff-cc-root[data-open="1"] { opacity: 1; }
  .ff-cc-root[data-open="1"] .ff-cc-card { pointer-events: auto; }

  /* Lekkie zaciemnienie tła tylko gdy otwarty panel ustawień */
  .ff-cc-root::before {
    content:""; position:absolute; inset:0; background: rgba(15,35,32,0); transition: background .25s ease;
    pointer-events: none;
  }
  .ff-cc-root[data-mode="settings"]::before { background: rgba(15,35,32,.55); pointer-events:auto; }

  /* Karta bannera — kompaktowy sticker w kremowym papierze */
  .ff-cc-card {
    position: absolute;
    left: clamp(10px, 2.5vw, 20px);
    bottom: clamp(10px, 2.5vw, 20px);
    right: clamp(10px, 2.5vw, 20px);
    max-width: 380px;
    background: var(--p05z-tlo,#FFFFFF);
    color: var(--p05z-tekst,#1B1B1A);
    border-radius: 16px 12px 18px 14px / 14px 18px 12px 16px;
    box-shadow:
      0 20px 40px -22px rgba(15,35,32,.5),
      0 6px 14px -6px rgba(15,35,32,.22),
      inset 0 0 0 1px rgba(15,35,32,.06);
    padding: 14px 16px 12px;
    font-family: 'General Sans', system-ui, -apple-system, Segoe UI, sans-serif;
    transform: translateY(10px);
    transition: transform .4s cubic-bezier(.2,.8,.2,1);
    overflow: hidden;
  }
  .ff-cc-root[data-open="1"] .ff-cc-card { transform: translateY(0); }

  /* Subtelne paper-grain — spójność z .sticker w index.php */
  .ff-cc-card::before {
    content:""; position:absolute; inset:0; pointer-events:none; opacity:.12;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/></svg>");
    mix-blend-mode: multiply;
  }

  /* Tryb ustawień — środek, kompaktowo */
  .ff-cc-root[data-mode="settings"] .ff-cc-card {
    left: 50%; right: auto; bottom: 50%;
    transform: translate(-50%, 50%);
    max-width: 460px; width: calc(100% - 24px);
    max-height: 84vh; overflow-y: auto;
    padding: 16px 18px;
  }

  .ff-cc-title {
    margin: 0 0 4px;
    font-family: 'Grandstander', system-ui;
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.2;
    color: var(--p05z-ciemny,#17322C);
  }
  .ff-cc-body {
    color: rgba(27,27,26,.72);
    font-size: .82rem;
    line-height: 1.45;
    margin: 0 0 10px;
  }
  .ff-cc-body a { color: var(--p05z-ciemny,#17322C); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
  .ff-cc-body a:hover { color: var(--p05z-akcent,#90A946); }

  .ff-cc-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .ff-cc-spacer { flex: 1 1 auto; }

  /* Buttony — kompaktowe pille */
  .ff-cc-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    font-family: 'Grandstander', system-ui; font-weight: 600;
    border-radius: 999px;
    padding: .42rem .8rem;
    font-size: .82rem;
    cursor: pointer;
    border: 0;
    transition: transform .2s cubic-bezier(.2,.8,.2,1), background .2s, box-shadow .2s, color .2s;
    letter-spacing: .01em;
    white-space: nowrap;
  }
  .ff-cc-btn:active { transform: scale(.97); }
  .ff-cc-btn.primary {
    background: var(--p05z-akcent,#90A946); color: #F5F5F4;
    box-shadow: 0 12px 28px -14px rgba(23,50,44,.5);
  }
  .ff-cc-btn.primary:hover { background: #a2bd4e; transform: translateY(-1px); }
  .ff-cc-btn.dark {
    background: var(--p05z-ciemny,#17322C); color: #F5F5F4;
  }
  .ff-cc-btn.dark:hover { background: #1d4138; transform: translateY(-1px); }
  .ff-cc-btn.ghost {
    background: transparent; color: var(--p05z-ciemny,#17322C);
    box-shadow: inset 0 0 0 1.5px rgba(23,50,44,.22);
  }
  .ff-cc-btn.ghost:hover { background: rgba(23,50,44,.05); box-shadow: inset 0 0 0 1.5px rgba(23,50,44,.5); }
  .ff-cc-link {
    background: transparent; border: 0; padding: .5rem .25rem;
    font-family: 'General Sans', system-ui; font-size: .9rem;
    color: var(--p05z-ciemny,#17322C); text-decoration: underline; text-underline-offset: 4px;
    cursor: pointer;
  }
  .ff-cc-link:hover { color: var(--p05z-akcent,#90A946); }

  /* Lista kategorii w panelu ustawień */
  .ff-cc-cats { margin: 10px 0 12px; display: grid; gap: 6px; }
  .ff-cc-cat {
    border-radius: 10px 8px 12px 10px;
    background: #F5F5F4;
    padding: 9px 11px;
    display: grid; grid-template-columns: 1fr auto; gap: 3px 10px;
    align-items: center;
  }
  .ff-cc-cat-name {
    font-family: 'Grandstander', system-ui; font-weight: 600;
    color: var(--p05z-ciemny,#17322C); font-size: .88rem;
  }
  .ff-cc-cat-desc {
    grid-column: 1 / -1;
    font-size: .76rem; color: rgba(27,27,26,.68); line-height: 1.4;
    margin: 0;
  }
  .ff-cc-cat-locked {
    font-family: 'Grandstander', system-ui; font-weight: 600; font-size: .7rem;
    color: var(--p05z-ciemny,#17322C); opacity: .55;
    padding: .18rem .5rem; border-radius: 999px; background: rgba(23,50,44,.07);
  }

  /* Toggle */
  .ff-cc-toggle { position: relative; display: inline-block; width: 34px; height: 20px; }
  .ff-cc-toggle input { opacity: 0; width: 0; height: 0; }
  .ff-cc-toggle .slider {
    position: absolute; inset: 0; cursor: pointer;
    background: rgba(23,50,44,.18); border-radius: 999px;
    transition: background .2s;
  }
  .ff-cc-toggle .slider::before {
    content: ""; position: absolute; left: 2px; top: 2px;
    width: 16px; height: 16px; background: #FFF; border-radius: 50%;
    box-shadow: 0 2px 4px rgba(15,35,32,.25); transition: transform .2s;
  }
  .ff-cc-toggle input:checked + .slider { background: var(--p05z-akcent,#90A946); }
  .ff-cc-toggle input:checked + .slider::before { transform: translateX(14px); }
  .ff-cc-toggle input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(144,169,70,.35); }


  @media (max-width: 480px) {
    .ff-cc-card { padding: 18px 18px 14px; }
    .ff-cc-actions { gap: 8px; }
    .ff-cc-btn { padding: .65rem .9rem; font-size: .9rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    .ff-cc-root, .ff-cc-card { transition: none; }
  }

  /* Link „Ustawienia cookies” dopinany na końcu stopki (zamiast pływającego przycisku) */
  .p05-zgody-stopka { margin: 0; padding: 10px 16px 14px; text-align: center; font-size: .8rem; line-height: 1.4; }
  .p05-zgody-stopka a { color: inherit; text-decoration: underline; text-underline-offset: 3px; opacity: .8; }
  .p05-zgody-stopka a:hover, .p05-zgody-stopka a:focus-visible { opacity: 1; }
  .p05-zgody .ff-cc-btn:focus-visible, .p05-zgody .ff-cc-link:focus-visible { outline: 3px solid var(--p05z-akcent,#90A946); outline-offset: 2px; }

/* Izolacja od reguł button motywu Themify; ustawienia i powrót są linkami. */
#p05Zgody button.ff-cc-link,
#p05Zgody button.ff-cc-link:hover,
#p05Zgody button.ff-cc-link:focus {
  background: transparent !important; background-image: none !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  color: var(--p05z-ciemny) !important; padding: .5rem .25rem !important;
  font: inherit; font-weight: 400; text-transform: none; line-height: 1.4;
  text-decoration: underline; text-underline-offset: 4px;
}
#p05Zgody .ff-cc-btn.primary { background: var(--p05z-akcent); }
#p05Zgody .ff-cc-btn.dark { background: var(--p05z-ciemny); }
#p05Zgody .ff-cc-btn:hover { filter: brightness(.94); }
#p05Zgody [hidden], #p05ZgodyFab[hidden] { display: none !important; }
#p05ZgodyFab {
  position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9999; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; margin: 0; cursor: pointer;
  border: 1px solid var(--p05z-ciemny,#17322C); border-radius: 999px;
  background: var(--p05z-tlo,#fff); color: var(--p05z-ciemny,#17322C);
  box-shadow: 0 3px 14px #0002; font-size: 26px; line-height: 1;
}
#p05ZgodyFab:focus-visible { outline: 3px solid var(--p05z-akcent); outline-offset: 3px; }
/* Dyskretna pastylka: decyzja właściciela 12.11. */
#p05ZgodyFab { opacity: .2; transition: opacity .2s ease; }
#p05ZgodyFab:hover, #p05ZgodyFab:focus-visible, #p05ZgodyFab:active { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #p05ZgodyFab { transition: none; } }
/* Typografia niezależna od kursywy, fontów i rozmiarów motywu strony. */
#p05Zgody, #p05Zgody *, #p05ZgodyFab {
  font-style: normal !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
#p05Zgody .ff-cc-title { font-size: 18px !important; line-height: 1.3 !important; font-weight: 700 !important; margin: 0 0 8px !important; }
#p05Zgody .ff-cc-body { font-size: 14px !important; line-height: 1.5 !important; font-weight: 400 !important; }
#p05Zgody .ff-cc-btn { font-size: 14px !important; line-height: 1.3 !important; font-weight: 600 !important; padding: 9px 14px !important; }
#p05Zgody button.ff-cc-link { font-size: 14px !important; font-weight: 400 !important; line-height: 1.4 !important; }
#p05Zgody .ff-cc-cat-name { font-size: 15px !important; line-height: 1.4 !important; font-weight: 700 !important; }
#p05Zgody .ff-cc-cat-desc { font-size: 13px !important; line-height: 1.5 !important; font-weight: 400 !important; }
#p05Zgody .ff-cc-cat-locked { font-size: 12px !important; line-height: 1.4 !important; font-weight: 600 !important; }
#p05Zgody .ff-cc-card { box-sizing: border-box !important; }
#p05Zgody .ff-cc-body, #p05Zgody .ff-cc-cat-desc { color: var(--p05z-tekst,#1B1B1A) !important; }
