/* Banner dei cookie di CE-ThermoSoft (core/cookie.py, docs/cookie-banner.md).
   Stesso file in static/css/ (app) e sito/assets/ (cethermosoft.it): modificarli insieme.
   Colori e pulsanti come nell'app; nessuna libreria esterna. */
.cc {
  --cc-blu: #13396b; --cc-blu-scuro: #001736; --cc-arancio: #fc6900;
  --cc-testo: #18212d; --cc-tenue: #5b6878; --cc-bordo: #dde3ea;
  position: fixed; z-index: 2147483000; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(46rem, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto;
  box-sizing: border-box; background: #fff; color: var(--cc-testo);
  border: 1px solid var(--cc-bordo); border-top: 4px solid var(--cc-arancio); border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 23, 54, .25), 0 2px 6px rgba(0, 23, 54, .12);
  padding: 1.15rem 1.3rem 1.1rem; text-align: left;
  font: 400 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
.cc[hidden] { display: none; }
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; }
.cc-titolo { margin: 0 2rem .4rem 0; font-family: inherit; font-size: 1.05rem; line-height: 1.3; font-weight: 700; color: var(--cc-blu-scuro); letter-spacing: 0; }
.cc-titolo:focus { outline: none; }
.cc-testo { margin: 0 0 .9rem; font-size: .92rem; color: var(--cc-testo); }
.cc a { color: var(--cc-blu); text-decoration: underline; }
.cc-chiudi {
  position: absolute; top: .5rem; right: .5rem; width: 2.25rem; height: 2.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--cc-tenue); cursor: pointer; padding: 0;
}
.cc-chiudi:hover { background: #f1f4f8; color: var(--cc-blu-scuro); }
.cc-chiudi svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.cc-azioni { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.cc-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 9.5rem; min-height: 2.6rem;
  padding: .55rem 1.1rem; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: .95rem; line-height: 1.2; font-weight: 600; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--cc-blu); background: var(--cc-blu); color: #fff; margin: 0;
}
/* "Accetta tutti" e "Rifiuta" hanno lo stesso aspetto (linee guida del Garante) */
.cc-btn:hover { background: var(--cc-blu-scuro); border-color: var(--cc-blu-scuro); }
.cc-btn-secondario { background: #fff; color: var(--cc-blu); font-weight: 600; }
.cc-btn-secondario:hover { background: #f1f4f8; color: var(--cc-blu-scuro); border-color: var(--cc-blu-scuro); }
.cc :focus-visible, .link-cookie:focus-visible { outline: 2px solid var(--cc-arancio, #fc6900); outline-offset: 2px; }
.cc-pannello { margin: 0 0 1rem; padding: 0; border: 0; }
.cc-pannello[hidden] { display: none; }
.cc-pannello legend { padding: 0; margin: 0 0 .4rem; font-weight: 700; font-size: .9rem; color: var(--cc-blu-scuro); }
.cc-categoria {
  display: grid; grid-template-columns: auto 1fr; gap: .1rem .7rem; align-items: start;
  padding: .65rem .75rem; border: 1px solid var(--cc-bordo); border-radius: 8px; margin-bottom: .45rem; cursor: pointer;
}
.cc-categoria input { grid-row: span 2; width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--cc-blu); cursor: pointer; }
.cc-categoria input:disabled { cursor: not-allowed; }
.cc-nome { font-weight: 650; font-size: .93rem; color: var(--cc-testo); }
.cc-nome small { font-weight: 400; color: var(--cc-tenue); }
.cc-desc { font-size: .84rem; color: var(--cc-tenue); }
.cc-avviso { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Link "Preferenze cookie" nei piè di pagina: un pulsante che sembra un link */
.link-cookie {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline; text-align: left;
}
.link-cookie[hidden] { display: none; }
@media (max-width: 600px) {
  .cc { left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-height: 85vh;
        border-radius: 12px 12px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
  .cc-azioni { display: grid; grid-template-columns: 1fr 1fr; }
  .cc-btn { min-width: 0; width: 100%; }
  .cc-azioni .cc-btn-secondario { grid-column: 1 / -1; }
}
@media print { .cc { display: none; } }
