/* Storefront checkout only: backend fields and stored contact data remain intact. */
html body #wa-order-form-wrapper #wa-step-auth-section .wa-field-wrapper:has([name="auth[data][bik]"]),
html body #wa-order-form-wrapper #wa-step-auth-section .wa-field-wrapper:has([name="auth[data][raschetnyy_schet]"]),
html body #wa-order-form-wrapper #wa-step-auth-section .wa-field-wrapper:has([name="auth[data][yur_adres]"]),
html body #wa-order-form-wrapper #wa-step-auth-section .wa-field-wrapper:has([name="auth[data][data_registratsii_yul]"]),
html body #wa-order-form-wrapper #wa-step-auth-section .wa-field-wrapper:has([name="auth[data][kpp]"]) { display:none !important; }

html body #wa-order-form-wrapper #wa-step-region-section input[name="region[city]"] {
  box-sizing:border-box !important; width:100% !important; max-width:none !important;
  background:#fff !important; border:1px solid #b9121b !important;
  border-radius:7px !important; box-shadow:none !important;
}
html body #wa-order-form-wrapper #wa-step-region-section input[name="region[city]"]:hover,
html body #wa-order-form-wrapper #wa-step-region-section input[name="region[city]"]:focus {
  border-color:#b9121b !important; background:#fff !important;
}
html body #wa-order-form-wrapper #wa-step-region-section input[name="region[city]"]:focus {
  outline:none; box-shadow:0 0 0 2px rgba(185,18,27,.1) !important;
}

/* Person: name and phone share a row; email occupies the full next row. */
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group,
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; column-gap:14px !important; width:100% !important; max-width:none !important; }
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper,
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper {
  grid-column:auto !important; flex:0 0 100% !important; width:100% !important;
  max-width:none !important; min-width:0 !important; box-sizing:border-box !important;
  float:none !important; margin-left:0 !important; margin-right:0 !important;
}
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea,select),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea,select) { width:100% !important; max-width:none !important; box-sizing:border-box !important; }

html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper:has([name^="auth[data][email]"]),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper:has([name^="auth[data][email]"]) {
  grid-column:1 / -1 !important;
}

/* Legacy .line clearfix pseudo-elements must not occupy grid cells. */
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group::before,
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group::after,
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group::before,
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group::after {
  content:none !important; display:none !important;
}
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper:has(:is([name="auth[data][fio]"],[name="auth[data][predstavitel]"],[name="auth[data][name]"],[name="auth[data][firstname]"])),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper:has(:is([name="auth[data][fio]"],[name="auth[data][predstavitel]"],[name="auth[data][name]"],[name="auth[data][firstname]"])) {
  grid-column:1 !important; grid-row:1 !important; align-self:start !important;
}
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper:has([name^="auth[data][phone]"]),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper:has([name^="auth[data][phone]"]) {
  grid-column:2 !important; grid-row:1 !important; align-self:start !important;
}
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper:has([name^="auth[data][email]"]),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper:has([name^="auth[data][email]"]) {
  grid-column:1 / -1 !important; grid-row:2 !important;
}
@media (max-width:575px) {
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group,
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group {
  grid-template-columns:minmax(0,1fr) !important;
}
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper:has([name^="auth[data][phone]"]),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper:has([name^="auth[data][phone]"]) {
  grid-column:1 !important; grid-row:2 !important;
}
html body #wa-order-form-wrapper #wa-step-auth-section.rw-checkout-person .wa-fields-group .wa-field-wrapper:has([name^="auth[data][email]"]),
html body #wa-order-form-wrapper #wa-step-auth-section:has(.js-type-toggle [data-id="person"].selected) .wa-fields-group .wa-field-wrapper:has([name^="auth[data][email]"]) {
  grid-row:3 !important;
}
}
