/* Banrox application flows: field states, step transition, loading.
   Palette and motion per 01-STANDART-KACHESTVA: blue #264BFF, lilac #8585E9,
   error #FF4242, warning #F89828, success #31A650; 300ms cubic-bezier(.2,.8,.2,1),
   75ms press, 400ms screen transition, reduced motion respected. */

.main_af .af_step { animation: bx-step-in 400ms cubic-bezier(.2, .8, .2, 1) both; }
.main_af .af_step:not(.active) { display: none; animation: none; }
@keyframes bx-step-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* six field states: normal, hover, focus, error, disabled, filled */
.main_af .form_field_inside input,
.main_af .form_field_inside textarea,
.main_af .form_select.choices {
  transition: border-color 300ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms cubic-bezier(.2, .8, .2, 1), background-color 300ms cubic-bezier(.2, .8, .2, 1);
}
.main_af .form_field_inside input:hover,
.main_af .form_field_inside textarea:hover,
.main_af .form_select.choices:hover { border-color: rgba(255, 255, 255, 0.5); }
.main_af .form_field_inside input:focus,
.main_af .form_field_inside textarea:focus,
.main_af .form_select.choices.is-focused,
.main_af .form_select.choices.is-open { border-color: #264BFF; box-shadow: 0 0 0 3px rgba(38, 75, 255, 0.25); outline: none; }
.main_af .form_field_inside input:disabled,
.main_af .form_field_inside textarea:disabled { opacity: 0.45; cursor: not-allowed; }
.main_af .form_field--error .form_field_inside input,
.main_af .form_field--error .form_field_inside textarea,
.main_af .form_field--error .form_select.choices { border-color: #FF4242; box-shadow: 0 0 0 3px rgba(255, 66, 66, 0.18); }
.main_af .form_field--error .form_field_label { color: #FF4242; }
.main_af .form_field_error[data-bx] { display: block; line-height: 130%; }
.main_af .form_field_checkbox.form_field--error .form_field_checkbox_icon { border-color: #FF4242; box-shadow: 0 0 0 3px rgba(255, 66, 66, 0.18); }

/* hint under a field: advice, not a refusal (income that looks monthly) */
.main_af .form_field_hint[data-bx-hint] { display: block; margin-top: 8px; font-size: 13px; line-height: 130%; letter-spacing: -0.02em; color: #F89828; }

/* "Use <address the provider found>" under a street the check could not place */
.main_af .bx-addr-fix {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 40px; padding: 0 14px;
  border: 1.5px solid rgba(38, 75, 255, 0.55); border-radius: 10px; background: rgba(38, 75, 255, 0.14); color: #fff;
  font: inherit; font-size: 14px; line-height: 130%; text-align: left; cursor: pointer;
  transition: background 300ms cubic-bezier(.2, .8, .2, 1), border-color 300ms cubic-bezier(.2, .8, .2, 1);
}
.main_af .bx-addr-fix::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: #264BFF; flex: 0 0 auto; }
.main_af .bx-addr-fix:hover { background: rgba(38, 75, 255, 0.26); border-color: #264BFF; }
.main_af .bx-addr-fix:active { transition-duration: 75ms; background: rgba(38, 75, 255, 0.34); }
.main_af .bx-addr-fix:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(38, 75, 255, 0.35); }

/* review step: a long value (business name, use of funds, an address) wraps inside its
   row instead of overflowing the card; the label keeps its width and stays on top */
.main_af .af_step_result { height: auto; min-height: 48px; padding-top: 12px; padding-bottom: 12px; align-items: flex-start; flex-wrap: wrap; line-height: 130%; }
.main_af .af_step_result > span { flex: 1 1 60%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.main_af .af_step_result > span:empty::before { content: '-'; }

/* "Other" industry description */
.main_af [data-bx-industry-other] { transition: opacity 300ms cubic-bezier(.2, .8, .2, 1); }
.main_af [data-bx-industry-other][hidden] { display: none; }

/* buttons: press and loading */
.main_af .btn { transition: transform 75ms ease-out, opacity 300ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms cubic-bezier(.2, .8, .2, 1); }
.main_af .btn:active { transform: scale(0.98); }
.main_af .btn.is-loading,
.main_af .btn[aria-busy="true"],
.main_af .pf-verify-btn.is-loading { position: relative; pointer-events: none; opacity: 0.75; }
.main_af .btn.is-loading .btn_txt,
.main_af .btn[aria-busy="true"] .btn_txt { visibility: hidden; }
.main_af .btn.is-loading::after,
.main_af .btn[aria-busy="true"]::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 999px;
  animation: bx-spin 700ms linear infinite;
}
@keyframes bx-spin { to { transform: rotate(360deg); } }

/* progress lines: current step and everything before it */
.main_af .af_step_lines { gap: 12px; }
.main_af .af_step_line { transition: background 400ms cubic-bezier(.2, .8, .2, 1); }

/* server notice above the form */
.main_af .bx-notice { margin-bottom: 20px; padding: 16px 20px; border: 1.5px solid #F89828; border-radius: 12px; color: #F89828; font-size: 14px; line-height: 140%; }
.main_af .bx-notice a { color: #fff; text-decoration: underline; }

/* optional labels */
.main_af .form_field_label em { font-style: normal; color: rgba(255, 255, 255, 0.5); }

/* decision page: estimate skeleton */
.main_af .bx-skeleton { display: inline-block; height: 1em; width: 6em; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.18), rgba(255,255,255,.08)); background-size: 200% 100%; animation: bx-shimmer 1.2s linear infinite; }
@keyframes bx-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* lender rows on the decision page */
.main_af .af_step_partner_txt__muted { color: rgba(255, 255, 255, 0.5); }
.main_af .af_step_partner_txt__green { color: #31A650; }

/* "Other lenders worth comparing": each lender is a card (16px radius, hairline,
   the site's inset highlight), with the lender's mark where the marketplace has one
   that renders, the product under it, three figures, one button. A near match keeps
   its note as a tab under the card instead of a floating line. */
.main_af .af_step_partner {
  border-radius: 16px; border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 4px 20px rgba(255, 255, 255, 0.04);
  padding: 22px 24px; gap: 24px; flex-wrap: wrap;
  transition: transform 300ms cubic-bezier(.2, .8, .2, 1), border-color 300ms cubic-bezier(.2, .8, .2, 1), background-color 300ms cubic-bezier(.2, .8, .2, 1);
}
.main_af .af_step_partner:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); }
.main_af .af_step_partner--near { border-radius: 16px 16px 0 0; margin-bottom: 0; }
.main_af .af_step_partner_note {
  margin: 0 0 16px; padding: 10px 24px 12px; border: 1.5px solid rgba(255, 255, 255, 0.08); border-top: 0;
  border-radius: 0 0 16px 16px; background: rgba(248, 152, 40, 0.06); color: rgba(255, 255, 255, 0.6);
  font-size: 13px; line-height: 130%; letter-spacing: -0.01em;
}
.main_af .af_step_partner_col { gap: 8px; }
.main_af .af_step_partner_col--brand { flex: 1 1 200px; min-width: 160px; }
.main_af .af_step_partner_brand { height: 28px; display: flex; align-items: center; overflow: hidden; }
.main_af .af_step_partner_logo { display: block; height: 28px; width: auto; max-width: 150px; object-fit: contain; object-position: left center; }
.main_af .lm_logo--light { opacity: .95; }
.main_af .lm_logo--mono { filter: invert(1) grayscale(1) brightness(1.7); mix-blend-mode: screen; }
.main_af .af_step_partner_txt__small { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.main_af .af_step_partner_col--brand .af_step_partner_txt__small { text-transform: none; letter-spacing: 0.01em; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.main_af .af_step_partner_txt__big { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.main_af .af_step_partner_btn .btn { height: 44px; padding: 0 22px; border-radius: 12px; }
@media (max-width: 767px) {
  .main_af .af_step_partner { padding: 18px 16px; gap: 14px; }
  .main_af .af_step_partner_col--brand { flex: 1 1 100%; }
  .main_af .af_step_partner_btn .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .main_af .af_step_partner { transition: none; } .main_af .af_step_partner:hover { transform: none; } }

@media (max-width: 767px) {
  .main_af .form_field_inside input,
  .main_af .form_field_inside textarea { font-size: 16px; }              /* no iOS zoom on focus */
  .main_af .af_step_action .btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .main_af .af_step { animation: none; }
  .main_af .btn, .main_af .form_field_inside input, .main_af .form_field_inside textarea, .main_af .form_select.choices, .main_af .af_step_line { transition: none; }
  .main_af .btn.is-loading::after, .main_af .bx-skeleton { animation: none; }
}

/* 402 / 390: every radio and checkbox row is a 44px touch target (01-STANDART-KACHESTVA) */
@media (max-width: 767px) {
  form[data-bx-apply] .form_field_radio,
  form[data-bx-apply] .form_field_checkbox { min-height: 44px; display: flex; align-items: center; }
  form[data-bx-apply] .form_field_inside--radios { row-gap: 0; }
  form[data-bx-apply] .af_step_file { flex-wrap: wrap; row-gap: 12px; }
  form[data-bx-apply] .af_step_file_right { width: 100%; }
  form[data-bx-apply] .af_step_file_input--dropzone { min-height: 44px; }
}

/* address suggestions under the street field (rows come from the server; no key, no box) */
.main_af .bx-ac-host { position: relative; }
.main_af .bx-ac {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  padding: 6px; border: 1.5px solid rgba(255, 255, 255, 0.10); border-radius: 12px;
  background: #090C21; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: bx-ac-in 300ms cubic-bezier(.2, .8, .2, 1);
}
@keyframes bx-ac-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .main_af .bx-ac { animation: none; } }
.main_af .bx-ac__item {
  display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 0; border-radius: 8px; background: transparent; color: #fff; text-align: left; cursor: pointer;
  font: inherit; transition: background 300ms cubic-bezier(.2, .8, .2, 1);
}
.main_af .bx-ac__item:hover, .main_af .bx-ac__item.is-active { background: rgba(38, 75, 255, 0.22); }
.main_af .bx-ac__item:active { background: rgba(38, 75, 255, 0.34); transition-duration: 75ms; }
.main_af .bx-ac__main { font-size: 15px; line-height: 130%; }
.main_af .bx-ac__sub { font-size: 13px; line-height: 130%; color: rgba(255, 255, 255, 0.55); }
