/* ============================================== */
/* Cookie Consent — Estilo AdOpt em navy+dourado  */
/* LGPD compliant · Resolução CD/ANPD 4/2024      */
/* ============================================== */

/* === MODAL CENTRALIZADO === */
.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cc-overlay.cc-show {
  display: flex;
  opacity: 1;
}

.cc-modal {
  background: linear-gradient(180deg, #141b2d 0%, #0b0f1e 100%);
  border: 1px solid rgba(201, 168, 76, 0.40);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 168, 76, 0.10) inset;
  font-family: 'Inter', sans-serif;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-overlay.cc-show .cc-modal {
  transform: scale(1);
}

/* === HEADER do modal === */
.cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(30, 45, 74, 0.5);
}
.cc-modal-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #c9a84c;
  letter-spacing: 0.2px;
  margin: 0;
  line-height: 1.3;
}
.cc-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: #c9a84c;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.cc-modal-close:hover {
  background: #c9a84c;
  color: #0b0f1e;
}

/* === BODY com categorias === */
.cc-modal-body {
  padding: 6px 24px 0;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 168, 76, 0.40) transparent;
}
.cc-modal-body::-webkit-scrollbar { width: 6px; }
.cc-modal-body::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.40);
  border-radius: 999px;
}

/* === Cada categoria === */
.cc-category {
  padding: 16px 0;
  border-bottom: 1px solid rgba(30, 45, 74, 0.5);
}
.cc-category:last-child { border-bottom: none; }

.cc-category-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cc-category-icon {
  width: 18px;
  height: 18px;
  color: #c9a84c;
  flex-shrink: 0;
}
.cc-category-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.cc-category-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #f5f7ff;
  margin: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.cc-category-count {
  font-size: 12px;
  color: #8892a4;
  font-weight: 500;
}

/* === TOGGLE estilo AdOpt === */
.cc-toggle {
  position: relative;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #1e2d4a;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease;
}
.cc-toggle-slider::before {
  content: "✓";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #8892a4;
  color: transparent;
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.cc-toggle input:checked + .cc-toggle-slider {
  background: rgba(201, 168, 76, 0.35);
}
.cc-toggle input:checked + .cc-toggle-slider::before {
  transform: translateX(20px);
  background: #c9a84c;
  color: #0b0f1e;
}
.cc-toggle input:disabled + .cc-toggle-slider {
  cursor: not-allowed;
  background: rgba(62, 207, 142, 0.25);
}
.cc-toggle input:disabled + .cc-toggle-slider::before {
  transform: translateX(20px);
  background: #3ecf8e;
  color: #0b0f1e;
}

/* === Descrição da categoria === */
.cc-category-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #b8c0cf;
  margin: 10px 0 8px;
}

/* === "Mostre mais" expandível === */
.cc-mostre-mais {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #c9a84c;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}
.cc-mostre-mais:hover { color: #e8c96e; }
.cc-mostre-mais .cc-chevron {
  transition: transform 0.25s ease;
  font-size: 14px;
  line-height: 1;
}
.cc-mostre-mais.cc-expanded .cc-chevron {
  transform: rotate(90deg);
}

.cc-category-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  font-size: 12px;
  line-height: 1.6;
  color: #8892a4;
  font-family: 'Consolas', monospace;
}
.cc-category-details.cc-expanded {
  max-height: 240px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(11, 15, 30, 0.6);
  border: 1px solid rgba(30, 45, 74, 0.6);
  border-radius: 6px;
}
.cc-category-details ul {
  margin: 0;
  padding-left: 16px;
}
.cc-category-details li { margin-bottom: 4px; }
.cc-category-details .cc-empty {
  font-style: italic;
  color: #5d6577;
}

/* === FOOTER do modal === */
.cc-modal-credit {
  padding: 14px 24px 8px;
  text-align: center;
  font-size: 12px;
  color: #8892a4;
}
.cc-modal-credit a {
  color: #c9a84c;
  text-decoration: none;
  font-weight: 600;
}
.cc-modal-credit a:hover { text-decoration: underline; }

.cc-modal-actions {
  display: flex;
  gap: 10px;
  padding: 12px 24px 22px;
  justify-content: space-between;
}
.cc-btn {
  flex: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.cc-btn-reject {
  background: transparent;
  border-color: rgba(201, 168, 76, 0.50);
  color: #c9a84c;
}
.cc-btn-reject:hover {
  background: rgba(201, 168, 76, 0.10);
  border-color: #c9a84c;
}
.cc-btn-save {
  background: #c9a84c;
  border-color: #c9a84c;
  color: #0b0f1e;
}
.cc-btn-save:hover {
  background: #e8c96e;
  border-color: #e8c96e;
  box-shadow: 0 6px 18px rgba(201, 168, 76, 0.30);
}

/* === BOTÃO FLUTUANTE com brasão (sempre visível) === */
.cc-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #141b2d 0%, #0b0f1e 100%);
  border: 1.5px solid rgba(201, 168, 76, 0.50);
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(201, 168, 76, 0.10) inset;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 6px;
}
.cc-floating-btn:hover {
  transform: scale(1.08) translateY(-2px);
  border-color: #c9a84c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(201, 168, 76, 0.20);
}
.cc-floating-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.cc-floating-btn::after {
  content: "Privacidade e cookies";
  position: absolute;
  right: 100%;
  margin-right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #141b2d;
  color: #c9a84c;
  border: 1px solid rgba(201, 168, 76, 0.40);
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.cc-floating-btn:hover::after { opacity: 1; }

/* === Link discreto no footer para reabrir === */
.cc-reopen-link {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.cc-reopen-link:hover { color: #c9a84c; }

/* === RESPONSIVO === */
@media (max-width: 520px) {
  .cc-modal { max-width: 100%; max-height: 92vh; border-radius: 16px; }
  .cc-modal-header { padding: 18px 20px 14px; }
  .cc-modal-body { padding: 4px 20px 0; }
  .cc-modal-credit { padding: 12px 20px 6px; }
  .cc-modal-actions { padding: 10px 20px 18px; }
  .cc-floating-btn { bottom: 16px; right: 16px; width: 48px; height: 48px; }
  .cc-floating-btn::after { display: none; } /* tooltip não em mobile */
}

/* === Respeita reduced-motion === */
@media (prefers-reduced-motion: reduce) {
  .cc-overlay, .cc-modal, .cc-floating-btn { transition: opacity 0.15s ease; }
  .cc-overlay.cc-show .cc-modal { transform: none; }
}
