/* Cookie Consent Banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(44, 31, 31, 0.98);
  color: #fff;
  padding: 20px;
  z-index: 99999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

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

.cookie-consent__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-consent__content {
  flex: 1;
  min-width: 280px;
}

.cookie-consent__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.cookie-consent__text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.cookie-consent__text a {
  color: var(--agenzia-primary, #ad4d4d);
  text-decoration: underline;
}

.cookie-consent__text a:hover {
  color: var(--agenzia-primary-light, #c96565);
}

.cookie-consent__buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-consent__btn {
  padding: 12px 24px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

.cookie-consent__btn--accept {
  background-color: var(--agenzia-primary, #ad4d4d);
  color: #fff;
}

.cookie-consent__btn--accept:hover {
  background-color: var(--agenzia-primary-dark, #8b3a3a);
  transform: translateY(-2px);
}

.cookie-consent__btn--reject {
  background-color: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent__btn--reject:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.1);
}

.cookie-consent__btn--settings {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 12px 16px;
}

.cookie-consent__btn--settings:hover {
  color: #fff;
}

/* Cookie Settings Modal */
.cookie-settings {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-settings.show {
  opacity: 1;
  visibility: visible;
}

.cookie-settings__modal {
  background: #fff;
  border-radius: 10px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.cookie-settings.show .cookie-settings__modal {
  transform: scale(1);
}

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

.cookie-settings__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--agenzia-secondary, #2c1f1f);
  margin: 0;
}

.cookie-settings__close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.cookie-settings__close:hover {
  color: var(--agenzia-primary, #ad4d4d);
}

.cookie-settings__body {
  padding: 25px;
}

.cookie-settings__category {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

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

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

.cookie-settings__category-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--agenzia-secondary, #2c1f1f);
  margin: 0;
}

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

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 50px;
  height: 26px;
}

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

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

.cookie-toggle__slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background-color: var(--agenzia-primary, #ad4d4d);
}

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

.cookie-toggle input:disabled + .cookie-toggle__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-settings__footer {
  padding: 20px 25px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.cookie-settings__btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.cookie-settings__btn--save {
  background-color: var(--agenzia-primary, #ad4d4d);
  color: #fff;
}

.cookie-settings__btn--save:hover {
  background-color: var(--agenzia-primary-dark, #8b3a3a);
}

.cookie-settings__btn--cancel {
  background-color: #f5f5f5;
  color: #333;
}

.cookie-settings__btn--cancel:hover {
  background-color: #e5e5e5;
}

/* Responsive */
@media (max-width: 767px) {
  .cookie-consent {
    padding: 15px;
  }

  .cookie-consent__inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-consent__buttons {
    width: 100%;
    justify-content: center;
  }

  .cookie-consent__btn {
    flex: 1;
    min-width: 100px;
  }

  .cookie-settings__modal {
    max-height: 90vh;
  }

  .cookie-settings__footer {
    flex-direction: column;
  }

  .cookie-settings__btn {
    width: 100%;
  }
}
