/* =========================================================
   BRUKTTECH – SKJEMA
   Shared styling for every lead form on the site: the bedrift
   quote form on /it-utskifting-bedrift/ and the "selg til oss"
   forms on the consumer and dealer pages.

   Loaded by btcf_lead_enqueue_form_css() in modules/lead-security.php,
   which keys on the page actually containing a form shortcode, so no
   page pays for CSS it does not render.

   Lifted out of bedrift.css when the second form arrived — keep it
   here rather than letting two copies drift.
========================================================= */

.bt-form {
  max-width: 860px;
  margin: 32px auto 0;
  padding: 34px 32px 30px;
  border: 1px solid var(--bt-border);
  border-radius: 12px;
  background: var(--bt-white);
  box-shadow: var(--bt-shadow-md);
  text-align: left;
}

.bt-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 20px;
}

.bt-form-field {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.bt-form-field--full {
  margin-top: 22px;
}

.bt-form label,
.bt-form legend {
  margin-bottom: 7px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--bt-navy);
}

.bt-req {
  color: var(--bt-red);
}

.bt-opt {
  font-weight: 600;
  color: var(--bt-muted);
}

.bt-form input[type="text"],
.bt-form input[type="email"],
.bt-form input[type="tel"],
.bt-form select,
.bt-form textarea {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--bt-border);
  border-radius: 4px;
  background: var(--bt-white);
  box-shadow: none;
  color: var(--bt-ink);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bt-form textarea {
  min-height: 120px;
  resize: vertical;
}

.bt-form input:focus,
.bt-form select:focus,
.bt-form textarea:focus {
  outline: none;
  border-color: var(--bt-navy);
  box-shadow: 0 0 0 3px rgba(15, 61, 94, 0.13);
}

.bt-form input:invalid:not(:placeholder-shown),
.bt-form select:invalid:not([value=""]) {
  border-color: var(--bt-border);
}

.bt-form-help {
  margin-top: 7px;
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--bt-muted);
}

/* Fieldsets */

.bt-form-fieldset {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}

.bt-form-fieldset legend {
  display: block;
  padding: 0;
  width: 100%;
}

.bt-form-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 9px 18px;
  margin-top: 4px;
}

.bt-check,
.bt-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--bt-body);
  cursor: pointer;
}

.bt-check input,
.bt-radio input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--bt-navy);
}

.bt-form-radios {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.bt-radio {
  padding: 14px 16px;
  border: 1px solid var(--bt-border);
  border-radius: 6px;
  background: var(--bt-white);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.bt-radio:hover {
  border-color: var(--bt-navy);
  background: var(--bt-navy-soft);
}

.bt-radio:has(input:checked) {
  border-color: var(--bt-navy);
  background: var(--bt-navy-soft);
}

.bt-radio span {
  display: block;
}

.bt-radio strong {
  display: block;
  font-weight: 800;
  color: var(--bt-ink);
}

.bt-radio em {
  display: block;
  margin-top: 3px;
  font-size: 0.87rem;
  font-style: normal;
  font-weight: 600;
  color: var(--bt-muted);
}

/* Consent and submit */

.bt-form-consent {
  margin: 24px 0 0;
  padding: 16px 18px;
  border-radius: 6px;
  background: var(--bt-surface);
}

.bt-form-consent .bt-check {
  font-size: 0.89rem;
  font-weight: 600;
}

.bt-form-consent a {
  color: var(--bt-navy);
  text-decoration: underline;
}

.bt-form-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 24px 0 0;
}

.bt-form-submit .bt-action-btn {
  cursor: pointer;
  font-family: inherit;
}

.bt-form-submit .bt-form-help {
  margin-top: 0;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */

.bt-form-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Notices */

.bt-form-notice {
  max-width: 860px;
  margin: 32px auto 0;
  padding: 26px 28px;
  border-radius: 10px;
  border-left: 4px solid var(--bt-navy);
  background: var(--bt-navy-soft);
  text-align: left;
}

.bt-form-notice h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bt-navy);
}

.bt-form-notice p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--bt-body);
}

.bt-form-notice--error {
  border-left-color: var(--bt-red);
  background: #fdf1f1;
}

.bt-form-notice--error h3 {
  color: var(--bt-red-dark);
}

@media (max-width: 560px) {
  .bt-form {
    padding: 26px 20px 24px;
  }

  .bt-form-notice {
    padding: 22px 20px;
  }
}

/* =========================================================
   ADDITIONS FOR THE "SELG TIL OSS" FORMS
   The bedrift form predates these three; both forms use them now.
========================================================= */

/* Success notice. The error variant already recolours the base notice;
   this does the same in the other direction. --bt-green is the WhatsApp
   brand green, so the darker token is used here to keep the two apart. */
.bt-form-notice--ok {
  border-left-color: var(--bt-green-dark);
  background: #f1faf4;
}

/* One line of framing above the fields, telling people the blanks are
   allowed to stay blank. It measurably shortens the fields they skip. */
.bt-form-intro {
  max-width: 62ch;
  margin: 0 0 26px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--bt-muted);
}

/* Turnstile renders its own 300x65 iframe; this only reserves the space so
   the submit button does not jump when the widget finishes loading. */
.bt-form-turnstile {
  margin: 4px 0 22px;
  min-height: 65px;
}

.bt-form-turnstile:empty {
  display: none;
  min-height: 0;
}

@media (max-width: 480px) {
  .bt-form-turnstile {
    transform: scale(0.9);
    transform-origin: left top;
  }
}
