.cookie-consent-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(92vw, 480px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  padding: 24px;
  z-index: 1080;
  display: none;
}

.cookie-consent-banner.is-visible {
  display: block;
}

.cookie-consent-banner[hidden] {
  display: none !important;
}

.cookie-consent-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-consent-banner__title {
  font-size: 1.15rem;
  margin: 0;
  font-weight: 600;
  color: #111827;
}

.cookie-consent-banner__message {
  margin: 0;
  color: #4b5563;
  line-height: 1.5;
  font-size: 0.95rem;
}

.cookie-consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-consent-banner__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.cookie-consent__btn {
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-consent__btn:hover {
  background: #f3f4f6;
}

.cookie-consent__btn--primary {
  background: #1f2937;
  border-color: #1f2937;
  color: #fff;
}

.cookie-consent__btn--primary:hover {
  background: #111827;
}

.cookie-consent__btn-link,
.cookie-consent__link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
}

.cookie-consent__btn-link:hover,
.cookie-consent__link:hover {
  color: #1d4ed8;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
}

.cookie-preferences.is-visible {
  display: flex;
}

.cookie-preferences[hidden] {
  display: none !important;
}

.cookie-preferences__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.cookie-preferences__dialog {
  position: relative;
  background: #fff;
  width: min(94vw, 640px);
  margin: auto;
  border-radius: 18px;
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.cookie-preferences__header,
.cookie-preferences__footer {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cookie-preferences__footer {
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.cookie-preferences__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.cookie-preferences__close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

.cookie-preferences__close:hover {
  color: #111827;
}

.cookie-preferences__body {
  padding: 16px 24px 24px;
  overflow-y: auto;
}

.cookie-preferences__intro {
  color: #4b5563;
  font-size: 0.95rem;
  margin-top: 0;
  margin-bottom: 16px;
}

.cookie-preferences__item {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #f9fafb;
}

.cookie-preferences__item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cookie-preferences__item-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.cookie-preferences__description {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.cookie-preferences__badge {
  background: #1f2937;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.cookie-preferences__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #111827;
}

.cookie-preferences__toggle input[type="checkbox"] {
  accent-color: #2563eb;
  width: 18px;
  height: 18px;
}

.cookie-preferences__note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: #4b5563;
  background: #f1f5f9;
  padding: 12px 14px;
  border-radius: 12px;
}

body.cookie-preferences-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .cookie-consent-banner {
    padding: 20px;
    bottom: 16px;
  }

  .cookie-consent-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-banner__links {
    flex-direction: column;
    align-items: flex-start;
  }
}
