/* cookie-consent.css — Banner de cookies (LGPD) — segue o visual do style.css (Inter, #2563eb, cantos 8–14px) */
:root {
  --cc-primary: var(--primary, #2563eb);
  --cc-primary-dark: var(--secondary, #1e40af);
  --cc-text: var(--text, #1f2937);
  --cc-muted: var(--muted, #6b7280);
  --cc-bg: #ffffff;
  --cc-soft: #f3f4f6;
  --cc-border: #d1d5db;
}

.cc-banner, .cc-modal, .cc-placeholder {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--cc-text);
  line-height: 1.5;
  box-sizing: border-box;
}
.cc-banner *, .cc-modal *, .cc-placeholder * { box-sizing: border-box; }
.cc-banner[hidden], .cc-modal[hidden] { display: none !important; }

/* ---------- Banner (rodapé da tela, não cobre a página) ---------- */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px));
  max-height: 60vh;
  overflow-y: auto;
  background: var(--cc-bg);
  border-radius: 14px;
  border-top: 4px solid var(--cc-primary);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  z-index: 10000;
  animation: cc-up .35s ease-out;
}
.cc-banner:focus, .cc-banner:focus-visible { outline: none; }
.cc-banner__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
}
.cc-banner__text { flex: 1 1 auto; font-size: 0.92rem; }
.cc-banner__title { font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; color: var(--cc-text); }
.cc-banner__text p { margin: 0; text-align: left; }
.cc-banner a, .cc-modal a, .cc-placeholder a { color: var(--cc-primary); text-decoration: underline; font-weight: 500; }
.cc-banner a:hover, .cc-modal a:hover { color: var(--cc-primary-dark); }
.cc-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 230px;
}

/* ---------- Botões: todos com o MESMO destaque ---------- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--cc-primary);
  border-radius: 8px;
  background: var(--cc-primary);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: background .18s ease, transform .18s ease;
}
.cc-btn:hover { background: var(--cc-primary-dark); border-color: var(--cc-primary-dark); transform: translateY(-1px); }
.cc-btn:focus-visible, .cc-close:focus-visible, .cc-switch input:focus-visible + .cc-switch__track {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}
.cc-btn--sm { min-height: 38px; padding: 8px 14px; width: auto; font-size: 0.9rem; }
.cc-btn--ghost { background: #fff; color: var(--cc-primary); }
.cc-btn--ghost:hover { background: #e0e7ff; color: var(--cc-primary-dark); }

/* ---------- Painel de preferências ---------- */
html.cc-modal-open { overflow: hidden; }
.cc-modal { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.cc-modal__dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--cc-bg);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: cc-up .25s ease-out;
}
.cc-modal__dialog:focus { outline: none; }
.cc-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #e5e7eb; }
.cc-modal__title { font-size: 1.25rem; margin: 0; text-align: left; }
.cc-modal__title::after { display: none !important; content: none !important; }
.cc-close { background: transparent; border: 0; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; border-radius: 8px; cursor: pointer; color: var(--cc-muted); }
.cc-close:hover { background: var(--cc-soft); color: var(--cc-text); }
.cc-modal__body { padding: 16px 22px; overflow-y: auto; font-size: 0.93rem; }
.cc-modal__body > p { margin: 0 0 14px; text-align: left; }
.cc-modal__footer { display: flex; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid #e5e7eb; }
.cc-modal__footer .cc-btn { flex: 1 1 0; }

.cc-cat { background: var(--cc-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.cc-cat__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-cat__label { font-weight: 700; flex: 1 1 auto; cursor: pointer; }
.cc-cat__desc { margin: 6px 0 0; color: #374151; font-size: 0.88rem; text-align: left; }
.cc-cat__desc em { color: var(--cc-muted); }
.cc-tag { font-size: 0.75rem; font-weight: 500; background: #dbeafe; color: var(--cc-primary-dark); padding: 2px 8px; border-radius: 50px; }
.cc-tag--muted { background: #e5e7eb; color: #4b5563; }

/* Interruptor acessível (checkbox real por baixo) */
.cc-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 auto; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch__track { position: absolute; inset: 0; background: #9ca3af; border-radius: 50px; transition: background .2s; }
.cc-switch__track::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cc-switch input:checked + .cc-switch__track { background: var(--cc-primary); }
.cc-switch input:checked + .cc-switch__track::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-switch__track { opacity: .55; }

/* ---------- Placeholder de iframes bloqueados ---------- */
.cc-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 8px;
  width: 100%; padding: 18px; text-align: center;
  background: #eef2ff; border: 1px dashed #93c5fd; border-radius: 10px; margin-top: 10px;
}
.cc-placeholder--fill { position: absolute; inset: 0; margin: 0; border-radius: inherit; overflow: auto; }
.cc-placeholder__title { font-weight: 700; margin: 0; color: var(--cc-text); }
.cc-placeholder__text { margin: 0; font-size: 0.88rem; color: #374151; max-width: 460px; }
.cc-placeholder__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.cc-placeholder__ext { font-size: 0.85rem; }

/* Link do rodapé */
.footer-links a[data-cc-open] { cursor: pointer; }

@keyframes cc-up { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.cc-modal__dialog { animation-name: cc-fade; }
@keyframes cc-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Celular / tablet ---------- */
@media (max-width: 760px) {
  .cc-banner { bottom: 8px; width: calc(100% - 16px); max-height: 70vh; }
  .cc-banner__inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .cc-banner__text { font-size: 0.86rem; }
  .cc-banner__actions { flex: none; }
  .cc-modal { padding: 0; align-items: flex-end; }
  .cc-modal__dialog { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .cc-modal__footer { flex-direction: column; }
  .cc-placeholder--fill .cc-placeholder__text { font-size: 0.8rem; }
}
/* Telas estreitas: no modo "fill" (vídeo 16:9) o espaço é pequeno, então compacta */
@media (max-width: 560px) {
  .cc-placeholder--fill { padding: 10px; gap: 6px; }
  .cc-placeholder--fill .cc-placeholder__title { font-size: 0.92rem; }
  .cc-placeholder--fill .cc-placeholder__text { font-size: 0.74rem; line-height: 1.35; }
  .cc-placeholder--fill .cc-placeholder__actions { flex-wrap: nowrap; }
  .cc-placeholder--fill .cc-btn { padding: 8px 12px; font-size: 0.85rem; min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-modal__dialog { animation: none; }
  .cc-btn, .cc-switch__track, .cc-switch__track::before { transition: none; }
}
