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

.fb-consent {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.fb-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.fb-consent__panel {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: min(680px, calc(100% - 2rem));
  background: #ffffff;
  color: #1b1f23;
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.fb-consent__content {
  padding: 1.25rem;
}

.fb-consent__title {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.2;
}

.fb-consent__text {
  margin: 0 0 1rem;
  color: #4b5563;
}

.fb-consent__categories {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.fb-consent__category {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.fb-consent__category p {
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.fb-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fb-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.fb-btn--primary {
  background: #0f172a;
  color: #fff;
}

.fb-btn--secondary {
  background: #2563eb;
  color: #fff;
}

.fb-btn--ghost {
  background: #e5e7eb;
  color: #111827;
}

.fb-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.fb-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fb-switch span {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  display: inline-block;
  position: relative;
  transition: background 0.2s ease;
}

.fb-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.fb-switch input:checked + span {
  background: #2563eb;
}

.fb-switch input:checked + span::after {
  transform: translateX(22px);
}

.fb-switch input:disabled + span {
  background: #0f172a;
}

.fb-consent-open {
  overflow: hidden;
}

.fb-consent-open-button {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 999;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

.fb-consent-open-button:hover,
.fb-consent-open-button:focus-visible {
  background: #1e293b;
}

@media (max-width: 640px) {
  .fb-consent__panel {
    left: 1rem;
    right: 1rem;
    width: auto;
  }

  .fb-consent__category {
    flex-direction: column;
    align-items: flex-start;
  }

  .fb-consent__actions {
    flex-direction: column;
  }

  .fb-btn {
    width: 100%;
  }

  .fb-consent-open-button {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}
