/* Consentimento de cookies e bloqueio de conteúdo de terceiros | Maciel & Farias */

.cc, .cc-modal, .cc-gate {
  --cc-navy-950: #070d24;
  --cc-navy-900: #0b1533;
  --cc-navy: #121f48;
  --cc-bronze: #85754e;
  --cc-bronze-300: #bfae80;
  --cc-bronze-200: #ddd0ab;
  --cc-text: rgba(236, 233, 224, .78);
  --cc-line: rgba(221, 208, 171, .2);
  --cc-ease: cubic-bezier(.16, 1, .3, 1);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Banner ---------- */
.cc {
  position: fixed; z-index: 400; left: 24px; bottom: 24px;
  width: min(760px, calc(100% - 140px));
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--cc-ease), transform .6s var(--cc-ease);
}
.cc.is-in { opacity: 1; transform: none; }
.cc[hidden] { display: none; }
.cc__card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: start;
  padding: 22px 24px;
  border-radius: 24px; border: 1px solid var(--cc-line);
  background: linear-gradient(160deg, rgba(27, 44, 95, .96), rgba(7, 13, 36, .97) 70%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .7);
  color: #fff;
}
.cc__card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cc-bronze-300), transparent);
}
.cc__icon {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(191, 174, 128, .12); border: 1px solid var(--cc-line); color: var(--cc-bronze-300);
}
.cc__icon svg { width: 24px; height: 24px; }
.cc__text strong {
  display: block; margin-bottom: 4px;
  font-family: "Cormorant Garamond", "Times New Roman", serif; font-size: 1.4rem; font-weight: 600; line-height: 1.15; color: #fff;
}
.cc__text p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--cc-text); }
.cc a { color: var(--cc-bronze-200); text-decoration: underline; text-underline-offset: 3px; }
.cc a:hover { color: #fff; }
.cc__actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.cc__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-size: .86rem; font-weight: 700; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .35s var(--cc-ease), background .3s, border-color .3s, color .3s, box-shadow .3s;
}
.cc__btn:hover { transform: translateY(-2px); }
.cc__btn:focus-visible, .cc__link:focus-visible, .cc-modal__close:focus-visible { outline: 2px solid var(--cc-bronze-200); outline-offset: 3px; }
.cc__btn--gold {
  background: linear-gradient(135deg, var(--cc-bronze-300), var(--cc-bronze) 55%, #6f6141); color: #fff;
  box-shadow: 0 14px 30px -14px rgba(133, 117, 78, .9);
}
.cc__btn--ghost { background: rgba(255, 255, 255, .05); color: #fff; border-color: rgba(221, 208, 171, .45); }
.cc__btn--ghost:hover { border-color: var(--cc-bronze-300); background: rgba(221, 208, 171, .12); }
.cc__link {
  margin-left: 4px; padding: 8px 4px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .86rem; font-weight: 600; color: var(--cc-bronze-200);
  text-decoration: underline; text-underline-offset: 4px;
}
.cc__link:hover { color: #fff; }

/* ---------- Preferências ---------- */
.cc-modal {
  width: min(640px, calc(100% - 24px)); max-height: min(88vh, 860px);
  margin: auto; padding: 0; border: 0; border-radius: 28px;
  background: transparent; color: #fff; overflow: visible;
}
.cc-modal::backdrop { background: rgba(4, 8, 22, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cc-modal[open] { animation: ccModalIn .5s var(--cc-ease); }
.cc-modal__box {
  display: flex; flex-direction: column; max-height: inherit;
  border-radius: 28px; border: 1px solid var(--cc-line);
  background: linear-gradient(170deg, var(--cc-navy) 0%, var(--cc-navy-950) 65%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8); overflow: hidden;
}
.cc-modal__head { position: relative; display: flex; gap: 16px; padding: 28px 28px 20px; border-bottom: 1px solid var(--cc-line); }
.cc-modal__head h2 {
  margin: 0 0 6px; padding-right: 36px;
  font-family: "Cormorant Garamond", "Times New Roman", serif; font-size: 1.8rem; font-weight: 600; line-height: 1.1; color: #fff;
}
.cc-modal__head p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--cc-text); }
.cc-modal__close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--cc-line); background: rgba(255, 255, 255, .04); color: #fff;
  transition: transform .4s var(--cc-ease), border-color .3s;
}
.cc-modal__close:hover { transform: rotate(90deg); border-color: var(--cc-bronze-300); }
.cc-modal__close svg { width: 18px; height: 18px; }
.cc-modal__list { padding: 8px 28px; overflow-y: auto; overscroll-behavior: contain; }
.cc-cat { padding: 20px 0; border-bottom: 1px solid var(--cc-line); }
.cc-cat:last-child { border-bottom: 0; }
.cc-cat__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.cc-cat__title { font-weight: 700; font-size: .98rem; color: #fff; cursor: pointer; }
.cc-cat__always { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cc-bronze-300); }
.cc-cat p { margin: 0 0 8px; font-size: .84rem; line-height: 1.6; color: var(--cc-text); }
.cc-cat ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.cc-cat li { position: relative; padding-left: 16px; font-size: .78rem; color: rgba(236, 233, 224, .6); }
.cc-cat li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; transform: rotate(45deg); background: var(--cc-bronze-300); }

