/* Villa Trasporti Srl — Cookie Consent Tool
   Stile allineato a quello già in uso su nautilio.it (T.Com ICT),
   così i due strumenti risultano visivamente coerenti. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* ── Overlay sfondo ── */
#cb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 25, 22, 0.45);
  z-index: 9998;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ── Banner principale (bottom bar) ── */
#cb-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 2px solid #1e4d8c;
  box-shadow: 0 -8px 40px rgba(30, 77, 140, 0.12);
  z-index: 9999;
  padding: 22.4px 5%;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: "DM Sans", sans-serif;
  font-size: 14.7px;
  line-height: 1.55;
  color: #4a4844;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(.22, 1, .36, 1);
}
#cb-banner.cb-visible { transform: translateY(0); }

/* ── Testo ── */
#cb-text { flex: 1; min-width: 220px; }
#cb-text strong { color: #1a1916; font-weight: 600; }
#cb-text a { color: #1e4d8c; text-decoration: underline; text-underline-offset: 2px; }
#cb-text a:hover { color: #c8860a; }

/* ── Pulsanti ── */
#cb-actions { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

.cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8.8px 20.8px;
  border-radius: 6px;
  font-family: "DM Sans", sans-serif;
  font-size: 14.1px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.18s, color 0.18s, transform 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.cb-btn:active { transform: scale(0.97); }

/* Accetta — blu pieno */
.cb-btn-accept { background: #1e4d8c; color: #fff; }
.cb-btn-accept:hover { background: #163a6a; }

/* Solo tecnici — outline */
.cb-btn-reject { background: transparent; color: #1e4d8c; border: 1.5px solid #1e4d8c; }
.cb-btn-reject:hover { background: #e8eef7; }

/* Personalizza — link testuale */
.cb-btn-settings {
  background: transparent;
  color: #7a7774;
  font-size: 13.4px;
  font-weight: 400;
  padding: 8.8px 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cb-btn-settings:hover { color: #1e4d8c; }

/* ── Pannello preferenze (modal) ── */
#cb-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(26, 25, 22, 0.22);
  z-index: 10000;
  width: min(520px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  font-family: "DM Sans", sans-serif;
  color: #4a4844;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
}
#cb-modal.cb-modal-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }

#cb-modal h2 {
  font-family: "Playfair Display", serif;
  font-size: 21.6px;
  font-weight: 700;
  color: #1a1916;
  margin-bottom: 4.8px;
}
#cb-modal .cb-modal-sub { font-size: 14.1px; color: #7a7774; margin-bottom: 24px; }
#cb-modal .cb-modal-sub a { color: #1e4d8c; }

/* Righe categoria cookie */
.cb-row { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-top: 1px solid #e4e0d8; }
.cb-row:last-of-type { border-bottom: 1px solid #e4e0d8; }

.cb-row-info { flex: 1; }
.cb-row-info strong { display: block; font-size: 15.2px; color: #1a1916; margin-bottom: 3.2px; }
.cb-row-info p { font-size: 13.4px; color: #7a7774; line-height: 1.5; margin: 0; }

/* Toggle switch */
.cb-toggle { position: relative; flex-shrink: 0; width: 44px; height: 24px; margin-top: 2px; }
.cb-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cb-slider {
  position: absolute; inset: 0;
  background: #c8c4bc; border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}
.cb-slider::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.cb-toggle input:checked + .cb-slider { background: #1e4d8c; }
.cb-toggle input:checked + .cb-slider::before { transform: translateX(20px); }
.cb-toggle input:disabled + .cb-slider { opacity: 0.55; cursor: not-allowed; }

/* Pulsanti modal */
#cb-modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }

/* Placeholder mappa, mostrato finché i cookie di funzionalità non sono accettati */
.vt-map-placeholder {
  border: 1px dashed #c8c4bc;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  font-family: "DM Sans", sans-serif;
  color: #7a7774;
}

/* Responsive */
@media (max-width: 600px) {
  #cb-banner { padding: 19.2px 4%; flex-direction: column; align-items: flex-start; gap: 16px; }
  #cb-actions { width: 100%; justify-content: flex-start; }
  .cb-btn-settings { padding: 8.8px 0; }
  #cb-modal { padding: 24px; }
  #cb-modal-actions { justify-content: stretch; }
  #cb-modal-actions .cb-btn { flex: 1; text-align: center; }
}
