/* Cookie banner V2 — samurai-seo.pl (accent #6D28D9)
   Full-width bottom strip + modal z togglami — UODO 2025 + EDPB 03/2022 compliant */

/* ── Banner (layer 1) — full-width bottom strip ─────────────────────────── */
#cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999999;
  background: #fff;
  box-shadow: 0 -8px 32px -8px rgba(15,37,64,0.18), 0 -2px 8px rgba(15,37,64,0.06);
  border-top: 1px solid rgba(15,37,64,0.08);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  animation: cookie-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#cookie-banner.cookie-banner--closing { animation: cookie-slide-down 0.2s ease-in forwards; }
@keyframes cookie-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes cookie-slide-down { to { transform: translateY(100%); } }

.cookie-banner-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.cookie-banner-text strong {
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
  color: #1E1B2E;
  font-weight: 600;
}
.cookie-banner-text p {
  font-size: 13.5px;
  color: rgba(15,37,64,0.72);
  margin: 0;
  line-height: 1.55;
  max-width: 760px;
}
.cookie-banner-link {
  color: #6D28D9;
  text-decoration: underline;
  font-weight: 500;
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Buttons — Accept/Reject equal weight (UODO 2025) */
.cookie-btn {
  padding: 11px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  min-width: 120px;
}
.cookie-btn-primary {
  background: #6D28D9; color: #fff; border-color: #6D28D9;
}
.cookie-btn-primary:hover { background: #5B21B6; border-color: #5B21B6; }
.cookie-btn-secondary {
  background: #fff; color: #1E1B2E; border-color: rgba(15,37,64,0.22);
}
.cookie-btn-secondary:hover { background: rgba(15,37,64,0.04); border-color: rgba(15,37,64,0.35); }

/* ── Modal (layer 2) — szczegółowe ustawienia ─────────────────────────── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  animation: cookie-fade-in 0.2s ease-out;
}
#cookie-modal.cookie-modal--closing { animation: cookie-fade-out 0.15s ease-in forwards; }
@keyframes cookie-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cookie-fade-out { to { opacity: 0; } }

.cookie-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,37,64,0.55);
  backdrop-filter: blur(4px);
}
.cookie-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px -16px rgba(15,37,64,0.30);
}
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(15,37,64,0.08);
}
.cookie-modal-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #1E1B2E;
  font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
}
.cookie-modal-close {
  background: transparent; border: 0; font-size: 28px; line-height: 1;
  cursor: pointer; color: rgba(15,37,64,0.55); padding: 4px 10px; border-radius: 6px;
}
.cookie-modal-close:hover { background: rgba(15,37,64,0.06); color: #1E1B2E; }

.cookie-modal-intro { padding: 16px 24px 0; }
.cookie-modal-intro p { margin: 0; font-size: 13.5px; line-height: 1.6; color: rgba(15,37,64,0.72); }

.cookie-modal-categories {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.cookie-category { padding: 16px 0; border-bottom: 1px solid rgba(15,37,64,0.06); }
.cookie-category:first-child { padding-top: 0; }
.cookie-category:last-child { border-bottom: 0; padding-bottom: 0; }
.cookie-category-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.cookie-category-title { font-size: 14.5px; color: #1E1B2E; }
.cookie-category-title strong { font-weight: 600; }
.cookie-required { font-size: 11.5px; color: rgba(15,37,64,0.55); font-weight: 500; margin-left: 4px; }
.cookie-category-desc { margin: 0; font-size: 12.5px; color: rgba(15,37,64,0.66); line-height: 1.55; padding-left: 60px; }

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle-slider {
  position: absolute; cursor: pointer;
  inset: 0;
  background: rgba(15,37,64,0.22);
  border-radius: 24px;
  transition: background 0.2s;
}
.cookie-toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: #6D28D9; }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(20px); }
.cookie-toggle input:disabled + .cookie-toggle-slider { opacity: 0.65; cursor: not-allowed; }

.cookie-modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(15,37,64,0.08);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cookie-modal-footer .cookie-btn { flex: 1; min-width: 140px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cookie-banner-inner { grid-template-columns: 1fr; padding: 16px 20px; gap: 14px; }
  .cookie-banner-actions { flex-direction: column-reverse; }
  .cookie-btn { width: 100%; }
  .cookie-modal-card { width: calc(100% - 16px); max-height: calc(100vh - 24px); border-radius: 12px; }
  .cookie-category-desc { padding-left: 0; margin-top: 4px; }
  .cookie-modal-footer { flex-direction: column-reverse; }
  .cookie-modal-footer .cookie-btn { width: 100%; }
}