.cc-switch { position: relative; flex: none; width: 50px; height: 28px; }
.cc-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch__track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid var(--cc-line);
  transition: background .3s, border-color .3s;
}
.cc-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .35s var(--cc-ease);
}
.cc-switch input:checked + .cc-switch__track { background: var(--cc-bronze); border-color: var(--cc-bronze-300); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(22px); }
.cc-switch input:focus-visible + .cc-switch__track { outline: 2px solid var(--cc-bronze-200); outline-offset: 3px; }

.cc-modal__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 18px 28px 24px; border-top: 1px solid var(--cc-line);
}
.cc-modal__foot > div { display: flex; gap: 10px; flex-wrap: wrap; }
.cc-modal__foot a { font-size: .82rem; color: var(--cc-bronze-200); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Bloqueio de conteúdo de terceiros (mapa, vídeo) ---------- */
.cc-gate {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center; padding: 28px; text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(191, 174, 128, .14), transparent 70%),
    repeating-linear-gradient(0deg, rgba(221, 208, 171, .05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(221, 208, 171, .05) 0 1px, transparent 1px 44px),
    var(--cc-navy-900);
  color: #fff;
}
.cc-gate[hidden] { display: none; }
.cc-gate__inner { max-width: 460px; display: grid; justify-items: center; gap: 12px; }
.cc-gate__icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(191, 174, 128, .14); border: 1px solid var(--cc-line); color: var(--cc-bronze-300);
}
.cc-gate__icon svg { width: 26px; height: 26px; }
.cc-gate strong { font-family: "Cormorant Garamond", "Times New Roman", serif; font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.cc-gate p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--cc-text); }
.cc-gate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.cc-gate__actions a.cc__btn { text-decoration: none; }

@keyframes ccModalIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .cc { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .cc__card { grid-template-columns: 1fr; padding: 20px 18px 16px; border-radius: 22px; }
  .cc__icon { display: none; }
  .cc__actions { grid-column: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .cc__btn { padding: 0 12px; }
  .cc__link { grid-column: 1 / -1; justify-self: center; margin: 0; }
  .cc-open .wa, .cc-open .to-top { opacity: 0; pointer-events: none; }
  .cc-modal__head { padding: 22px 20px 16px; }
  .cc-modal__head .cc__icon { display: none; }
  .cc-modal__list { padding: 4px 20px; }
  .cc-modal__foot { padding: 16px 20px 20px; }
  .cc-modal__foot > div { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .cc-gate { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc, .cc-modal[open], .cc__btn, .cc-switch__track::after, .cc-modal__close { transition: none; animation: none; }
  .cc { transform: none; }
}
