/*!
 * wpv-core — lead enquiry form. Theme-independent, scoped under .wpv-lead.
 * Matches the calculator's blue palette; accessible focus and contrast.
 */

.wpv-lead {
  --wpv-lead-fg: #16323f;
  --wpv-lead-muted: #50697a;
  --wpv-lead-accent: #2f7fd6;
  --wpv-lead-border: rgba(120, 140, 160, .4);
  --wpv-lead-field-bg: #ffffff;
  --wpv-lead-card-bg: rgba(255, 255, 255, .72);
  --wpv-lead-radius: 14px;
  --wpv-lead-font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  max-width: 820px;
  margin: 2rem auto;
  padding: clamp(1rem, 3vw, 1.6rem);
  border: 1px solid rgba(120, 140, 160, .25);
  border-radius: 18px;
  background: var(--wpv-lead-card-bg);
  color: var(--wpv-lead-fg);
  font-family: var(--wpv-lead-font);
  line-height: 1.5;
  scroll-margin-top: 1rem;
}
.wpv-lead * { box-sizing: border-box; }

@media (prefers-color-scheme: dark) {
  .wpv-lead {
    --wpv-lead-fg: #eaf2f7;
    --wpv-lead-muted: #a7bcc8;
    --wpv-lead-accent: #6db1f2;
    --wpv-lead-border: rgba(255, 255, 255, .2);
    --wpv-lead-field-bg: rgba(13, 24, 31, .82);
    --wpv-lead-card-bg: rgba(22, 38, 48, .6);
  }
}

.wpv-lead__title { margin: 0 0 .4rem; font-size: clamp(1.3rem, 3.5vw, 1.7rem); line-height: 1.2; }
.wpv-lead__intro { margin: 0 0 1.2rem; color: var(--wpv-lead-muted); }

.wpv-lead__notice { margin: 0 0 1.1rem; padding: .7rem .9rem; border-radius: 10px; font-weight: 600; }
.wpv-lead__notice--ok { background: rgba(31, 157, 114, .16); color: #157a52; }
.wpv-lead__notice--error { background: rgba(210, 74, 63, .14); color: #bb2d22; }
@media (prefers-color-scheme: dark) {
  .wpv-lead__notice--ok { color: #34c58c; }
  .wpv-lead__notice--error { color: #f0685c; }
}

.wpv-lead__grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .wpv-lead__grid { grid-template-columns: 1fr; } }

.wpv-lead__field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.wpv-lead__field label { font-weight: 600; }
.wpv-lead__req { color: var(--wpv-lead-accent); }

.wpv-lead input[type="text"],
.wpv-lead input[type="email"],
.wpv-lead input[type="tel"],
.wpv-lead textarea {
  font: inherit; color: inherit; width: 100%; min-height: 46px;
  background: var(--wpv-lead-field-bg);
  border: 1px solid var(--wpv-lead-border);
  border-radius: 12px; padding: .65rem .8rem;
}
.wpv-lead textarea { min-height: 110px; resize: vertical; }
.wpv-lead input:focus-visible,
.wpv-lead textarea:focus-visible,
.wpv-lead button:focus-visible {
  outline: 3px solid var(--wpv-lead-accent); outline-offset: 2px;
}

.wpv-lead__consent { margin: .4rem 0 1.2rem; }
.wpv-lead__check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; }
.wpv-lead__check input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--wpv-lead-accent); flex: 0 0 auto; }
.wpv-lead__check span { font-size: .92rem; color: var(--wpv-lead-fg); }
.wpv-lead__check a { color: var(--wpv-lead-accent); }

.wpv-lead__btn {
  font: inherit; font-weight: 700; cursor: pointer; color: #fff; border: 0;
  border-radius: 999px; padding: .85rem 1.7rem; min-height: 52px; font-size: 1.02rem;
  background: linear-gradient(135deg, #2563c9, #1f6fae);
  box-shadow: 0 14px 34px -12px rgba(31, 90, 160, .7);
}
.wpv-lead__btn:hover { filter: brightness(1.06); }

/* Upload-Bereich (optionale Fotos/Unterlagen) */
.wpv-lead__uploads {
  margin: .2rem 0 1.2rem;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--wpv-lead-border);
  border-radius: var(--wpv-lead-radius);
}
.wpv-lead__uploads legend { font-weight: 700; padding: 0 .4em; }
.wpv-lead__hint { margin: .2rem 0 1rem; font-size: .88rem; color: var(--wpv-lead-muted); }
.wpv-lead__uploads-list {
  margin: .2rem 0 1rem 1.1rem; padding: 0;
  font-size: .88rem; color: var(--wpv-lead-muted);
}
.wpv-lead__uploads-list li { margin: .15rem 0; }
.wpv-lead__file label { font-weight: 600; font-size: .95rem; }
.wpv-lead input[type="file"] {
  font: inherit; color: inherit; width: 100%;
  background: var(--wpv-lead-field-bg);
  border: 1px solid var(--wpv-lead-border);
  border-radius: 12px; padding: .55rem .7rem; min-height: 46px;
  cursor: pointer;
}
.wpv-lead input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600; cursor: pointer;
  margin-right: .8rem; padding: .5rem .9rem; min-height: 38px;
  color: #fff; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #2563c9, #1f6fae);
}
.wpv-lead input[type="file"]:focus-visible { outline: 3px solid var(--wpv-lead-accent); outline-offset: 2px; }

/* Honeypot: keep it out of sight and out of the tab order, but present in DOM. */
.wpv-lead__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}
