/* 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); }

/* "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; }

@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); }
