/* SentientForms frontend — neutral base that inherits theme typography.
   Sites can override via their own CSS (NALA dark styling ships in its
   site-specific stylesheet). */

.sf-container { max-width: 100%; }
.sf-form .sf-field { margin: 0 0 18px; }
.sf-form .sf-label { display: block; font-weight: 600; margin-bottom: 6px; }
.sf-form .sf-required { color: #c0392b; }
.sf-form input[type=text], .sf-form input[type=email], .sf-form input[type=tel],
.sf-form input[type=url], .sf-form input[type=number], .sf-form input[type=date],
.sf-form select, .sf-form textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit;
  border: 1px solid #c8c8c8; border-radius: 4px; background: #fff; color: inherit;
}
.sf-form textarea { resize: vertical; }
.sf-form select { height: auto; min-height: 44px; line-height: 1.4; }
.sf-form .sf-desc { font-size: 0.85em; opacity: 0.75; margin-top: 4px; }
.sf-form .sf-error { color: #c0392b; font-size: 0.85em; margin-top: 4px; min-height: 0; }
.sf-form .sf-form-error { color: #c0392b; margin: 0 0 12px; }
.sf-form .sf-choices { display: flex; flex-direction: column; gap: 6px; }
.sf-form .sf-choice { display: flex; align-items: baseline; gap: 8px; font-weight: 400; cursor: pointer; }
.sf-form .sf-choice input { flex: none; }

/* Honeypot — visually removed, still in DOM for bots */
.sf-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* Two-column layout parity with imported WPForms classes */
.sf-form .wpforms-one-half, .sf-form .sf-one-half { width: 48%; float: left; margin-left: 4%; box-sizing: border-box; }
.sf-form .wpforms-one-half.wpforms-first, .sf-form .sf-one-half.sf-first { margin-left: 0; clear: both; }
.sf-form .sf-field:not(.wpforms-one-half):not(.sf-one-half) { clear: both; }
@media (max-width: 600px) {
  .sf-form .wpforms-one-half, .sf-form .sf-one-half { width: 100%; float: none; margin-left: 0; }
}

/* Uploader */
.sf-uploader input[type=file] { display: none; }
/* The dropzone is a <button> so it is keyboard-operable, which means themes
   style it as a button. NALA's gold button rule collapsed it to a 130px-wide
   solid block, so the properties that decide the layout are forced here. The
   rest stay overridable so a site can still restyle it. */
.sf-form button.sf-upload-dropzone,
.sf-upload-dropzone {
  -webkit-appearance: none !important; appearance: none !important;
  display: flex !important; flex-direction: column; gap: 6px;
  width: 100% !important; box-sizing: border-box;
  background: transparent !important; color: inherit !important;
  font: inherit !important; text-align: center !important;
  text-transform: none !important; letter-spacing: normal !important;
  border: 2px dashed #aaa !important; border-radius: 6px;
  padding: 28px 20px; min-height: 0; box-shadow: none !important;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.sf-upload-dropzone.sf-drag, .sf-upload-dropzone:hover { border-color: #666 !important; background: rgba(0,0,0,0.03) !important; }
.sf-upload-title { font-weight: 600; }
.sf-upload-hint { font-size: 0.8em; opacity: 0.7; }
.sf-upload-item { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 0.9em; }
.sf-upload-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-upload-progress { flex: 0 0 120px; height: 6px; background: rgba(0,0,0,0.12); border-radius: 3px; overflow: hidden; }
.sf-upload-bar { display: block; height: 100%; width: 0; background: #4a8f5c; transition: width .2s; }
.sf-upload-error .sf-upload-bar { background: #c0392b; }
.sf-upload-remove { flex: none; border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; opacity: .6; }
.sf-upload-remove:hover { opacity: 1; }

/* Submit */
.sf-submit { position: relative; cursor: pointer; padding: 12px 28px; font: inherit; font-weight: 600; border-radius: 4px; border: 0; }
.sf-submit[disabled] { opacity: 0.7; cursor: default; }
.sf-spinner { display: none; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: currentColor; border-radius: 50%;
  animation: sf-spin .7s linear infinite; }
.sf-loading .sf-spinner { display: inline-block; }
@keyframes sf-spin { to { transform: rotate(360deg); } }

.sf-confirmation { padding: 18px 20px; border-left: 4px solid #4a8f5c; background: rgba(74,143,92,0.08); }

/* ---------------------------------------------------------------- a11y */
/* Themes do not reliably ship .screen-reader-text; the required marker and
   rating labels depend on it, so define it here rather than hoping. */
.sf-form .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.sf-form .sf-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sf-form .sf-fieldset > legend { padding: 0; }
.sf-form .sf-field.sf-has-error input,
.sf-form .sf-field.sf-has-error select,
.sf-form .sf-field.sf-has-error textarea { border-color: #c0392b; }
.sf-form [aria-invalid="true"] { outline-color: #c0392b; }
.sf-form .sf-error:empty { display: none; }
.sf-confirmation:focus { outline: 2px solid currentColor; outline-offset: 2px; }

/* --------------------------------------------------------- multi-page */
.sf-progress { margin: 0 0 22px; }
.sf-progress-text { font-size: 0.85em; opacity: 0.75; margin: 0 0 8px; }
.sf-steps { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0 0 10px; padding: 0; }
.sf-step { display: flex; align-items: center; gap: 7px; font-size: 0.85em; opacity: 0.5; }
.sf-step-active, .sf-step-done { opacity: 1; }
.sf-step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; border: 1px solid currentColor; font-size: 0.8em; font-weight: 700; flex: none;
}
/* Emphasise the active step with a thicker ring. Filling the circle with
   currentColor and inverting the text does not work: the fill resolves from
   the element's own color, so making the text transparent makes the fill
   transparent too and the whole badge disappears. */
.sf-step-active .sf-step-num { box-shadow: inset 0 0 0 2px currentColor; }
.sf-step-done .sf-step-num::after { content: "\2713"; }
.sf-step-done .sf-step-num { font-size: 0; }
.sf-step-done .sf-step-num::after { font-size: 12px; }
.sf-progress-bar { height: 4px; background: rgba(0,0,0,0.10); border-radius: 2px; overflow: hidden; }
.sf-progress-fill { height: 100%; background: currentColor; transition: width .25s ease; }
.sf-page[hidden] { display: none; }
.sf-page-title { margin: 0 0 16px; }
.sf-page-nav { display: flex; gap: 10px; margin-top: 20px; clear: both; }
.sf-page-nav button {
  cursor: pointer; padding: 11px 24px; font: inherit; font-weight: 600;
  border-radius: 4px; border: 1px solid currentColor; background: transparent; color: inherit;
}
.sf-page-nav .sf-next { background: currentColor; }
.sf-submit-wrap[hidden] { display: none; }

/* ------------------------------------------------------------ new fields */
.sf-address { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sf-address-street, .sf-address-street2 { grid-column: 1 / -1; }
.sf-sublabel { display: block; font-size: 0.82em; opacity: 0.8; margin-bottom: 4px; font-weight: 400; }
@media (max-width: 600px) { .sf-address { grid-template-columns: 1fr; } }

/* Radios are emitted low-to-high so tab order and screen-reader order run
   1..N, which rules out the row-reverse star trick (it needs descending
   markup). A :has()-driven fill was tried and did not apply reliably in
   practice, so the frontend script owns the lit state instead: it toggles
   .sf-lit and this stays a plain class selector. */
.sf-rating { display: inline-flex; gap: 2px; }
.sf-rating-item { cursor: pointer; line-height: 1; }
.sf-rating-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.sf-rating-star { font-size: 30px; color: rgba(0,0,0,0.20); transition: color .12s; }
.sf-rating-item.sf-lit .sf-rating-star { color: #f0a500; }
.sf-rating-item input:focus-visible ~ .sf-rating-star { outline: 2px solid currentColor; outline-offset: 2px; }

.sf-consent { display: flex; align-items: baseline; gap: 9px; cursor: pointer; font-weight: 400; }
.sf-consent input { flex: none; margin-top: 2px; }
.sf-consent-text { font-size: 0.95em; }

.sf-field-divider { margin: 26px 0 18px; }
.sf-section-title { margin: 0 0 4px; }
.sf-section-desc { font-size: 0.9em; opacity: 0.8; margin-bottom: 10px; }
.sf-divider { border: 0; border-top: 1px solid rgba(0,0,0,0.14); margin: 0; }

.sf-field[hidden] { display: none; }
