/* ═══════════════════════════════════════════════
   ANCYLLAR OBLIVION — Gravity Forms Override
   Applicato solo dentro .demo-form-wrap (sfondo scuro)
═══════════════════════════════════════════════ */

/* ── RESET CONTENITORE ── */
.demo-form-wrap .gform_wrapper,
.demo-form-wrap .gform_wrapper * { box-sizing: border-box; }

/* ── TITOLO E DESCRIZIONE FORM (nascosti) ── */
.demo-form-wrap .gform_title,
.demo-form-wrap .gform_description { display: none; }

/* ── LABEL ── */
.demo-form-wrap .gfield_label {
  font-family: var(--mono) !important;
  font-size: 0.6rem !important;
  font-weight: 400 !important;
  color: var(--gold) !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  margin-bottom: 0.4rem !important;
}
.demo-form-wrap .gfield_required { color: var(--red-risk) !important; margin-left: 2px; }

/* ── INPUT, SELECT, TEXTAREA ── */
.demo-form-wrap input[type="text"],
.demo-form-wrap input[type="email"],
.demo-form-wrap input[type="tel"],
.demo-form-wrap input[type="number"],
.demo-form-wrap input[type="url"],
.demo-form-wrap select,
.demo-form-wrap textarea {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(184,149,58,0.25) !important;
  border-radius: 0 !important;
  color: var(--parchment) !important;
  font-family: var(--sans) !important;
  font-size: 0.9rem !important;
  font-weight: 300 !important;
  padding: 0.75rem 1rem !important;
  width: 100% !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s, background 0.2s !important;
  -webkit-appearance: none;
  appearance: none;
}
.demo-form-wrap input::placeholder,
.demo-form-wrap textarea::placeholder { color: rgba(245,242,235,0.2) !important; }
.demo-form-wrap input:focus,
.demo-form-wrap select:focus,
.demo-form-wrap textarea:focus {
  border-color: var(--gold) !important;
  background: rgba(184,149,58,0.06) !important;
}

/* ── SELECT freccia personalizzata ── */
.demo-form-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23b8953a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 1rem center !important;
  padding-right: 2.5rem !important;
  cursor: pointer;
}
.demo-form-wrap select option { background: var(--ink) !important; color: var(--parchment) !important; }

/* ── TEXTAREA ── */
.demo-form-wrap textarea { resize: vertical; min-height: 90px; }

/* ── LAYOUT CAMPI ── */
.demo-form-wrap .gform_fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.demo-form-wrap .gfield { margin: 0 !important; padding: 0 !important; }
.demo-form-wrap .gfield--full-width,
.demo-form-wrap .gfield.gcol-full { grid-column: 1 / -1; }

/* GF v2 usa data-js="field" per layout */
.demo-form-wrap .gfield[data-js="field"] { margin-bottom: 0 !important; }

/* ── CONSENSO / CHECKBOX ── */
.demo-form-wrap .gfield--type-consent .gchoice,
.demo-form-wrap .gfield--type-checkbox .gchoice {
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.demo-form-wrap input[type="checkbox"] { width: 14px !important; height: 14px !important; margin-top: 3px; accent-color: var(--gold); flex-shrink: 0; }
.demo-form-wrap .gfield--type-consent label,
.demo-form-wrap .gfield--type-checkbox label {
  font-family: var(--mono) !important; font-size: 0.6rem !important;
  color: rgba(245,242,235,0.35) !important; line-height: 1.6 !important;
  text-transform: none !important; letter-spacing: 0.03em !important;
}
.demo-form-wrap .gfield--type-consent a,
.demo-form-wrap .gfield--type-checkbox a { color: var(--gold) !important; text-decoration: underline; }

/* ── NOTE / DESCRIZIONE CAMPO ── */
.demo-form-wrap .gfield_description {
  font-family: var(--mono) !important; font-size: 0.6rem !important;
  color: rgba(245,242,235,0.25) !important; line-height: 1.5 !important;
  margin-top: 0.3rem;
}

/* ── VALIDATION ── */
.demo-form-wrap .gfield_validation_message,
.demo-form-wrap .gfield_error .gfield_validation_message {
  font-family: var(--mono) !important; font-size: 0.6rem !important;
  color: var(--red-risk) !important; margin-top: 0.3rem !important;
  background: rgba(192,57,43,0.08) !important;
  border: none !important; padding: 0.3rem 0.6rem !important;
  border-left: 2px solid var(--red-risk) !important;
}
.demo-form-wrap .gfield_error input,
.demo-form-wrap .gfield_error select,
.demo-form-wrap .gfield_error textarea {
  border-color: rgba(192,57,43,0.6) !important;
}
.demo-form-wrap .validation_error {
  font-family: var(--mono) !important; font-size: 0.7rem !important;
  color: var(--red-risk) !important; border: 1px solid rgba(192,57,43,0.3) !important;
  background: rgba(192,57,43,0.06) !important; padding: 0.8rem 1rem !important;
  margin-bottom: 1rem !important; border-radius: 0 !important;
}

/* ── PULSANTE SUBMIT ── */
.demo-form-wrap .gform_button,
.demo-form-wrap .gform_footer input[type="submit"],
.demo-form-wrap input[type="submit"] {
  width: 100% !important; padding: 1rem 1.5rem !important;
  background: var(--gold) !important; color: var(--ink) !important;
  border: none !important; border-radius: 0 !important; cursor: pointer !important;
  font-family: var(--mono) !important; font-size: 0.75rem !important;
  letter-spacing: 0.2em !important; text-transform: uppercase !important;
  font-weight: 500 !important; transition: background 0.2s !important;
  margin-top: 0.5rem !important; -webkit-appearance: none !important;
}
.demo-form-wrap .gform_button:hover,
.demo-form-wrap input[type="submit"]:hover {
  background: var(--gold-light) !important;
}

/* ── FOOTER FORM (dove sta il submit) ── */
.demo-form-wrap .gform_footer { padding: 0 !important; margin-top: 1rem !important; }
.demo-form-wrap .gform_footer.top_label { text-align: left !important; }

/* ── CONFERMA INVIO ── */
.demo-form-wrap .gform_confirmation_wrapper,
.demo-form-wrap .gforms_confirmation_message {
  font-family: var(--mono) !important; font-size: 0.85rem !important;
  color: var(--gold) !important; line-height: 1.6 !important;
  padding: 2rem !important;
  border: 1px solid rgba(184,149,58,0.3) !important;
  background: rgba(184,149,58,0.05) !important;
  text-align: center !important;
}

/* ── SPINNER ── */
.demo-form-wrap .gform_ajax_spinner { filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg); }

/* ── PROGRESSO (se multi-step) ── */
.demo-form-wrap .gf_progressbar_wrapper { margin-bottom: 1.5rem; }
.demo-form-wrap .gf_progressbar { background: rgba(255,255,255,0.08) !important; height: 4px !important; border-radius: 0 !important; }
.demo-form-wrap .gf_progressbar_percentage { background: var(--gold) !important; height: 4px !important; border-radius: 0 !important; }
.demo-form-wrap .gf_progressbar_title { font-family: var(--mono) !important; font-size: 0.6rem !important; color: var(--gold) !important; letter-spacing: 0.15em !important; }

/* ── RECAPTCHA ── */
.demo-form-wrap .ginput_recaptcha { margin-top: 0.5rem; }
