/* =====================================================================
   Rainbow Dog Rescue — Fluent Forms skin
   Maps Fluent Forms (free) markup onto the crayon design system.
   Custom properties come from crayon.css (loaded first as a dependency).

   Scoping note: everything lives under .fluentform so nothing leaks out.
   Rules for elements INSIDE the form are scoped .fluentform .frm-fluent-form
   (three classes) because Fluent Forms' own stylesheets enqueue AFTER this
   file and use two-class selectors (.ff-default .ff-el-form-control etc.) —
   the extra class outranks them regardless of load order.
   ===================================================================== */

/* --- The form card (mirrors .form-card in crayon.css) ------------------ */

.fluentform {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 8px 8px 0 var(--ink);
}

/* Fluent Forms spaces field groups with its own margin-bottom: 20px —
   the same gap as the prototype's .form-card grid, so it is left alone. */

/* Two-column rows (.ff-t-container = the prototype's .form-row) */
.fluentform .frm-fluent-form .ff-t-container {
  gap: 16px;
}
.fluentform .frm-fluent-form .ff-t-container .ff-t-cell {
  padding: 0;
}

/* --- Labels ------------------------------------------------------------ */

.fluentform .frm-fluent-form .ff-el-input--label {
  margin-bottom: 8px;
}
.fluentform .frm-fluent-form .ff-el-input--label label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 0;
}

/* Required asterisk — red, matching .field.req in crayon.css */
.fluentform .frm-fluent-form .ff-el-input--label.ff-el-is-required.asterisk-right label:after {
  content: ' *';
  color: var(--red);
  font-weight: 800;
}

/* --- Inputs / selects / textareas -------------------------------------- */

.fluentform .frm-fluent-form .ff-el-form-control {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 12px 16px;
  width: 100%;
  height: auto;
  line-height: 1.4;
  transition: box-shadow .15s, transform .1s;
}

.fluentform .frm-fluent-form .ff-el-form-control::placeholder {
  color: rgba(26, 20, 16, 0.45);
  font-weight: 600;
}

/* Focus: hard offset ink shadow + lift, no default outline
   (mirrors the .form-field input:focus pattern in crayon.css) */
.fluentform .frm-fluent-form .ff-el-form-control:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.fluentform .frm-fluent-form textarea.ff-el-form-control {
  min-height: 110px;
  resize: vertical;
}

.fluentform .frm-fluent-form select.ff-el-form-control {
  cursor: pointer;
  height: auto;
}

/* --- Radio / checkbox items -------------------------------------------- */

.fluentform .frm-fluent-form .ff-el-form-check {
  margin: 0 0 10px;
}
.fluentform .frm-fluent-form .ff-el-form-check:last-child {
  margin-bottom: 0;
}

.fluentform .frm-fluent-form .ff-el-form-check label.ff-el-form-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

.fluentform .frm-fluent-form .ff-el-form-check-input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
}
.fluentform .frm-fluent-form input[type="radio"].ff-el-form-check-input {
  border-radius: 50%;
}
.fluentform .frm-fluent-form .ff-el-form-check-input:checked {
  background: var(--red);
  border-color: var(--ink);
}
.fluentform .frm-fluent-form .ff-el-form-check-input:focus-visible {
  outline: none;
  box-shadow: 2px 2px 0 var(--ink);
}

/* --- Section breaks (the prototype's .form-section headings) ------------ */

.fluentform .frm-fluent-form .ff-el-section-break {
  border-top: 3px dashed var(--rule);
  padding-top: 24px;
  margin-top: 8px;
}
/* First section of a form: no divider above. (Fluent Forms numbers each
   section break's data-name in document order, so _1 is always the first;
   :first-child can't be used — the form starts with hidden/honeypot nodes.) */
