/* ================================================
   APPLICATION FORM — STYLES
   Extends plant-fusion.css
   ================================================ */

.pf-form-section { background: var(--pf-light); }

/* ---------- FORM SHELL ---------- */
.pf-form {
  max-width: 920px;
  margin: 0 auto;
  background: var(--pf-white);
  padding: 48px;
  box-shadow: var(--pf-shadow);
  border-top: 4px solid var(--pf-orange);
}

.pf-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- FIELDSET ---------- */
.pf-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 40px;
  position: relative;
}
.pf-fieldset[hidden] { display: none; }

.pf-legend {
  font-family: var(--pf-font-h);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--pf-dark);
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--pf-orange);
  width: 100%;
}

.pf-field-help {
  font-size: 0.85rem;
  color: var(--pf-grey);
  margin: -16px 0 24px;
  line-height: 1.7;
}
.pf-field-help a { color: var(--pf-orange); text-decoration: underline; }

/* ---------- GRID LAYOUTS ---------- */
.pf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.pf-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.5fr;
  gap: 16px;
}

/* ---------- FIELDS ---------- */
.pf-field { display: flex; flex-direction: column; }
.pf-field-narrow { max-width: 280px; margin-bottom: 20px; }
@media (max-width: 768px) { .pf-field-narrow { max-width: 100%; } }
.pf-field label {
  font-family: var(--pf-font-h);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-dark);
  margin-bottom: 8px;
}
.pf-field-optional {
  font-weight: 500;
  color: var(--pf-grey);
  text-transform: none;
  letter-spacing: 0.3px;
  font-size: 0.7rem;
}

.pf-field input,
.pf-field textarea,
.pf-field select {
  font-family: var(--pf-font-b);
  font-size: 0.95rem;
  color: var(--pf-text);
  background: var(--pf-white);
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-field textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.pf-field input:focus,
.pf-field textarea:focus,
.pf-field select:focus {
  outline: none;
  border-color: var(--pf-orange);
  box-shadow: 0 0 0 3px rgba(253,129,10,0.18);
}
.pf-field input.invalid,
.pf-field textarea.invalid,
.pf-field select.invalid {
  border-color: #d93636;
  box-shadow: 0 0 0 3px rgba(217,54,54,0.12);
}
.pf-field-error {
  display: block;
  font-size: 0.78rem;
  color: #d93636;
  margin-top: 6px;
  font-family: var(--pf-font-b);
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

/* ---------- ACCOUNT TYPE RADIO CARDS ---------- */
.pf-radio-group-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pf-radio-group-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .pf-radio-group-3col { grid-template-columns: 1fr; } }
.pf-radio-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
  background: var(--pf-light);
  border: 2px solid #e0e0e0;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.pf-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pf-radio-card:hover { border-color: var(--pf-orange); background: var(--pf-white); }
.pf-radio-card:has(input:checked) {
  border-color: var(--pf-orange);
  background: var(--pf-white);
  box-shadow: 0 4px 14px rgba(253,129,10,0.12);
}
.pf-radio-card-title {
  font-family: var(--pf-font-h);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pf-dark);
}
.pf-radio-card-desc {
  font-size: 0.85rem;
  color: var(--pf-grey);
  line-height: 1.55;
}

/* ---------- TRADE REFERENCE BLOCK ---------- */
.pf-trade-refs-expand { padding: 16px 0 4px; }
.pf-trade-refs-expand[hidden] { display: none; }
.pf-ref-block {
  background: var(--pf-light);
  padding: 24px;
  margin-bottom: 16px;
  border-left: 3px solid var(--pf-orange);
}
.pf-ref-block:last-child { margin-bottom: 0; }
.pf-ref-heading {
  font-family: var(--pf-font-h);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-dark);
  margin-bottom: 16px;
}

/* ---------- YES/NO ROW ---------- */
.pf-yesno-row {
  display: grid;
  grid-template-columns: 1fr auto 1.4fr;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}
.pf-yesno-row:last-child { border-bottom: none; }
.pf-yesno-row--no-divider { border-bottom: none; }
.pf-yesno-row--top-divider { border-top: 1px solid #eee; }
.pf-yesno-label {
  font-family: var(--pf-font-h);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pf-dark);
  letter-spacing: 0.3px;
  text-transform: none;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
}
.pf-yesno-text { flex: 1 1 auto; min-width: 0; }
.pf-yesno-required {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--pf-orange);
  font-weight: 700;
}
.pf-yesno-controls { display: flex; gap: 8px; }
.pf-radio-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 18px;
  background: var(--pf-light);
  border: 1.5px solid #d8d8d8;
  border-radius: 2px;
  font-family: var(--pf-font-h);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pf-grey);
  cursor: pointer;
  transition: all 0.12s;
}
.pf-radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.pf-radio-pill:has(input:checked) {
  background: var(--pf-orange);
  border-color: var(--pf-orange);
  color: var(--pf-white);
}
.pf-radio-pill:hover { border-color: var(--pf-orange); }
.pf-yesno-row.invalid .pf-radio-pill {
  border-color: #d93636;
  box-shadow: 0 0 0 3px rgba(217,54,54,0.12);
}

