/* Tarocchi degli Angeli – Banner cookie: nero, testo bianco, pulsanti blu */
.tda-cc, .tda-cc-modal, .tda-cc-recall {
  --tda-bg: #000;
  --tda-fg: #fff;
  --tda-muted: #cfcfcf;
  --tda-blue: #1a73e8;
  --tda-blue-dark: #1557b0;
  --tda-focus: #8ab4f8;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  box-sizing: border-box;
}
.tda-cc *, .tda-cc-modal *, .tda-cc-recall * { box-sizing: border-box; }
.tda-cc[hidden], .tda-cc-modal[hidden], .tda-cc-recall[hidden] { display: none !important; }

/* ---------- Banner ---------- */
.tda-cc {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2147483000;
  background: var(--tda-bg);
  color: var(--tda-fg);
  box-shadow: 0 -4px 24px rgba(0,0,0,.45);
  border-top: 3px solid var(--tda-blue);
}
.tda-cc__inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 48px 18px 20px;
}
.tda-cc p, .tda-cc-modal p {
  margin: 0 0 10px;
  padding: 0;
  color: var(--tda-fg);
  line-height: 1.5 !important;
  font-size: 14px;
  background: none;
}
.tda-cc .tda-cc__title, .tda-cc-modal .tda-cc-modal__title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.tda-cc a, .tda-cc-modal a {
  color: var(--tda-fg);
  text-decoration: underline;
}
.tda-cc a:hover, .tda-cc-modal a:hover { color: var(--tda-focus); }
.tda-cc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}
.tda-cc__btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 4px;
  background: var(--tda-blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  padding: 11px 20px;
  min-width: 140px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.tda-cc__btn:hover { background: var(--tda-blue-dark); color: #fff; }
.tda-cc__x {
  position: absolute;
  top: 8px; right: 10px;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tda-fg);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.tda-cc__x:hover { background: rgba(255,255,255,.12); }
.tda-cc button:focus-visible, .tda-cc a:focus-visible,
.tda-cc-modal button:focus-visible, .tda-cc-modal a:focus-visible,
.tda-cc-modal input:focus-visible, .tda-cc-recall:focus-visible {
  outline: 3px solid var(--tda-focus) !important;
  outline-offset: 2px;
}

/* ---------- Preferenze ---------- */
.tda-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
html.tda-cc-lock { overflow: hidden; }
.tda-cc-modal__box {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--tda-bg);
  color: var(--tda-fg);
  border-top: 3px solid var(--tda-blue);
  border-radius: 6px;
  padding: 24px 24px 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.tda-cc-cat {
  border-top: 1px solid rgba(255,255,255,.18);
  padding: 12px 0 4px;
}
.tda-cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tda-cc-cat__label {
  font-weight: 700;
  font-size: 15px;
  color: var(--tda-fg);
  cursor: pointer;
}
.tda-cc-cat__label small { font-weight: 400; font-size: 12px; color: var(--tda-muted); vertical-align: baseline; }
.tda-cc-modal .tda-cc-cat__desc { color: var(--tda-muted); font-size: 13px; margin: 4px 0 6px; }
.tda-cc-switch {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 46px; height: 26px;
  margin: 0;
  border-radius: 13px;
  background: #555;
  cursor: pointer;
  transition: background-color .15s ease;
}
.tda-cc-switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.tda-cc-switch:checked { background: var(--tda-blue); }
.tda-cc-switch:checked::after { transform: translateX(20px); }
.tda-cc-switch:disabled { opacity: .6; cursor: not-allowed; }
.tda-cc-modal .tda-cc-modal__meta { color: var(--tda-muted); font-size: 12px; margin-top: 10px; }
.tda-cc-modal__meta code { font-size: 12px; color: var(--tda-fg); word-break: break-all; }
.tda-cc-modal .tda-cc__actions { border-top: 1px solid rgba(255,255,255,.18); padding-top: 14px; }
.tda-cc-modal .tda-cc__links { margin: 12px 0 0; font-size: 13px; text-align: right; }

/* ---------- Icona di richiamo (in basso a destra) ---------- */
.tda-cc-recall {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147482999;
  width: 52px; height: 52px;
  padding: 0;
  border: 2px solid var(--tda-blue);
  border-radius: 50%;
  background: var(--tda-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transition: transform .15s ease, background-color .15s ease;
}
.tda-cc-recall:hover { background: var(--tda-blue); transform: scale(1.06); }
.tda-cc-recall svg { display: block; }

@media (max-width: 640px) {
  .tda-cc__inner { padding: 16px 16px 14px; }
  .tda-cc .tda-cc__title { padding-right: 32px; }
  .tda-cc__actions { flex-direction: column-reverse; }
  .tda-cc__btn { width: 100%; }
  .tda-cc p { font-size: 13px; }
  .tda-cc-modal__box { padding: 20px 16px 14px; }
  .tda-cc-recall { width: 46px; height: 46px; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .tda-cc__btn, .tda-cc-recall, .tda-cc-switch, .tda-cc-switch::after { transition: none; }
}
@media print {
  .tda-cc, .tda-cc-modal, .tda-cc-recall { display: none !important; }
}