.fluentform .frm-fluent-form .ff-el-section-break[data-name$="_1"] {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
/* We draw our own divider — hide Fluent Forms' <hr> inside the break */
.fluentform .frm-fluent-form .ff-el-section-break hr {
  display: none;
}

.fluentform .frm-fluent-form .ff-el-section-break .ff-el-section-title {
  font-family: 'Caprasimo', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.fluentform .frm-fluent-form .ff-el-section-title::before {
  content: '';
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--ink);
}
/* Colour rotation per section, like .form-section:nth-of-type in crayon.css */
.fluentform .frm-fluent-form .ff-el-section-break[data-name$="_2"] .ff-el-section-title::before { background: var(--orange); }
.fluentform .frm-fluent-form .ff-el-section-break[data-name$="_3"] .ff-el-section-title::before { background: var(--green); }
.fluentform .frm-fluent-form .ff-el-section-break[data-name$="_4"] .ff-el-section-title::before { background: var(--blue); }
.fluentform .frm-fluent-form .ff-el-section-break[data-name$="_5"] .ff-el-section-title::before { background: var(--purple); }

.fluentform .frm-fluent-form .ff-section_break_desk {
  font-size: 14px;
  color: rgba(26, 20, 16, 0.65);
  margin-top: 8px;
}
.fluentform .frm-fluent-form .ff-section_break_desk:empty {
  display: none;
}

/* --- Custom HTML blocks (in-form headings, intros, footnotes) ----------- */

.fluentform .frm-fluent-form .ff-custom_html h2,
.fluentform .frm-fluent-form .ff-custom_html h3,
.fluentform .frm-fluent-form .ff-custom_html h4 {
  font-family: 'Caprasimo', serif;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}
.fluentform .frm-fluent-form .ff-custom_html h2 { font-size: 26px; }
.fluentform .frm-fluent-form .ff-custom_html h3 { font-size: 22px; }
.fluentform .frm-fluent-form .ff-custom_html h4 { font-size: 17px; }

.fluentform .frm-fluent-form .ff-custom_html p {
  font-size: 14px;
  color: rgba(26, 20, 16, 0.65);
  margin: 8px 0 0;
}

/* Footnote under the fields (donate-goods, pet-food-claim) */
.fluentform .frm-fluent-form .rdr-footnote p {
  font-size: 12px;
  color: rgba(26, 20, 16, 0.6);
  text-align: center;
  margin: 0;
}

/* --- Custom checkbox treatments ----------------------------------------- */

/* Soft-blue consent/declaration card (adoption, volunteer) */
.fluentform .frm-fluent-form .rdr-consent-card .ff-el-form-check {
  background: var(--soft-blue);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 16px 18px;
}
.fluentform .frm-fluent-form .rdr-consent-card .ff-el-form-check label.ff-el-form-check-label {
  font-size: 14px;
}

/* Soft-yellow callout (donate-goods collection request) */
.fluentform .frm-fluent-form .rdr-callout-yellow .ff-el-form-check {
  background: var(--soft-yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
}
.fluentform .frm-fluent-form .rdr-callout-yellow .ff-el-form-check label.ff-el-form-check-label {
  font-size: 14px;
}

/* Full-width bordered option cards (adoption "applying to", volunteer roles) */
.fluentform .frm-fluent-form .rdr-option-cards .ff-el-form-check {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 14px 18px;
  transition: transform .1s, box-shadow .1s;
}
.fluentform .frm-fluent-form .rdr-option-cards .ff-el-form-check:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.fluentform .frm-fluent-form .rdr-option-cards .ff-el-form-check.ff_item_selected {
  background: var(--soft-green);
  box-shadow: 3px 3px 0 var(--ink);
}

/* Bordered pill rows (fundraising "what would help?") */
.fluentform .frm-fluent-form .rdr-option-pills .ff-el-form-check {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  transition: transform .1s, box-shadow .1s;
}
.fluentform .frm-fluent-form .rdr-option-pills .ff-el-form-check:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.fluentform .frm-fluent-form .rdr-option-pills .ff-el-form-check.ff_item_selected {
  background: var(--soft-green);
}

/* Plain inline checkbox (contact mailing list) */
.fluentform .frm-fluent-form .rdr-check-plain .ff-el-form-check label.ff-el-form-check-label {
  font-size: 14px;
}

/* --- Submit button: .btn.btn-red.btn-lg pill from crayon.css ------------- */

.fluentform .frm-fluent-form .ff-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 16px 28px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.fluentform .frm-fluent-form .ff-btn-submit:hover {
  background: var(--red);
  color: var(--paper);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.fluentform .frm-fluent-form .ff-btn-submit:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}
.fluentform .frm-fluent-form .ff-btn-submit:focus-visible {
  outline: none;
  box-shadow: 6px 6px 0 var(--ink);
  transform: translate(-2px, -2px);
}
.fluentform .frm-fluent-form .ff-btn-submit.disabled,
.fluentform .frm-fluent-form .ff-btn-submit[disabled] {
  opacity: .6;
  cursor: wait;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.fluentform .frm-fluent-form .ff_submit_btn_wrapper {
  padding-top: 8px;
  margin-bottom: 0;
}
/* Full-width variant (every form except contact) */
.fluentform .frm-fluent-form .rdr-submit-full .ff-btn-submit,
.fluentform .frm-fluent-form .ff_submit_btn_wrapper.rdr-submit-full .ff-btn-submit {
  width: 100%;
}

/* --- Errors (match .field-error conventions in crayon.css) --------------- */

.fluentform .error.text-danger {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}
.fluentform .frm-fluent-form .ff-el-is-error .ff-el-form-control {
  border-color: var(--red);
  background: var(--soft-red);
}
.fluentform .ff-errors-in-stack {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

/* --- Success / confirmation box (match .form-success in crayon.css) ------ */

.fluentform .ff-message-success {
  background: var(--green);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 4px 4px 0 var(--ink);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.fluentform .ff-message-success strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
  font-family: 'Caprasimo', serif;
  font-weight: 400;
}

/* --- Small screens --------------------------------------------------------- */

@media (max-width: 600px) {
  .fluentform {
    padding: 24px 18px;
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--ink);
  }
}