.pf-yesno-extra { display: flex; flex-direction: column; }
.pf-yesno-extra label {
  font-family: var(--pf-font-h);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pf-grey);
  margin-bottom: 4px;
}
.pf-yesno-extra input {
  font-family: var(--pf-font-b);
  font-size: 0.92rem;
  color: var(--pf-text);
  background: var(--pf-white);
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  padding: 9px 12px;
  width: 100%;
}
.pf-yesno-extra input:focus {
  outline: none;
  border-color: var(--pf-orange);
  box-shadow: 0 0 0 3px rgba(253,129,10,0.18);
}
.pf-yesno-extra[hidden] { display: none; }
.pf-yesno-extra-label-2 { margin-top: 12px; }
.pf-file-input {
  font-family: var(--pf-font-b);
  font-size: 0.9rem;
  color: var(--pf-text);
  background: var(--pf-white);
  border: 1px dashed #c8c8c8;
  border-radius: 2px;
  padding: 10px 12px;
  width: 100%;
  cursor: pointer;
}
.pf-file-input::file-selector-button {
  font-family: var(--pf-font-h);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-white);
  background: var(--pf-orange);
  border: none;
  border-radius: 2px;
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.pf-file-input::file-selector-button:hover { background: var(--pf-orange-dark); }
.pf-file-input:focus {
  outline: none;
  border-color: var(--pf-orange);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(253,129,10,0.18);
}
.pf-file-input.invalid {
  border-color: #d93636;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(217,54,54,0.12);
}

/* ---------- SIGNATURE PAD ---------- */
.pf-signature-field { margin-top: 24px; margin-bottom: 0; }
.pf-signature-hint {
  font-size: 0.78rem;
  color: var(--pf-grey);
  margin: -2px 0 10px;
  font-family: var(--pf-font-b);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}
.pf-signature-wrap {
  position: relative;
  background: #fff;
  border: 1px dashed #c8c8c8;
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-signature-wrap.has-signature { border-style: solid; border-color: #d0d0d0; }
.pf-signature-wrap.invalid {
  border-color: #d93636;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(217,54,54,0.12);
}
.pf-signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  touch-action: none;
  background: transparent;
}
.pf-signature-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--pf-font-h);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #c8c8c8;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.15s;
}
.pf-signature-wrap.has-signature .pf-signature-placeholder { opacity: 0; }
.pf-signature-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.pf-signature-clear {
  background: none;
  border: none;
  font-family: var(--pf-font-h);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-grey);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}
.pf-signature-clear:hover { color: var(--pf-orange); }
.pf-signature-clear:focus-visible { outline: 2px solid var(--pf-orange); outline-offset: 2px; }

/* ---------- INFO NOTICE (e.g. insurance 17.5%) ---------- */
.pf-info-notice {
  margin-top: 12px;
  padding: 14px 16px;
  background: #fff7ed;
  border-left: 3px solid var(--pf-orange);
  font-family: var(--pf-font-b);
  font-size: 0.88rem;
  color: var(--pf-text);
  line-height: 1.6;
}
.pf-info-notice[hidden] { display: none; }
.pf-info-notice strong { color: var(--pf-dark); }

/* ---------- PG PROMPT ---------- */
.pf-pg-prompt {
  margin: 18px 0 4px;
  padding: 16px 18px;
  background: #fff7ed;
  border-left: 3px solid var(--pf-orange);
}
.pf-pg-prompt[hidden] { display: none; }
.pf-pg-prompt-text {
  font-family: var(--pf-font-b);
  font-size: 0.9rem;
  color: var(--pf-text);
  line-height: 1.6;
  margin: 0 0 12px;
}
.pf-pg-prompt-text strong { color: var(--pf-dark); }
.pf-pg-prompt-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--pf-font-b);
  font-size: 0.88rem;
  color: var(--pf-text);
  line-height: 1.55;
  cursor: pointer;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  margin: 0;
}
.pf-pg-prompt-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--pf-orange);
  cursor: pointer;
  flex-shrink: 0;
}
.pf-pg-prompt.invalid {
  background: #fdecea;
  border-left-color: #d93636;
}

