/* ===== COOKIE BANNER GDPR - SYNAPTICA SOLUTIONS ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 2px solid var(--primary-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
  display: block !important;
  transform: translateY(0) !important;
}

.cookie-banner.hide {
  transform: translateY(100%) !important;
}

/* Contenuto del banner */
.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  color: white;
}

/* Header del banner */
.cookie-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cookie-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
}

.cookie-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.cookie-close:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Controlli dettagliati */
.cookie-controls-detailed {
  margin: 1rem 0;
}

.cookie-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-control-row:last-child {
  border-bottom: none;
}

.cookie-info h4 {
  margin: 0 0 0.3rem 0;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.cookie-info p {
  margin: 0;
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Toggle switches */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

input:focus + .slider {
  box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.3);
}

/* Azioni del banner */
.cookie-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.cookie-policy-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.cookie-policy-link:hover {
  color: #4a9eff;
}

.cookie-policy-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cookie-content {
    padding: 1rem;
  }
  
  .cookie-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .cookie-close {
    align-self: flex-end;
    margin-top: -2rem;
  }
  
  .cookie-control-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 0;
  }
  
  .cookie-toggle {
    align-self: flex-end;
  }
  
  .cookie-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  
  .cookie-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  
  .cookie-policy-link {
    text-align: center;
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .cookie-content {
    padding: 0.8rem;
  }
  
  .cookie-header h3 {
    font-size: 1.1rem;
  }
  
  .cookie-info h4 {
    font-size: 0.95rem;
  }
  
  .cookie-info p {
    font-size: 0.85rem;
  }
}

/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
  
  .slider,
  .slider:before {
    transition: none;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .cookie-banner {
    background: rgba(0, 0, 0, 0.98);
    border-top: 3px solid var(--primary-color);
  }
  
  .cookie-control-row {
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  }
}