/* ------------------------------------------------------------------
   PAGINA CONTATTI - CAMPI FORM E DISCLAIMER reCAPTCHA
   ------------------------------------------------------------------ */

/* === ANGOLI LEGGERMENTE SMUSSATI SUI CONTROLLI RETTANGOLARI === */
body#contact .contact-form .form-control,
body#contact .contact-form .form-control-select,
body#contact .contact-form textarea,
body#contact .contact-form .btn,
body#contact .contact-form .bootstrap-filestyle .form-control,
body#contact .contact-form .bootstrap-filestyle .btn {
  border-radius: 4px;
}

/* Mantiene coerente l'input file composto, senza doppi arrotondamenti interni. */
body#contact .contact-form .bootstrap-filestyle .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

body#contact .contact-form .bootstrap-filestyle .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* === CONTAINER PRINCIPALE DISCLAIMER === */
body#contact .recaptcha-disclaimer {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  background: #f7fbfc;
  border-left: 4px solid #5BE889;
  border-radius: 4px;
  color: #4f4f4f;
  text-align: left;
  line-height: 1.45;
}

/* === RIGA 1: Warning (condizionale) === */
body#contact .recaptcha-warning {
  display: none; /* nascosta di default */
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  margin-bottom: 1.45rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 4px;
  line-height: 1.2;
}

/* Override quando JS la mostra */
body#contact .recaptcha-warning[style*="display: block"] {
  display: flex !important;
}

body#contact .recaptcha-warning strong {
  font-weight: 600;
  color: #92400e;
}

body#contact .recaptcha-warning a.btn-open-consent {
  color: #24b9d7;
  font-weight: 600;
  text-decoration: none;
}

body#contact .recaptcha-warning a.btn-open-consent:hover {
  color: #198195;
  text-decoration: none;
}

/* === RIGA 2: Titolo principale === */
body#contact .recaptcha-title {
  display: block;
  font-size: 0.95rem;
}

body#contact .recaptcha-title strong {
  font-weight: 600;
  color: #4f4f4f;
}

/* === RIGA 3: Terms === */
body#contact .recaptcha-terms {
  display: block;
  font-size: 0.75rem;
  color: #7a7a7a;
  padding-left: 0;
}

body#contact .recaptcha-terms a {
  color: #24b9d7;
  text-decoration: none;
}

body#contact .recaptcha-terms a:hover {
  color: #198195;
  text-decoration: none;
}

/* === ICONE Material Icons === */
body#contact .recaptcha-disclaimer i.material-icons {
  font-size: 1.25rem;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 1;
}

body#contact .recaptcha-warning i.material-icons {
  color: #f59e0b;
}

/* === RESPONSIVE === */

/* Mobile */
@media (max-width: 767px) {
  /* Badge Google reCAPTCHA nascosto su mobile: il disclaimer resta visibile nel form contatti. */
  .grecaptcha-badge {
    visibility: hidden !important;
  }

  body#contact .recaptcha-disclaimer {
    margin-top: 2.2rem;
    padding: 1rem 0.94rem;
    border-left-width: 4px;
  }

  body#contact .recaptcha-warning {
    font-size: 0.875rem;
    gap: 0.5rem;
    flex-wrap: wrap; /* permette al testo di andare a capo */
  }

  body#contact .recaptcha-title {
    font-size: 0.875rem;
  }

  body#contact .recaptcha-terms {
    font-size: 0.688rem;
    padding-left: 0;
  }

  body#contact .recaptcha-disclaimer i.material-icons {
    font-size: 1.125rem;
  }
}

/* === LARGHEZZA DEL FORM IN MOBILE - allargamento === */

/* Contact mobile full-bleed come categorie */
@media (max-width: 767px) {
  body#contact #content.page-content.card.card-block {
    margin-left: -15px;     /* esce dal gutter della colonna */
    margin-right: -15px;
    padding-left: 0;        /* niente padding laterale sul card */
    padding-right: 0;
  }

  /* rientra di 15px solo il contenuto utile */
  body#contact #content.page-content.card.card-block .contact-form,
  body#contact #content.page-content.card.card-block .contact-rich {
    padding-left: 15px;
    padding-right: 15px;
  }
}
