/* Carsa — Form. Immagine accanto al form a tre pubblici.
   Figma 10191:23927. Il riquadro sotto l'immagine non si disegna qui. */

@media (min-width: 768px) {
  .carsa-contact-form--image-right .carsa-contact-form__side {
    order: 2;
  }

  .carsa-contact-form--image-right .carsa-contact-form__main {
    order: 1;
  }

  .carsa-contact-form--audiences .carsa-contact-form__media img {
    width: 100%;
    height: 734px;
    min-height: 734px;
    object-fit: cover;
  }
}

.carsa-contact-form--audiences .carsa-contact-form__body:not(:has(.carsa-contact-form__side)) {
  grid-template-columns: minmax(0, 1fr);
}

.carsa-contact-form .carsa-brevo-embed__form #sib-form,
.carsa-contact-form .carsa-brevo-embed__form .sib-form form {
  row-gap: 8px;
}

/* 8px tra i consensi. I campi restano a 24px. Non eredita i 16px della candidatura. */
.carsa-contact-form .carsa-brevo-embed__form #sib-form > *:not(:has(input[type="checkbox"])),
.carsa-contact-form .carsa-brevo-embed__form .sib-form form > *:not(:has(input[type="checkbox"])) {
  margin-top: 16px !important;
}

.carsa-contact-form .carsa-brevo-embed__form #sib-form > *:first-child,
.carsa-contact-form .carsa-brevo-embed__form .sib-form form > *:first-child,
.carsa-contact-form .carsa-brevo-embed__form #sib-form > *:first-child:not(:has(input[type="checkbox"])),
.carsa-contact-form .carsa-brevo-embed__form .sib-form form > *:first-child:not(:has(input[type="checkbox"])) {
  margin-top: 0 !important;
}

.carsa-contact-form .carsa-brevo-embed__form #sib-form > *:first-child:not(:has(input[type="checkbox"])):has(#NOME) + *:not(:has(input[type="checkbox"])):has(#COGNOME),
.carsa-contact-form .carsa-brevo-embed__form .sib-form form > *:first-child:not(:has(input[type="checkbox"])):has([name="NOME"], [id^="NOME"]) + *:not(:has(input[type="checkbox"])):has([name="COGNOME"], [id^="COGNOME"]) {
  margin-top: 0 !important;
}

.carsa-contact-form .carsa-brevo-embed__form #sib-form > *:not(:has(input[type="checkbox"])) + *:has(input[type="checkbox"]),
.carsa-contact-form .carsa-brevo-embed__form .sib-form form > *:not(:has(input[type="checkbox"])) + *:has(input[type="checkbox"]) {
  margin-top: 16px !important;
}

.carsa-contact-form .carsa-brevo-embed__form #sib-form > div:has(input[type="checkbox"]) + div:has(input[type="checkbox"]),
.carsa-contact-form .carsa-brevo-embed__form .sib-form form > div:has(input[type="checkbox"]) + div:has(input[type="checkbox"]) {
  margin-top: 0 !important;
}

.carsa-contact-form .carsa-brevo-embed__form .sib-optin,
.carsa-contact-form .carsa-brevo-embed__form .sib-checkbox-group,
.carsa-contact-form .carsa-brevo-embed__form .entry__choice:has(input[type="checkbox"]),
.carsa-contact-form .carsa-brevo-embed__form .sib-form-block:has(input[type="checkbox"]) {
  gap: 0;
  row-gap: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.carsa-contact-form .carsa-brevo-embed #sib-form .entry__choice label,
.carsa-contact-form .carsa-brevo-embed .sib-form form .entry__choice label,
.carsa-contact-form .carsa-brevo-embed__form label:has(input[type="checkbox"]) {
  column-gap: 8px;
}

.carsa-contact-form .carsa-brevo-embed__form .sib-form-block__button,
.carsa-contact-form .carsa-brevo-embed__form button[type="submit"],
.carsa-contact-form .carsa-brevo-embed__form input[type="submit"] {
  width: auto !important;
  max-width: none !important;
  align-self: flex-start;
  height: 48px;
  min-height: 48px;
  padding: 12px 42px !important;
}

/* Barra pubblici: solo la voce sotto il puntatore (o quella selezionata) è la pillola scura.
   Il resto della barra resta beige. La regola delle etichette campo non deve tenere il testo scuro. */
.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar,
.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar:hover {
  background: #f4e9dc !important;
  background-color: #f4e9dc !important;
}

.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > label.carsa-newsletter-choice {
  flex: 1 1 0;
  width: auto;
  background: transparent !important;
  background-color: transparent !important;
  color: #3d352f !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > label.carsa-newsletter-choice .carsa-newsletter-choice__icon {
  background-color: #3d352f !important;
}

.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > label.carsa-newsletter-choice:hover,
.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > .carsa-newsletter-choice__input:checked + label.carsa-newsletter-choice {
  background: #3d352f !important;
  background-color: #3d352f !important;
  color: #fff !important;
}

.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > label.carsa-newsletter-choice:hover > span,
.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > .carsa-newsletter-choice__input:checked + label.carsa-newsletter-choice > span {
  color: #fff !important;
}

.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > label.carsa-newsletter-choice:hover .carsa-newsletter-choice__icon,
.carsa-contact-form .carsa-brevo-embed--audiences .carsa-newsletter-bar > .carsa-newsletter-choice__input:checked + label.carsa-newsletter-choice .carsa-newsletter-choice__icon {
  background-color: #fff !important;
}
