/* Widget de consentimento de cookies (LGPD) — compartilhado entre index.html e "cookies dados.html" */
:root{
  --cc-surface:#ffffff;
  --cc-text:#1a1d23;
  --cc-text-muted:#5b6270;
  --cc-border:#e2e5ea;
  --cc-accent:#2f6f4f;
  --cc-accent-hover:#255a40;
  --cc-accent-soft:#e7f2ec;
  --cc-focus:#2f6f4f;
  --cc-shadow:0 8px 30px rgba(20,20,30,.16);
  --cc-radius:14px;
}
#cc-banner, #cc-pref-overlay, #cc-reopen-btn{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  box-sizing:border-box;
  line-height:1.5;
}
#cc-banner *, #cc-pref-overlay *{box-sizing:border-box;}

/* ---- Banner ---- */
#cc-banner{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:9999;
  background:var(--cc-surface);
  border-top:1px solid var(--cc-border);
  box-shadow:var(--cc-shadow);
  padding:20px 24px;
  transform:translateY(120%);
  transition:transform .35s ease;
}
#cc-banner.show{transform:translateY(0);}
.cc-banner-inner{
  max-width:1080px;
  margin:0 auto;
  display:flex;
  gap:24px;
  align-items:center;
  flex-wrap:wrap;
}
.cc-banner-text{flex:1 1 420px; min-width:260px;}
.cc-banner-text strong{display:block; margin-bottom:4px; font-size:1rem; color:var(--cc-text);}
.cc-banner-text p{margin:0; font-size:.88rem; color:var(--cc-text-muted);}
.cc-banner-text a{color:var(--cc-accent);}
.cc-banner-actions{display:flex; gap:10px; flex-wrap:wrap; flex-shrink:0;}

#cc-banner button, #cc-pref-overlay button{
  font-family:inherit;
  cursor:pointer;
  border-radius:9px;
  border:1px solid transparent;
  padding:10px 16px;
  font-size:.88rem;
  font-weight:600;
  transition:background .15s, border-color .15s, color .15s;
}
#cc-banner button:focus-visible, #cc-pref-overlay button:focus-visible{outline:3px solid var(--cc-focus); outline-offset:2px;}
.cc-btn-primary{background:var(--cc-accent); color:#fff;}
.cc-btn-primary:hover{background:var(--cc-accent-hover);}
.cc-btn-outline{background:transparent; border-color:var(--cc-border); color:var(--cc-text);}
.cc-btn-outline:hover{border-color:var(--cc-accent); color:var(--cc-accent);}
.cc-btn-ghost{background:transparent; color:var(--cc-text-muted); border-color:transparent; text-decoration:underline; padding:10px 6px;}

/* ---- Modal ---- */
#cc-pref-overlay{
  position:fixed; inset:0;
  background:rgba(20,22,26,.5);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
  padding:20px;
}
#cc-pref-overlay.show{display:flex;}
#cc-pref-modal{
  background:var(--cc-surface);
  border-radius:var(--cc-radius);
  max-width:640px;
  width:100%;
  max-height:88vh;
  overflow-y:auto;
  box-shadow:var(--cc-shadow);
  color:var(--cc-text);
}
.cc-modal-head{
  padding:22px 26px 14px;
  border-bottom:1px solid var(--cc-border);
  position:sticky; top:0; background:var(--cc-surface);
}
.cc-modal-head h2{margin:0 0 4px; font-size:1.25rem;}
.cc-modal-head p{margin:0; color:var(--cc-text-muted); font-size:.88rem;}
.cc-modal-body{padding:10px 26px 6px;}
.cc-category{padding:16px 0; border-bottom:1px solid var(--cc-border);}
.cc-category:last-child{border-bottom:none;}
.cc-category-head{display:flex; justify-content:space-between; align-items:center; gap:16px;}
.cc-category-head h3{margin:0; font-size:1rem;}
.cc-category p{margin:6px 0 0; font-size:.85rem; color:var(--cc-text-muted);}
.cc-category .cc-meta{font-size:.78rem; color:var(--cc-text-muted); margin-top:6px;}

.cc-switch{position:relative; width:44px; height:24px; flex-shrink:0;}
.cc-switch input{opacity:0; width:0; height:0;}
.cc-slider{position:absolute; inset:0; background:#c7cbd1; border-radius:99px; transition:background .15s; cursor:pointer;}
.cc-slider::before{content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:transform .15s;}
.cc-switch input:checked + .cc-slider{background:var(--cc-accent);}
.cc-switch input:checked + .cc-slider::before{transform:translateX(20px);}
.cc-switch input:disabled + .cc-slider{opacity:.55; cursor:not-allowed;}

.cc-modal-foot{
  padding:18px 26px 24px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  position:sticky; bottom:0; background:var(--cc-surface);
  border-top:1px solid var(--cc-border);
}
.cc-modal-foot .cc-group{display:flex; gap:10px; flex-wrap:wrap;}

/* ---- Botão flutuante para reabrir preferências ---- */
#cc-reopen-btn{
  position:fixed;
  bottom:20px; left:20px;
  z-index:9000;
  background:var(--cc-surface);
  border:1px solid var(--cc-border);
  border-radius:99px;
  padding:10px 16px;
  font-size:.82rem;
  display:none;
  align-items:center;
  gap:8px;
  box-shadow:0 4px 16px rgba(0,0,0,.14);
  color:var(--cc-text);
  cursor:pointer;
}
#cc-reopen-btn.show{display:inline-flex;}
#cc-reopen-btn:hover{border-color:var(--cc-accent); color:var(--cc-accent);}

/* Escondido a pedido: o botão flutuante ficava sobreposto ao layout.
   Gerenciar preferências continua acessível pelo link "Política de Cookies"
   do banner e pela página "cookies dados.html". */
#cc-reopen-btn{display:none !important;}

@media (max-width:480px){
  #cc-reopen-btn span.cc-label{display:none;}
}
