/* Whiteready Contact — form del builder. Colori dai custom property impostati dal runtime. */
/* Il layout si adatta alla larghezza del contenitore (colonna, sidebar, anteprima mobile), non della finestra */
.wrcf-root { container-type: inline-size; }
.wrcf {
  --wrcf-bg: #ffffff;
  --wrcf-tc: #1f2328;
  --wrcf-ac: #2d7a1f;
  --wrcf-line: color-mix(in srgb, var(--wrcf-tc) 22%, transparent);
  --wrcf-soft: color-mix(in srgb, var(--wrcf-tc) 6%, var(--wrcf-bg));
  --wrcf-err: #c0392b;
  position: relative;
  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px;
  background: var(--wrcf-bg);
  color: var(--wrcf-tc);
  border: 1px solid var(--wrcf-line);
  border-radius: 14px;
  font: inherit;
  line-height: 1.5;
}
.wrcf *, .wrcf *::before, .wrcf *::after { box-sizing: border-box; }
.wrcf-title { margin: 0 0 4px; font-size: 1.4em; line-height: 1.25; color: inherit; }
.wrcf-sub { margin: 0 0 20px; opacity: .75; }
.wrcf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.wrcf-field { grid-column: 1 / -1; min-width: 0; }
.wrcf-w-half { grid-column: span 1; }
.wrcf-label { display: block; margin: 0 0 6px; padding: 0; font-weight: 600; font-size: .95em; }
.wrcf-req { color: var(--wrcf-ac); margin-left: 3px; }
.wrcf-input {
  display: block; width: 100%; margin: 0;
  padding: 10px 12px; font: inherit; color: #1f2328;
  background: #fff; border: 1px solid var(--wrcf-line); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.wrcf-input:focus { outline: none; border-color: var(--wrcf-ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wrcf-ac) 25%, transparent); }
.wrcf-textarea { min-height: 120px; resize: vertical; }
.wrcf-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.wrcf-check { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; }
.wrcf-check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--wrcf-ac); }
.wrcf-check label { cursor: pointer; }
.wrcf-check a { color: var(--wrcf-ac); }
.wrcf-help { margin: 6px 0 0; font-size: .85em; opacity: .7; }
.wrcf-ferr { margin: 6px 0 0; font-size: .85em; font-weight: 600; color: var(--wrcf-err); }
.wrcf-ferr:empty { display: none; }
.wrcf-field.has-error .wrcf-input, .wrcf-field.has-error .wrcf-drop { border-color: var(--wrcf-err); }
.wrcf-section { margin: 8px 0 2px; font-size: 1.1em; padding-bottom: 6px; border-bottom: 1px solid var(--wrcf-line); }
.wrcf-section-text { margin: 4px 0 0; opacity: .8; }

.wrcf-drop {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 18px; text-align: center; cursor: pointer;
  background: var(--wrcf-soft); border: 2px dashed var(--wrcf-line); border-radius: 10px;
}
.wrcf-drop:focus { outline: none; border-color: var(--wrcf-ac); }
.wrcf-drop.is-over { border-color: var(--wrcf-ac); background: color-mix(in srgb, var(--wrcf-ac) 10%, var(--wrcf-bg)); }
.wrcf-drop-main { font-weight: 600; }
.wrcf-drop-sub { font-size: .8em; opacity: .7; }
.wrcf-files { list-style: none; margin: 8px 0 0; padding: 0; }
.wrcf-files li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; margin-bottom: 4px; font-size: .9em; background: var(--wrcf-soft); border-radius: 6px; }
.wrcf-file-rm { border: 0; background: none; cursor: pointer; color: inherit; font-size: 1em; padding: 2px 6px; }

.wrcf-captcha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wrcf-captcha-img { display: block; width: 150px; height: 50px; border: 1px solid var(--wrcf-line); border-radius: 8px; background: #fff; }
.wrcf-captcha-ref { width: 40px; height: 40px; border: 1px solid var(--wrcf-line); border-radius: 8px; background: #fff; color: var(--wrcf-ac); font-size: 1.2em; cursor: pointer; }
.wrcf-captcha-in { flex: 1; min-width: 120px; width: auto; text-transform: uppercase; letter-spacing: .15em; }

.wrcf-actions { margin-top: 22px; }
.wrcf-btn {
  padding: 11px 26px; font: inherit; font-weight: 700; cursor: pointer;
  color: #fff; background: var(--wrcf-ac); border: 0; border-radius: 8px;
  transition: filter .15s;
}
.wrcf-btn:hover { filter: brightness(1.08); }
.wrcf-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--wrcf-ac) 40%, transparent); outline-offset: 2px; }
.wrcf-btn:disabled { opacity: .6; cursor: progress; }
.wrcf-progress { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 3px; background: var(--wrcf-soft); }
.wrcf-progress[hidden] { display: none; }
.wrcf-progress-bar { width: 0; height: 100%; background: var(--wrcf-ac); transition: width .2s; }
.wrcf-file-busy { opacity: .7; font-style: italic; }
.wrcf-msg { margin-top: 14px; font-weight: 600; }
.wrcf-msg:empty { display: none; }
.wrcf-msg.is-ok { color: var(--wrcf-ac); }
.wrcf-msg.is-err { color: var(--wrcf-err); }
.wrcf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.wrcf-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 30px; text-align: center; border-radius: inherit;
  background: rgba(0, 0, 0, .6); color: #fff; font-weight: 700;
}

@container (max-width: 460px) {
  .wrcf { padding: 20px 16px; }
  .wrcf-grid { grid-template-columns: 1fr; }
  .wrcf-w-half { grid-column: 1 / -1; }
}
