/* =============================================================================
   Privacy page formatting + Cookie consent banner
   ============================================================================= */

/* --- Privacy page (template id=6 .about-template, resource = polityka-prywatnosci) --- */
.about-template .content h2,
.about-template .content h3 { color:#1f2a1a; margin:1.6em 0 .6em; line-height:1.25; font-weight:700; }
.about-template .content h2 { font-size:24px; }
.about-template .content h3 { font-size:18px; }
.about-template .content p { line-height:1.6; margin:.6em 0; color:#3a4533; }
.about-template .content ol,
.about-template .content ul { line-height:1.6; padding-left:24px; margin:.6em 0; }
.about-template .content a { color:#8FA417; text-decoration:underline; }
.about-template .content a:hover { color:#B0CD1F; }

/* table — горизонтальный скролл на мобиле */
.privacy-table { overflow-x:auto; margin:1.2em 0; -webkit-overflow-scrolling:touch; border-radius:8px; border:1px solid #eef0e8; }
.privacy-table table { width:100%; border-collapse:collapse; min-width:680px; }
.privacy-table th,
.privacy-table td { padding:12px 14px; border-bottom:1px solid #eef0e8; vertical-align:top; font-size:14px; line-height:1.5; color:#3a4533; }
.privacy-table tr:first-child td { background:#f6f9ec; font-weight:600; color:#1f2a1a; border-bottom:2px solid #B0CD1F; }
.privacy-table tr:nth-child(even) td { background:#fafbf6; }

/* =============================================================================
   Cookie consent banner
   ============================================================================= */
.cookie-banner {
  position:fixed; left:16px; right:16px; bottom:16px; z-index:9999;
  background:#fff; border:1px solid #eef0e8; border-radius:14px;
  box-shadow:0 18px 60px rgba(31,42,26,.18);
  padding:20px 22px;
  max-width:560px; margin-left:auto;
  display:none;
  font-family:inherit;
}
.cookie-banner.is-visible { display:block; animation:cookie-slide-in .25s ease-out; }
@keyframes cookie-slide-in { from { opacity:0; transform:translateY(20px);} to { opacity:1; transform:translateY(0);} }

.cookie-banner__title { font-size:16px; font-weight:700; color:#1f2a1a; margin:0 0 8px; }
.cookie-banner__text { font-size:14px; line-height:1.5; color:#4b5246; margin:0 0 14px; }
.cookie-banner__text a { color:#8FA417; text-decoration:underline; }

.cookie-banner__actions { display:flex; flex-wrap:wrap; gap:8px; }
.cookie-banner__btn {
  flex:1; min-width:120px;
  padding:11px 16px; border-radius:8px; font-size:14px; font-weight:600;
  border:2px solid transparent; cursor:pointer; text-align:center; transition:all .15s;
  background:#fff; color:#1f2a1a;
  border-color:#cdd6c0;
}
.cookie-banner__btn:hover { border-color:#B0CD1F; color:#8FA417; }
.cookie-banner__btn--primary { background:#B0CD1F; color:#fff; border-color:#B0CD1F; }
.cookie-banner__btn--primary:hover { background:#8FA417; border-color:#8FA417; color:#fff; }

/* --- Cookie preferences modal (granular) --- */
.cookie-modal__overlay {
  position:fixed; inset:0; z-index:10000;
  background:rgba(31,42,26,.55);
  display:none; align-items:center; justify-content:center;
  padding:20px;
}
.cookie-modal__overlay.is-visible { display:flex; animation:cookie-fade-in .2s ease-out; }
@keyframes cookie-fade-in { from { opacity:0; } to { opacity:1; } }

.cookie-modal {
  background:#fff; border-radius:16px;
  max-width:600px; width:100%; max-height:88vh; overflow-y:auto;
  box-shadow:0 24px 70px rgba(0,0,0,.3);
}
.cookie-modal__head {
  padding:22px 24px; border-bottom:1px solid #eef0e8;
  display:flex; justify-content:space-between; align-items:flex-start; gap:14px;
  position:sticky; top:0; background:#fff; z-index:1; border-radius:16px 16px 0 0;
}
.cookie-modal__title { font-size:20px; font-weight:700; color:#1f2a1a; margin:0; }
.cookie-modal__close { background:none; border:none; cursor:pointer; padding:4px; color:#677062; font-size:22px; line-height:1; }
.cookie-modal__close:hover { color:#1f2a1a; }

.cookie-modal__body { padding:22px 24px; }
.cookie-modal__intro { font-size:14px; line-height:1.55; color:#4b5246; margin:0 0 18px; }
.cookie-modal__intro a { color:#8FA417; text-decoration:underline; }

.cookie-category { border:1px solid #eef0e8; border-radius:10px; padding:14px 16px; margin-bottom:10px; }
.cookie-category__head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:6px; }
.cookie-category__name { font-size:15px; font-weight:600; color:#1f2a1a; margin:0; }
.cookie-category__desc { font-size:13px; line-height:1.5; color:#677062; margin:0; }

/* Toggle switch */
.cookie-toggle { position:relative; display:inline-block; width:44px; height:24px; flex:none; }
.cookie-toggle input { opacity:0; width:0; height:0; }
.cookie-toggle__slider { position:absolute; cursor:pointer; inset:0; background:#cdd6c0; border-radius:24px; transition:.2s; }
.cookie-toggle__slider::before { position:absolute; content:""; height:18px; width:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 2px 4px rgba(0,0,0,.15); }
.cookie-toggle input:checked + .cookie-toggle__slider { background:#B0CD1F; }
.cookie-toggle input:checked + .cookie-toggle__slider::before { transform:translateX(20px); }
.cookie-toggle input:disabled + .cookie-toggle__slider { opacity:.55; cursor:not-allowed; }

.cookie-modal__foot {
  padding:18px 24px; border-top:1px solid #eef0e8;
  display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end;
  position:sticky; bottom:0; background:#fff; border-radius:0 0 16px 16px;
}

/* Footer separator */
.footer-sep { margin:0 8px; color:#8FA417; }
.cookie-prefs-link { color:inherit; text-decoration:underline; }
.cookie-prefs-link:hover { color:#B0CD1F; }

/* Mobile */
@media (max-width:560px){
  .cookie-banner { left:8px; right:8px; bottom:8px; padding:16px 18px; border-radius:12px; }
  .cookie-banner__btn { min-width:0; }
  .cookie-modal { max-height:92vh; }
  .cookie-modal__head, .cookie-modal__body, .cookie-modal__foot { padding-left:18px; padding-right:18px; }
  .cookie-modal__foot { flex-direction:column-reverse; }
  .cookie-modal__foot .cookie-banner__btn { width:100%; }
}
