/* Banner del consenso cookie (public/assets/js/consent.js). */
.gf-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2147483600;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(62, 26, 9, 0.12);
  background: #ffffff;
  color: #3e1a09;
  box-shadow: 0 18px 48px rgba(62, 26, 9, 0.22);
  font-family: "Satoshi", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.gf-consent__title {
  margin: 0 32px 8px 0;
  font-size: 20px;
  font-weight: 800;
  color: #3e1a09;
}

.gf-consent .gf-consent__text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #3e1a09;
}

.gf-consent:focus {
  outline: none;
}

.gf-consent__text a {
  color: #3e1a09;
  font-weight: 700;
  text-decoration: underline;
}

.gf-consent__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3e1a09;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.gf-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gf-consent__btn {
  flex: 1 1 140px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #3e1a09;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.gf-consent__btn--primary {
  background: #3e1a09;
  color: #f5f4ee;
}

.gf-consent__btn--secondary {
  background: transparent;
  color: #3e1a09;
}

.gf-consent__btn:focus-visible,
.gf-consent__close:focus-visible,
.gf-consent__switch input:focus-visible + .gf-consent__track {
  outline: 3px solid #febb00;
  outline-offset: 2px;
}

.gf-consent__prefs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(62, 26, 9, 0.15);
}

.gf-consent__prefs[hidden] {
  display: none;
}

.gf-consent__row {
  margin-bottom: 14px;
}

.gf-consent__row--locked {
  padding-left: 58px;
}

.gf-consent__switch {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  cursor: pointer;
}

.gf-consent__switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.gf-consent__track {
  position: relative;
  flex: 0 0 46px;
  height: 26px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(62, 26, 9, 0.25);
  transition: background 0.15s;
}

.gf-consent__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.gf-consent__switch input:checked + .gf-consent__track {
  background: #3e1a09;
}

.gf-consent__switch input:checked + .gf-consent__track::after {
  transform: translateX(20px);
}

.gf-consent .gf-consent__row-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.45;
}

.gf-consent .gf-consent__row-text strong {
  font-size: 15px;
}

.gf-consent__btn--save {
  flex-basis: 100%;
}

/* Al posto della chat finché non c'è il consenso: la carica al clic. */
.gf-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #3e1a09;
  color: #f5f4ee;
  font-family: "Satoshi", sans-serif;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(62, 26, 9, 0.25);
  cursor: pointer;
}

.gf-chat-launcher[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .gf-consent {
    left: 24px;
    bottom: 24px;
  }
}

/* Chat Intercom aperta dal visitatore: il banner torna quando la chiude
   (la classe la mette lo script della chat in layout/header.ejs). */
html.gf-chat-open .gf-consent {
  display: none;
}
