
/* ====== BANNER ====== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 540px;
  background: #ffffff;
  color: #000000;
  font-family: Arial, sans-serif;
  padding: 20px 25px;
  z-index: 999999999;
  display: none;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
  border-radius: 10px;
}

#cookie-banner .close-x {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
}

#cookie-banner h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  text-align: center;
  color: #000000;
}

.cookie-text {
  font-size: 13px;
  line-height: 1.5;
  color: #000000;
  margin: 0 0 12px 0;
  text-align: left;
}

/* ====== ACCORDION ====== */
.cookie-accordion {
  padding-top: 10px;
}

.cookie-item {
  margin-bottom: 6px;
}

/* HEAD (cliccabile solo qui) */
.cookie-head {
  width: 100%;
  background: #f2f2f2;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;  /* allinea tutto verticalmente */
  border-radius: 6px;
  cursor: pointer;
  height: 42px;         /* stessa altezza per tutti */
}

.cookie-head .left {
  font-size: 13px;
  line-height: 1;
}

.cookie-head .right {
  display: flex;
  align-items: center;  /* allinea toggle + freccia */
  gap: 10px;
}

/* freccia perfettamente allineata */
.cookie-head .right .arrow {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.cookie-item.open .arrow {
  transform: rotate(180deg);
}

/* testo verde sempre attivo */
.cookie-item .status {
  color: #2ecc71;
  font-size: 12px;
}

.cookie-item .content {
  display: none;
  font-size: 12px;
  line-height: 1.4;
  color: #555;
  padding: 8px 0 0 0;
}

.cookie-item.open .content {
  display: block;
}

/* ====== BOTTONI ====== */
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.cookie-actions button {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #ddd;
  background: #f2f2f2;
  color: #000;
}

.cookie-actions button.primary {
  background: #1CA8CB;
  color: #fff;
  border: none;
}

.cookie-actions button:hover {
  opacity: 0.9;
}

/* ====== LINK ====== */
.cookie-links {
  margin-top: 12px;
  font-size: 12px;
  text-align: center;
}

.cookie-links a {
  color: #1CA8CB;
  text-decoration: underline;
}

/* ====== TASTO GESTISCI CONSENSO ====== */
#reopen-consent {
  position: fixed;
  bottom: 15px;
  left: 15px;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  display: none;
  z-index: 999999998;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
	
  display: none !important;
}

/* ====== TOGGLE SWITCH ====== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {display:none;}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .2s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #1CA8CB;
}
input:checked + .slider:before {
  transform: translateX(20px);
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {
  #cookie-banner {
    width: 100%;
    left: 0;
    padding: 15px 20px;
    border-radius: 0;
  }
  #reopen-consent {
    display: none !important;
  }
}

/* =========================
   ALLINEAMENTO TOGGLE
   ========================= */

.cookie-head .right {
  display: flex;
  align-items: center; /* fondamentale */
  gap: 10px;
}

/* switch */
.cookie-head .right .switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

/* checkbox nascosto */
.cookie-head .right .switch input[type="checkbox"] {
  opacity: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0;
  top: 0;
}

/* slider */
.cookie-head .right .switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: .2s;
  height: 24px;   /* IMPORTANTE */
  width: 44px;    /* IMPORTANTE */
}

/* pallino */
.cookie-head .right .switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

/* stato ON */
.cookie-head .right .switch input:checked + .slider {
  background-color: #1CA8CB;
}
.cookie-head .right .switch input:checked + .slider:before {
  transform: translateX(20px);
}

/* freccia */
.cookie-head .right .arrow {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

