.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  color: #333;
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;
  display: block;
}

.cookie-banner.show {
  transform: translateY(0);
  display: block;
}

.cookie-banner.hidden {
  display: none !important;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Tab Navigation */
.cookie-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.cookie-tab {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.cookie-tab.active {
  color: #0073aa;
  border-bottom-color: #0073aa;
  background: #fff;
}

.cookie-tab:hover {
  color: #0073aa;
  background: #f0f8ff;
}

/* Tab Content */
.cookie-tab-content {
  padding: 20px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.cookie-banner-header h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.cookie-banner-body p {
  margin: 0 0 20px 0;
  line-height: 1.6;
  color: #666;
  font-size: 14px;
}

/* Cookie Categories */
.cookie-categories {
  margin-top: 20px;
}

.cookie-category {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-category-name {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.cookie-category-desc {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .toggle-slider {
  background-color: #0073aa;
}

.cookie-toggle input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.cookie-toggle.disabled .toggle-slider {
  background-color: #e0e0e0;
  cursor: not-allowed;
}

.cookie-toggle.disabled .toggle-slider:before {
  background-color: #f5f5f5;
}

/* Cookie Details */
.cookie-details {
  margin-top: 20px;
}

.cookie-detail-item {
  margin-bottom: 25px;
  padding: 15px;
  border-left: 4px solid #0073aa;
  background: #f8f9fa;
}

.cookie-detail-item h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.cookie-detail-item p {
  margin: 0;
  color: #666;
  line-height: 1.5;
  font-size: 14px;
}

/* Cookie Info */
.cookie-info h4 {
  margin: 20px 0 10px 0;
  color: #333;
  font-size: 16px;
}

.cookie-info p {
  margin: 0 0 15px 0;
  color: #666;
  line-height: 1.5;
  font-size: 14px;
}

.cookie-info .cookie-links {
  margin-top: 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.cookie-info .cookie-links a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border: 1px solid #0073aa;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.cookie-info .cookie-links a:hover {
  background: #0073aa;
  color: white;
}

/* Footer Buttons */
.cookie-banner-footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
}

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.cookie-banner-powered-by {
  text-align: center;
  margin-top: 10px;
}

.cookie-banner-powered-by p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

.cookie-banner-powered-by a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.cookie-banner-powered-by a:hover {
  color: #005a87;
  text-decoration: underline;
}

.cookie-content > p {
  margin: 0 0 20px 0;
  font-size: 15px;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #0073aa;
  color: white;
  font-weight: 600;
  min-width: 120px;
}

.btn-primary:hover {
  background-color: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.btn-deny {
  background-color: #dc3545;
  color: white;
  font-weight: 600;
  min-width: 120px;
}

.btn-deny:hover {
  background-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: #0073aa;
  border: 2px solid #0073aa;
  font-weight: 600;
  min-width: 120px;
}

.btn-secondary:hover {
  background-color: #0073aa;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.cookie-logo {
  display: inline-block;
  margin-bottom: 10px;
}

.cookie-logo img {
  display: block;
  max-height: 50px;
  height: auto;
  margin: 0 auto;
}

.preferences-panel {
  margin-top: 20px;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.preferences-panel h4 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #333;
}

.preferences-panel label {
  display: flex;
  align-items: center;
  margin: 10px 0;
  font-size: 15px;
  cursor: pointer;
}

.preferences-panel input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.btn-save {
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-save:hover {
  background-color: #005a87;
}

/* .hidden {
  display: none !important;
} */

/* Widget Styles */
.cookie-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
}

.cookie-settings-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #0073aa;
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.cookie-settings-btn svg {
  width: 24px;
  height: 24px;
}

.cookie-settings-btn:hover {
  background-color: #005a87;
  transform: scale(1.05);
}

/* Modal Styles */
.cookie-settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.cookie-settings-modal.hidden {
  display: none !important;
}

.cookie-settings-content {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cookie-settings-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-settings-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: #333;
}

.cookie-settings-body {
  padding: 20px;
}

.cookie-category {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e5e5e5;
}

.cookie-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cookie-switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

.cookie-switch input[type="checkbox"] {
  display: none;
}

.cookie-switch .slider {
  width: 44px;
  height: 24px;
  background-color: #ccc;
  border-radius: 24px;
  position: relative;
  transition: background-color 0.3s;
  margin-right: 12px;
}

.cookie-switch .slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: white;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.cookie-switch input:checked + .slider {
  background-color: #0073aa;
}

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

.cookie-switch input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-switch .label {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.cookie-description {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  padding-left: 56px;
}

.cookie-settings-footer {
  padding: 20px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.cookie-settings-footer button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-withdraw {
  background-color: #dc3545;
  color: white;
}

.btn-withdraw:hover {
  background-color: #c82333;
}

.btn-cancel {
  background-color: #e5e5e5;
  color: #333;
}

.btn-cancel:hover {
  background-color: #d5d5d5;
}

.btn-save-widget {
  background-color: #0073aa;
  color: white;
}

.btn-save-widget:hover {
  background-color: #005a87;
}

.btn-primary, .btn-secondary, .btn-save {
  margin-right: 10px;
  margin-top: 10px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* Stili per le descrizioni nel pannello preferenze */
.cookie-option {
  margin-bottom: 20px;
}

.cookie-option label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
}

.cookie-option input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.cookie-name {
  font-size: 16px;
  color: #333;
}

.cookie-desc {
  margin: 5px 0 0 28px;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

/* Footer con link */
.cookie-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e5e5e5;
}

.cookie-links {
  text-align: center;
}

.cookie-links a {
  color: #0073aa;
  text-decoration: none;
  font-size: 14px;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.cookie-links a:hover {
  color: #005a87;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 15px;
  }
  
  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .cookie-actions button {
    width: 100%;
    margin: 5px 0;
  }
  
  .btn-primary, .btn-secondary, .btn-save {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 5px auto;
  }
  
  .cookie-widget {
    bottom: 10px;
    left: 10px;
  }
  
  .cookie-settings-btn {
    width: 45px;
    height: 45px;
  }
  
  .cookie-settings-footer {
    flex-direction: column;
  }
  
  .cookie-settings-footer button {
    width: 100%;
  }
  
  .cookie-links a {
    display: block;
    margin: 5px 0;
  }
}