/* === FORM CF7 v3.0 === */

/* ----------------------------------------
   FLEXBOX LAYOUT
---------------------------------------- */
.flex-form {
  padding:3rem 3rem;
}
.flex-form .flex-row:not(:last-child) {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.flex-form .form-field {
  box-sizing: border-box;
}

/* Colonne Desktop */
.col-1 { flex: 0 0 100%; }
.col-2 { flex: 0 0 calc(50% - 0.5rem); }
.col-3 { flex: 0 0 calc(33.333% - 0.6666rem); }
.col-4 { flex: 0 0 calc(25% - 0.75rem); }

/* Colonne speciali in sidebar */
.sidebar .col-3 { flex: 0 0 calc(50% - 0.5rem); }
.sidebar .col-3:last-child { flex: 0 0 100%; }

/* Tablet */
@media (max-width: 1024px) {
  .flex-form {
    padding:2rem 2rem;
  }
  .col-md-1 { flex: 0 0 100%; }
  .col-md-2 { flex: 0 0 calc(50% - 0.5rem); }
  .col-md-3 { flex: 0 0 calc(33.333% - 0.6666rem); }
  .col-md-4 { flex: 0 0 calc(25% - 0.75rem); }
}

/* Mobile */
@media (max-width: 768px) {
  .flex-form {
    padding:1rem 1rem;
  }
  .col-sm-1 { flex: 0 0 100%; }
  .col-sm-2 { flex: 0 0 calc(50% - 0.5rem); }
  .col-sm-3 { flex: 0 0 calc(33.333% - 0.6666rem); }
  .col-sm-4 { flex: 0 0 calc(25% - 0.75rem); }
}

/* ----------------------------------------
   CAMPI FORM - STILIZZAZIONE BASE
---------------------------------------- */

form *::placeholder {
  font-family: var(--global-body-font-family);
}

.wpcf7 form .wpcf7-response-output {
  margin: 0;
  padding: 0.5rem;
}

.wpcf7-not-valid-tip {
  font-size: 0.8rem;
}
.wpcf7-response-output {
  text-align: center;
  border-radius: 9rem;
}

.flex-form label.hidden {
  display: none;
  height: 0 !important;
}
.flex-form input {
  line-height: 1 !important;
}
.flex-form input[type="text"], 
.flex-form input[type="number"], 
.flex-form input[type="email"],
.flex-form input[type="tel"],
.flex-form input[type="file"],
.flex-form textarea,
.flex-form select {
  box-sizing: border-box;
  width: 100%;
  padding: 0.5rem 1rem !important;
  border-radius: 9rem !important;
  border: 1px solid var(--global-palette5);
  background: var(--global-palette7);
  color: var(--global-palette5) !important;
}

.flex-form select,
.flex-form input[type="file"] {
  color: var(--global-palette5) !important;
  border: 1px solid var(--global-palette5);
}
.flex-form select:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.flex-form select {
  background: var(--global-palette8) no-repeat calc(100% - 1rem) url('/wp-content/uploads/2025/07/CaretRight.png') !important;
}

.flex-form textarea {
  border-radius: 1rem !important;
}

.flex-form .wpcf7-list-item-label {
  display: flex;
  align-items: center;
}
.flex-form .privacy span {
  font-size: 0.7rem;
}

/* ----------------------------------------
   CHECKBOX PERSONALIZZATI (PRIVACY)
---------------------------------------- */

.privacy input[type="checkbox"] {
  opacity: 0;
  position: absolute;
}

.custom-check  {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid var(--global-palette3);
  margin-right: 0.5rem;
  vertical-align: middle;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  flex-shrink: 0;
}

.privacy input[type="checkbox"]:checked + .wpcf7-list-item-label .custom-check, .tml-checkbox:checked {
  background-color: var(--global-palette1);
}

.privacy input[type="checkbox"]:checked + .wpcf7-list-item-label .custom-check::after, .tml-checkbox:after {
  content: '';
  position: absolute;
  left: 50%;
  top: 40%;
  width: 8px;
  height: 14px;
  border: solid var(--global-palette7);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.custom-check:hover, .tml-checkbox:hover {
  cursor: pointer;
}

/* ----------------------------------------
   VARI ELEMENTI DI LAYOUT
---------------------------------------- */

.mail-protetta {
  display: flex;
  align-items: center;
}

.mail-protetta > svg {
  margin-right: 0.5rem;
  width: 1.5rem;
  min-width: 1.5rem;
  height: auto;
}

.wpcf7-list-item {
  margin: 0;
}

.wpcf7-list-item > label {
  display: flex;
  flex-direction: row;
  align-items: center;
  column-gap: 1rem;
}

.accettazione {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 100% !important;
}

.flex-button-submit {
  
}

/* Responsive Button Align */
@media (max-width: 992px) {
  .flex-button-submit {
    text-align: left;
  }
}

/* Button Style */
.flex-form button {
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 9rem;
    font-size: .9rem;
    padding: .5rem 2rem;
}

/* Errors style*/
.da-errors {
	color: #dc3232;
    font-size: 0.8rem;
}
