.cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 20px;
  border-radius: 10px;
  z-index: 9999;
  max-width: 90%;
  width: 400px;
  font-family: 'Quicksand', sans-serif;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.cookie-popup h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: #fff;
}

.cookie-popup p {
  font-size: 0.95em;
  margin: 10px 0;
}

.cookie-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.cookie-buttons button {
  background-color: #ffffff;
  color: #000000;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.3s;
}

.cookie-buttons button:hover {
  background-color: #ddd;
}

.customize-popup {
  display: none;
  background-color: rgba(0, 0, 0, 0.95);
  color: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 90%;
  width: 500px;
  font-family: 'Quicksand', sans-serif;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.customize-popup h3 {
  margin-top: 0;
  font-size: 1.3em;
  color: #fff;
}

.customize-popup p {
  font-size: 0.95em;
  margin: 10px 0 20px 0;
}

.cookie-toggles {
  margin-bottom: 20px;
}

.cookie-preference-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #444;
}

.cookie-preference-item label {
  font-size: 0.95em;
  flex: 1;
}

/* Switch toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #888;
  transition: .4s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ✅ Aggiunta: overlay centrato con flexbox */
#cookie-overlay {
  display: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.7);
  z-index: 10000;
}
