/* STRADI SEO — kompaktowy baner cookies */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  pointer-events: none;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.cookie-consent.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-consent-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 0.85rem clamp(1rem, 3vw, 2.5rem);
  background: #151b28;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
}

.cookie-consent-copy {
  flex: 1;
  min-width: 0;
}

.cookie-consent-title {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.cookie-consent-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #94a3b8;
}

.cookie-consent-text a {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
}

.cookie-consent-text a:hover {
  text-decoration: underline;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-cookie-primary,
.btn-cookie-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-cookie-secondary {
  color: #e2e8f0;
  background: #2a3344;
  border: 1px solid #3d4a5f;
}

.btn-cookie-secondary:hover {
  background: #343f52;
  border-color: #4b5a73;
}

.btn-cookie-primary {
  color: #fff;
  background: #2563eb;
  border: 1px solid #2563eb;
}

.btn-cookie-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.cookie-consent-expand {
  max-height: 0;
  overflow: hidden;
  background: #111827;
  border-top: 1px solid transparent;
  transition: max-height 0.35s ease, border-color 0.2s;
}

.cookie-consent.is-expanded .cookie-consent-expand {
  border-top-color: rgba(148, 163, 184, 0.12);
}

.cookie-consent-expand[hidden] {
  display: block;
  max-height: 0;
}

.cookie-consent.is-expanded .cookie-consent-expand {
  max-height: 280px;
}

.cookie-consent-expand-inner {
  padding: 1rem clamp(1rem, 3vw, 2.5rem) 1.1rem;
}

.cookie-pref-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.cookie-pref-item {
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.cookie-pref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.cookie-pref-head strong {
  font-size: 0.82rem;
  color: #f1f5f9;
}

.cookie-pref-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.cookie-pref-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}

.cookie-pref-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  margin: 0;
  font-weight: 600;
  font-size: 0.82rem;
  color: #f1f5f9;
  width: 100%;
  justify-content: space-between;
}

.cookie-pref-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-pref-switch {
  position: relative;
  width: 40px;
  height: 22px;
  background: #475569;
  border-radius: 999px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cookie-pref-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cookie-pref-toggle input:checked + .cookie-pref-switch {
  background: #2563eb;
}

.cookie-pref-toggle input:checked + .cookie-pref-switch::after {
  transform: translateX(18px);
}

.cookie-consent-expand-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

body.cookie-banner-visible {
  padding-bottom: 4.5rem;
}

body.cookie-banner-expanded {
  padding-bottom: 12rem;
}

.cookie-settings-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.cookie-settings-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cookie-consent-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .cookie-consent-actions {
    flex-wrap: wrap;
  }

  .btn-cookie-primary,
  .btn-cookie-secondary {
    flex: 1;
    min-width: calc(50% - 0.25rem);
  }

  #cookieAcceptAllBtn {
    flex: 1 1 100%;
  }

  .cookie-pref-list {
    grid-template-columns: 1fr;
  }

  body.cookie-banner-visible {
    padding-bottom: 9rem;
  }

  body.cookie-banner-expanded {
    padding-bottom: 18rem;
  }

  .cookie-consent.is-expanded .cookie-consent-expand {
    max-height: 360px;
  }
}
