/* ============================================================
   BTOO Cookie Consent - banner conforme Linee Guida Garante 2021
   Prefisso classi: .btc-  (BTOO Consent) per evitare collisioni
   ============================================================ */

.btc-bar, .btc-bar * { box-sizing: border-box; }

/* Barra orizzontale fissa in basso */
.btc-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99990;
  background: #1f2430;
  color: #f4f5f7;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  padding: 16px 20px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.btc-bar[hidden] { display: none; }

.btc-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.btc-bar__text { flex: 1 1 420px; min-width: 260px; margin: 0; }
.btc-bar__text a { color: #ffc977; text-decoration: underline; }

.btc-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

/* I 3 pulsanti hanno PESO/DIMENSIONE/COLORE identici (requisito Garante) */
.btc-btn {
  appearance: none;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #1f2430;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  min-width: 140px;
  text-align: center;
  transition: opacity .15s ease;
}
.btc-btn:hover { opacity: .85; }
.btc-btn:focus-visible { outline: 3px solid #ffc977; outline-offset: 2px; }

/* Pulsante di chiusura (X) = rifiuto, in alto a destra della barra */
.btc-close {
  position: absolute;
  top: 8px; right: 10px;
  background: transparent;
  border: 0;
  color: #f4f5f7;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.btc-close:focus-visible { outline: 2px solid #ffc977; }

/* Modale preferenze */
.btc-modal {
  position: fixed;
  inset: 0;
  z-index: 99991;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  padding: 16px;
}
.btc-modal.is-open { display: flex; }
.btc-modal__panel {
  background: #ffffff;
  color: #1f2430;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 24px;
}
.btc-modal__panel h2 { margin: 0 0 6px; font-size: 20px; }
.btc-modal__intro { margin: 0 0 18px; font-size: 14px; color: #4a5160; }

.btc-cat {
  border: 1px solid #e3e6ec;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.btc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btc-cat__title { font-weight: 700; font-size: 15px; }
.btc-cat__desc { margin: 8px 0 0; font-size: 13px; color: #4a5160; }

/* Interruttore */
.btc-switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.btc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.btc-switch span {
  position: absolute; inset: 0;
  background: #c2c7d0; border-radius: 999px; transition: background .15s ease;
}
.btc-switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: transform .15s ease;
}
.btc-switch input:checked + span { background: #2e7d32; }
.btc-switch input:checked + span::after { transform: translateX(20px); }
.btc-switch input:disabled + span { background: #2e7d32; opacity: .55; }
.btc-switch input:focus-visible + span { outline: 3px solid #ffc977; outline-offset: 2px; }

.btc-modal__actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 18px;
}
.btc-modal__actions .btc-btn { background:#1f2430; color:#fff; border-color:#1f2430; min-width: 130px; }

@media (max-width: 640px) {
  .btc-actions { width: 100%; }
  .btc-btn { flex: 1 1 auto; min-width: 0; }
  .btc-bar__text { flex-basis: 100%; }
}
