/* =============================================================
   Newtools Pro — Fluent Forms skin
   -------------------------------------------------------------
   Reproduces the contact form from the design.

   Two things make this file deterministic:

   1. inc/fluentform.php returns false from
      `fluentform/load_default_public`, so the plugin's default
      style pack never loads and this file is the only opinionated
      stylesheet on the form.

   2. Selectors are prefixed `.ntp-form .fluentform`, giving them
      three classes of specificity. The plugin's remaining base
      stylesheet (fluent-forms-public.css) is enqueued AFTER this
      file and its rules are mostly one or two classes, so this
      wins on specificity rather than on load order — which is the
      part we do not control.

   Markup map:
     .frm-fluent-form        the <form>
     .ff-t-container         a row
     .ff-t-cell              a column in a row
     .ff-el-group            one field wrapper
     .ff-el-input--label     label wrapper
     .ff-el-form-control     input / select / textarea
     .ff-btn-submit          submit button
     .ff-el-is-error         field wrapper in an error state
   ============================================================= */

/* ── Reset the plugin's chrome ──────────────────────────────── */
.ntp-form .fluentform fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-inline-size: 100%;
}

.ntp-form .fluentform .ff-el-form-control,
.ntp-form .fluentform .ff-btn-submit {
  font-family: var(--font-sans);
}

/* ── Rows and columns ───────────────────────────────────────────
   The Container renderer prints style="flex-basis: 50%" inline on
   each column. The cells keep the default flex-shrink, so a gap
   simply squeezes them rather than forcing a wrap. */
.ntp-form .fluentform .ff-t-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  width: 100%;
  margin: 0 0 16px;
}

.ntp-form .fluentform .ff-t-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
}

/* ── Field wrapper ──────────────────────────────────────────────
   The plugin gives .ff-el-group a `content:" "; display:table`
   clearfix, which is harmless in its own block layout. Here the
   group is a flex container, so those pseudo-elements become flex
   ITEMS: two zero-height boxes that still earn a 7px row-gap each,
   adding 14px to every field. Drop them. */
.ntp-form .fluentform .ff-el-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 16px;
}

.ntp-form .fluentform .ff-el-group::before,
.ntp-form .fluentform .ff-el-group::after {
  content: none;
}

.ntp-form .fluentform .ff-t-cell .ff-el-group {
  margin-bottom: 0;
}

/* ── Labels: mono, uppercase, tracked ───────────────────────────
   The wrapper carries the font-size too. Left at the inherited
   16px its line box is 22px tall, against the 15px of the design's
   bare <label>, which would push every field down by 7px. */
.ntp-form .fluentform .ff-el-input--label {
  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: normal;
}

.ntp-form .fluentform .ff-el-input--label label {
  display: inline;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: normal;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* The design marks no field with an asterisk; required-ness is enforced on
   submit instead. The plugin's own marker rule carries four classes, so the
   `.asterisk-*` class has to be repeated here to break the tie — without it the
   two selectors score identically and the plugin's sheet, which loads later,
   keeps the asterisk. */
.ntp-form .fluentform .ff-el-input--label.ff-el-is-required.asterisk-right label:after,
.ntp-form .fluentform .ff-el-input--label.ff-el-is-required.asterisk-left label:before {
  content: none;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.ntp-form .fluentform .ff-el-form-control {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #d8dee9;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  background-image: none;
  font-size: 14.5px;
  color: var(--color-text-dark);
  box-shadow: none;
  transition: border-color 0.2s;
}

.ntp-form .fluentform .ff-el-form-control:focus {
  outline: none;
  border-color: var(--color-blue-light);
  background: var(--color-white);
  box-shadow: none;
}

.ntp-form .fluentform .ff-el-form-control::placeholder {
  color: var(--color-text-dim);
}

.ntp-form .fluentform textarea.ff-el-form-control {
  resize: vertical;
}

.ntp-form .fluentform select.ff-el-form-control {
  color: var(--color-text-dark);
}

/* ── Submit button ──────────────────────────────────────────────
   The design lays the form out as a grid, where the 16px gap and
   the button's own 4px margin simply add up to 20px. Here the
   fields are block-level siblings, so those margins COLLAPSE to
   the larger of the two. Ask for the full 20px to land in the
   same place. */
.ntp-form .fluentform .ff_submit_btn_wrapper {
  margin: 20px 0 0;
  text-align: left;
}

.ntp-form .fluentform .ff-btn-submit {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-orange);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--color-white);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.32);
  transition: background 0.2s, transform 0.2s;
}

.ntp-form .fluentform .ff-btn-submit:hover,
.ntp-form .fluentform .ff-btn-submit:focus {
  background: #ea6c0a;
  color: var(--color-white);
  transform: translateY(-1px);
}

.ntp-form .fluentform .ff-btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Validation and messages ────────────────────────────────── */
.ntp-form .fluentform .ff-el-is-error .ff-el-form-control {
  border-color: #dc2626;
}

.ntp-form .fluentform .text-danger,
.ntp-form .fluentform .error-text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #dc2626;
}

.ntp-form .fluentform .ff-el-help-message {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.ntp-form .ff-message-success {
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-blue);
  border-radius: var(--radius-sm);
  background: var(--color-blue-tint);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-dark);
}

.ntp-form .ff-errors-in-stack {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  font-size: 14px;
  color: #b91c1c;
}

.ntp-form .ff-errors-in-stack:empty {
  display: none;
  padding: 0;
}

/* ── Checkboxes / radios ────────────────────────────────────── */
.ntp-form .fluentform .ff-el-form-check-label {
  font-size: 14.5px;
  color: var(--color-text);
}

/* ── Mobile ─────────────────────────────────────────────────────
   Matches the design, which collapses the form to one column at
   600px and tightens the gap. */
@media (max-width: 600px) {
  .ntp-form .fluentform .ff-t-container {
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
  }

  .ntp-form .fluentform .ff-t-cell {
    flex-basis: 100% !important; /* Beats the inline flex-basis printed by the Container renderer. */
  }

  .ntp-form .fluentform .ff-el-group {
    margin-bottom: 14px;
  }
}