/* ---------- LIVE CREDIT CHECK PANEL ---------- */
.pf-credit-check {
  margin: 28px 0 20px;
  padding: 18px 22px;
  background: var(--pf-light);
  border-left: 3px solid var(--pf-dark);
  transition: border-color 0.2s, background 0.2s;
}
.pf-credit-check-heading {
  font-family: var(--pf-font-h);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--pf-dark);
  margin: 0 0 10px;
}
.pf-credit-check-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pf-credit-check-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--pf-text);
  line-height: 1.65;
}
.pf-credit-check-text strong { color: var(--pf-dark); font-weight: 700; }
.pf-credit-check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-top: 2px;
  background: #c8c8c8;
  position: relative;
}
.pf-credit-check-body[data-state="checking"] .pf-credit-check-icon {
  background: var(--pf-orange);
  animation: pf-pulse 1.2s ease-in-out infinite;
}
.pf-credit-check-body[data-state="success"] {}
.pf-credit-check-body[data-state="success"] .pf-credit-check-icon {
  background: #2e7d32;
}
.pf-credit-check-body[data-state="success"] .pf-credit-check-icon::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-credit-check-body[data-state="warning"] .pf-credit-check-icon {
  background: #c08515;
}
.pf-credit-check-body[data-state="warning"] .pf-credit-check-icon::after {
  content: '!';
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-credit-check-body[data-state="error"] .pf-credit-check-icon {
  background: #d93636;
}
.pf-credit-check-body[data-state="error"] .pf-credit-check-icon::after {
  content: '\00d7';
  position: absolute;
  inset: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-credit-check[data-active-state="success"] {
  border-left-color: #2e7d32;
  background: #e8f5e9;
}
.pf-credit-check[data-active-state="warning"] {
  border-left-color: #c08515;
  background: #fff8e1;
}
.pf-credit-check[data-active-state="error"] {
  border-left-color: #d93636;
  background: #fdecea;
}
@keyframes pf-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* ---------- CHECKBOX ---------- */
.pf-checkbox-field { margin-top: 28px; }
.pf-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  background: var(--pf-light);
  border-left: 3px solid var(--pf-orange);
}
.pf-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--pf-orange);
  cursor: pointer;
}
.pf-checkbox span {
  font-family: var(--pf-font-b);
  font-size: 0.88rem;
  color: var(--pf-text);
  line-height: 1.6;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.pf-checkbox:has(input.invalid) {
  border-left-color: #d93636;
  background: #fdecea;
  box-shadow: 0 0 0 3px rgba(217,54,54,0.12);
}

/* ---------- SUBMIT ---------- */
.pf-form-footer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #eee;
  text-align: center;
}
.pf-btn-submit {
  position: relative;
  font-size: 0.85rem;
  padding: 18px 48px;
  border: none;
  min-width: 240px;
}
.pf-btn-submit[disabled] { opacity: 0.6; cursor: not-allowed; }
.pf-btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 12px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--pf-white);
  border-radius: 50%;
  animation: pf-spin 0.8s linear infinite;
  vertical-align: middle;
}
.pf-btn-submit.loading .pf-btn-spinner { display: inline-block; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

.pf-form-note {
  font-size: 0.85rem;
  color: var(--pf-grey);
  margin-top: 16px;
}

/* ---------- FORM MESSAGE ---------- */
.pf-form-message {
  margin-top: 24px;
  padding: 18px 22px;
  border-radius: 2px;
  font-family: var(--pf-font-b);
  font-size: 0.95rem;
  line-height: 1.6;
}
.pf-form-message.success {
  background: #e8f5e9;
  color: #1b5e20;
  border-left: 4px solid #2e7d32;
}
.pf-form-message.error {
  background: #fdecea;
  color: #8b1c1c;
  border-left: 4px solid #d93636;
}

/* ---------- TERMS ---------- */
.pf-terms {
  max-width: 920px;
  margin: 32px auto 0;
  padding: 24px 32px;
  background: var(--pf-white);
  border-left: 3px solid var(--pf-dark);
}
.pf-terms-heading {
  font-family: var(--pf-font-h);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-dark);
  margin-bottom: 12px;
}
.pf-terms-details summary {
  cursor: pointer;
  font-family: var(--pf-font-h);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--pf-orange);
  padding: 6px 0;
  list-style: none;
}
.pf-terms-details summary::-webkit-details-marker { display: none; }
.pf-terms-details summary::before { content: '+ '; }
.pf-terms-details[open] summary::before { content: '− '; }
.pf-terms-details summary:hover { color: var(--pf-orange-dark); }
.pf-terms-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eee;
}
.pf-terms-body p {
  font-size: 0.83rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 12px;
}
.pf-terms-body strong { color: var(--pf-dark); }

.pf-terms-intro {
  font-size: 0.85rem;
  color: var(--pf-grey);
  margin: 0 0 18px;
  line-height: 1.7;
}
.pf-terms-doc {
  background: var(--pf-light);
  padding: 18px 22px;
  margin-top: 12px;
  border-left: 3px solid var(--pf-orange);
}
.pf-terms-doc[hidden] { display: none; }
.pf-terms-doc-name {
  font-family: var(--pf-font-h);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pf-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.pf-terms-doc-desc {
  font-size: 0.84rem;
  color: var(--pf-grey);
  line-height: 1.7;
  margin-bottom: 12px;
}
.pf-terms-link {
  display: inline-block;
  font-family: var(--pf-font-h);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-orange);
  padding: 8px 0;
  border-bottom: 2px solid var(--pf-orange);
  transition: color 0.15s, border-color 0.15s;
}
.pf-terms-link::before { content: '\2192  '; }
.pf-terms-link:hover { color: var(--pf-orange-dark); border-color: var(--pf-orange-dark); }

[data-hire-section][hidden] { display: none !important; }
[data-hire-doc][hidden] { display: none !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .pf-form { padding: 28px 22px; }
  .pf-grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .pf-grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .pf-radio-group-cards { grid-template-columns: 1fr; }
  .pf-yesno-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }
  .pf-yesno-controls { justify-content: flex-start; }
  .pf-terms { padding: 20px; }
}
