/**
 * Cookie Consent Banner Styles
 * Italian GDPR-compliant design
 */

/* Cookie Consent Banner */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 2px solid #10b981;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  max-height: 90vh;
  overflow-y: auto;
}

#cookie-consent-banner.show {
  transform: translateY(0);
}

#cookie-consent-banner .cookie-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#cookie-consent-banner .cookie-banner-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

#cookie-consent-banner .cookie-banner-icon {
  font-size: 2rem;
  color: #10b981;
  flex-shrink: 0;
}

#cookie-consent-banner .cookie-banner-content {
  flex: 1;
}

#cookie-consent-banner .cookie-banner-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0b1320;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

#cookie-consent-banner .cookie-banner-text {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
}

#cookie-consent-banner .cookie-banner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

#cookie-consent-banner .cookie-banner-links a {
  color: #10b981;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

#cookie-consent-banner .cookie-banner-links a:hover {
  color: #059669;
  text-decoration: underline;
}

#cookie-consent-banner .cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

#cookie-consent-banner .cookie-banner-actions .btn {
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

#cookie-consent-banner .cookie-banner-actions .btn-primary {
  background: #10b981;
  color: white;
}

#cookie-consent-banner .cookie-banner-actions .btn-primary:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#cookie-consent-banner .cookie-banner-actions .btn-outline {
  background: transparent;
  color: #475569;
  border: 2px solid #cbd5e1;
}

#cookie-consent-banner .cookie-banner-actions .btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

#cookie-consent-banner .cookie-banner-actions .btn-secondary {
  background: #64748b;
  color: white;
}

#cookie-consent-banner .cookie-banner-actions .btn-secondary:hover {
  background: #475569;
}

/* Cookie Preferences Modal */
#cookie-preferences-modal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#cookie-preferences-modal .modal-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

#cookie-preferences-modal .modal-header .modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

#cookie-preferences-modal .modal-header .btn-close {
  filter: invert(1);
  opacity: 0.9;
}

#cookie-preferences-modal .modal-header .btn-close:hover {
  opacity: 1;
}

#cookie-preferences-modal .modal-body {
  padding: 2rem;
}

#cookie-preferences-modal .cookie-category {
  padding: 1.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  transition: all 0.2s;
}

#cookie-preferences-modal .cookie-category:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#cookie-preferences-modal .cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

#cookie-preferences-modal .cookie-category-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0b1320;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#cookie-preferences-modal .cookie-category-icon {
  font-size: 1.25rem;
  color: #10b981;
}

#cookie-preferences-modal .cookie-category-description {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0.5rem 0 0 0;
}

#cookie-preferences-modal .cookie-category-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#cookie-preferences-modal .form-check-input {
  width: 3rem;
  height: 1.5rem;
  cursor: pointer;
  border-radius: 1rem;
  border: 2px solid #cbd5e1;
  background-color: #e5e7eb;
  transition: all 0.3s;
}

#cookie-preferences-modal .form-check-input:checked {
  background-color: #10b981;
  border-color: #10b981;
}

#cookie-preferences-modal .form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.25);
}

#cookie-preferences-modal .cookie-category-info {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #475569;
}

#cookie-preferences-modal .cookie-category-info strong {
  color: #0b1320;
}

#cookie-preferences-modal .modal-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

#cookie-preferences-modal .modal-footer .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

#cookie-preferences-modal .modal-footer .btn-primary {
  background: #10b981;
  color: white;
}

#cookie-preferences-modal .modal-footer .btn-primary:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#cookie-preferences-modal .modal-footer .btn-secondary {
  background: #64748b;
  color: white;
}

#cookie-preferences-modal .modal-footer .btn-secondary:hover {
  background: #475569;
}

/* Necessary cookies badge */
.cookie-necessary-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #10b981;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  #cookie-consent-banner {
    padding: 1rem;
  }

  #cookie-consent-banner .cookie-banner-header {
    flex-direction: column;
  }

  #cookie-consent-banner .cookie-banner-icon {
    font-size: 1.5rem;
  }

  #cookie-consent-banner .cookie-banner-title {
    font-size: 1.1rem;
  }

  #cookie-consent-banner .cookie-banner-text {
    font-size: 0.9rem;
  }

  #cookie-consent-banner .cookie-banner-actions {
    flex-direction: column;
    width: 100%;
  }

  #cookie-consent-banner .cookie-banner-actions .btn {
    width: 100%;
  }

  #cookie-preferences-modal .modal-body {
    padding: 1.5rem;
  }

  #cookie-preferences-modal .cookie-category {
    padding: 1rem;
  }

  #cookie-preferences-modal .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Accessibility */
#cookie-consent-banner:focus-within {
  outline: 3px solid #10b981;
  outline-offset: -3px;
}

#cookie-consent-banner[aria-hidden="true"] {
  display: none;
}

/* Backdrop overlay when banner is visible */
.cookie-consent-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cookie-consent-backdrop.show {
  opacity: 1;
  pointer-events: all;
}
