/* Cookie consent — Bruna Fialho (LGPD) */
.bf-cc-banner,
.bf-cc-modal {
  --bf-cc-bg: #fffbf5;
  --bf-cc-title: #173f47;
  --bf-cc-text: #5f6f73;
  --bf-cc-coral: #e27662;
  --bf-cc-coral-hover: #d06554;
  --bf-cc-teal: #2d646d;
  --bf-cc-border: rgba(23, 63, 71, 0.1);
  --bf-cc-shadow: 0 14px 40px rgba(23, 63, 71, 0.1);
  --bf-cc-radius: 18px;
  font-family: "Montserrat", Arial, sans-serif;
  box-sizing: border-box;
}

.bf-cc-banner *,
.bf-cc-modal *,
.bf-cc-banner *::before,
.bf-cc-banner *::after,
.bf-cc-modal *::before,
.bf-cc-modal *::after {
  box-sizing: border-box;
}

.bf-cc-banner {
  position: fixed;
  z-index: 10050;
  right: 12px;
  left: auto;
  bottom: 20px;
  width: min(220px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  padding: 8px 10px 7px;
  background: var(--bf-cc-bg);
  color: var(--bf-cc-text);
  border: 1px solid var(--bf-cc-border);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(23, 63, 71, 0.08);
}

.bf-cc-banner[hidden],
.bf-cc-overlay[hidden],
.bf-cc-modal[hidden] {
  display: none !important;
}

.bf-cc-banner__title {
  margin: 0 0 3px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bf-cc-title);
}

.bf-cc-banner__text {
  margin: 0 0 6px;
  font-size: 0.625rem;
  line-height: 1.35;
  color: var(--bf-cc-text);
}

.bf-cc-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bf-cc-banner .bf-cc-btn {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 0.5625rem;
  letter-spacing: 0.02em;
  border-width: 1px;
  border-radius: 999px;
}

.bf-cc-banner .bf-cc-btn--ghost {
  min-height: 20px;
  font-size: 0.5625rem;
  padding: 1px 4px;
  text-underline-offset: 2px;
}

.bf-cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    opacity 0.2s ease;
}

.bf-cc-btn:focus-visible {
  outline: 3px solid var(--bf-cc-teal);
  outline-offset: 2px;
}

.bf-cc-btn--primary {
  background: var(--bf-cc-coral);
  color: #fff;
  border-color: var(--bf-cc-coral);
}

.bf-cc-btn--primary:hover {
  background: var(--bf-cc-coral-hover);
  border-color: var(--bf-cc-coral-hover);
}

.bf-cc-btn--outline {
  background: transparent;
  color: var(--bf-cc-teal);
  border-color: var(--bf-cc-teal);
}

.bf-cc-btn--outline:hover {
  background: rgba(45, 100, 109, 0.08);
}

.bf-cc-btn--reject {
  background: var(--bf-cc-teal);
  color: #fff;
  border-color: var(--bf-cc-teal);
}

.bf-cc-btn--reject:hover {
  background: #24545c;
  border-color: #24545c;
}

.bf-cc-btn--ghost {
  background: transparent;
  color: var(--bf-cc-title);
  border-color: transparent;
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 600;
  font-size: 0.875rem;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bf-cc-btn--ghost:hover {
  color: var(--bf-cc-teal);
}

.bf-cc-btn--secondary {
  background: #fff;
  color: var(--bf-cc-title);
  border-color: var(--bf-cc-border);
}

.bf-cc-btn--secondary:hover {
  border-color: var(--bf-cc-teal);
  color: var(--bf-cc-teal);
}

.bf-cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(23, 63, 71, 0.45);
}

.bf-cc-modal {
  position: fixed;
  z-index: 10070;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px));
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--bf-cc-bg);
  color: var(--bf-cc-text);
  border: 1px solid var(--bf-cc-border);
  border-radius: var(--bf-cc-radius);
  box-shadow: var(--bf-cc-shadow);
}

.bf-cc-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
  flex-shrink: 0;
}

.bf-cc-modal__title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--bf-cc-title);
}

.bf-cc-modal__close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--bf-cc-title);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.bf-cc-modal__close:hover {
  background: rgba(23, 63, 71, 0.06);
}

.bf-cc-modal__close:focus-visible {
  outline: 3px solid var(--bf-cc-teal);
  outline-offset: 2px;
}

.bf-cc-modal__body {
  padding: 12px 22px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.bf-cc-modal__intro {
  margin: 0 0 8px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.bf-cc-modal__policy {
  margin: 0 0 18px;
  font-size: 0.8125rem;
}

.bf-cc-modal__policy a {
  color: var(--bf-cc-teal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bf-cc-modal__policy a:focus-visible {
  outline: 3px solid var(--bf-cc-teal);
  outline-offset: 2px;
}

.bf-cc-category {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--bf-cc-border);
}

.bf-cc-category:last-child {
  border-bottom: 1px solid var(--bf-cc-border);
}

.bf-cc-category__copy {
  flex: 1 1 auto;
  min-width: 0;
}

.bf-cc-category__name {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--bf-cc-title);
}

.bf-cc-category__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--bf-cc-text);
}

.bf-cc-category__badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--bf-cc-teal);
}

.bf-cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 28px;
  margin-top: 2px;
}

.bf-cc-switch__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.bf-cc-switch__input:disabled {
  cursor: not-allowed;
}

.bf-cc-switch__track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(95, 111, 115, 0.28);
  border: 1px solid var(--bf-cc-border);
  transition: background-color 0.2s ease;
  pointer-events: none;
}

.bf-cc-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 63, 71, 0.2);
  transition: transform 0.2s ease;
}

.bf-cc-switch__input:checked + .bf-cc-switch__track {
  background: var(--bf-cc-teal);
  border-color: var(--bf-cc-teal);
}

.bf-cc-switch__input:checked + .bf-cc-switch__track::after {
  transform: translateX(20px);
}

.bf-cc-switch__input:focus-visible + .bf-cc-switch__track {
  outline: 3px solid var(--bf-cc-coral);
  outline-offset: 2px;
}

.bf-cc-switch__input:disabled:checked + .bf-cc-switch__track {
  background: var(--bf-cc-teal);
  opacity: 0.85;
}

.bf-cc-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--bf-cc-border);
  flex-shrink: 0;
  background: var(--bf-cc-bg);
}

.bf-cc-modal__footer .bf-cc-btn {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 36px;
  padding: 6px 16px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  border-width: 1.5px;
}

body.bf-cc-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .bf-cc-banner {
    left: auto;
    right: 10px;
    bottom: 96px;
    width: min(200px, calc(100% - 20px));
    max-width: calc(100vw - 20px);
    padding: 7px 8px 6px;
  }

  .bf-cc-banner__actions {
    gap: 3px;
  }

  .bf-cc-banner__actions .bf-cc-btn {
    width: 100%;
  }

  .bf-cc-modal {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
    border: none;
  }

  .bf-cc-modal__header {
    padding: 18px 16px 0;
  }

  .bf-cc-modal__body {
    padding: 12px 16px;
  }

  .bf-cc-modal__footer {
    flex-direction: row;
    justify-content: flex-end;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .bf-cc-modal__footer .bf-cc-btn {
    width: auto;
    min-width: 0;
  }
}

@media (min-width: 641px) {
  .bf-cc-banner {
    bottom: 108px;
  }

  .bf-cc-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }
}
