/**
 * Checkout contrast fix for sale.order.ajax (.default2).
 *
 * Root cause: local/templates/dresscode/template_styles.css applies
 *   #main input { appearance: none; }
 * while .default2 renders native radios/checkboxes without a custom skin,
 * so person-type controls (ФЛ/ЮЛ) and other boxes become invisible.
 */

#bx-soa-order-form input[type="radio"],
#bx-soa-order-form input[type="checkbox"],
#bx-soa-order input[type="radio"],
#bx-soa-order input[type="checkbox"] {
	-webkit-appearance: auto !important;
	-moz-appearance: auto !important;
	appearance: auto !important;
	opacity: 1 !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 18px;
	margin: 0 10px 0 0 !important;
	padding: 0 !important;
	vertical-align: middle;
	accent-color: #1485ce;
	cursor: pointer;
	position: static !important;
	clip: auto !important;
	visibility: visible !important;
	box-shadow: none !important;
	background: initial !important;
	border: initial !important;
}

/* Keep payment-method checkbox overlayed on logo card */
#bx-soa-order input[type="checkbox"].bx-soa-pp-company-checkbox,
#bx-soa-order-form input[type="checkbox"].bx-soa-pp-company-checkbox {
	position: absolute !important;
	top: 7px !important;
	left: 7px !important;
	z-index: 100;
	margin: 0 !important;
}

/* Person type radios: compact stack (JS inserts <br> between options) */
#bx-soa-order .form-group > br,
#bx-soa-order-form .form-group > br {
	display: none;
}

#bx-soa-order .radio-inline,
#bx-soa-order-form .radio-inline {
	display: block;
	margin: 0 0 4px;
	line-height: 1.35;
}

#bx-soa-order .radio-inline + .radio-inline,
#bx-soa-order-form .radio-inline + .radio-inline {
	margin-top: 0;
	margin-bottom: 0;
}

#bx-soa-order .radio-inline label,
#bx-soa-order-form .radio-inline label,
#bx-soa-order .checkbox label,
#bx-soa-order-form .checkbox label {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 500;
	color: #1a1a1a;
	line-height: 1.45;
	margin: 0;
	padding: 2px 0;
}

#bx-soa-order .bx-soa-section {
	border-color: #c5cad1 !important;
	background: #fff;
}

#bx-soa-order .bx-soa-section.bx-selected {
	border-color: #7ab8d4 !important;
}

#bx-soa-order .bx-soa-section.bx-step-completed {
	border-color: #83CB1B !important;
}

#bx-soa-order .bx-soa-section-title-container {
	background: #eef2f5;
}

#bx-soa-order .bx-soa-section-title {
	color: #1a1a1a;
}

#bx-soa-order .form-control,
#bx-soa-order-form .form-control {
	background-color: #fff !important;
	border: 1px solid #aeb6bd !important;
	color: #222;
}

#bx-soa-order .form-control:focus,
#bx-soa-order-form .form-control:focus {
	border-color: #1485ce !important;
	outline: none;
	box-shadow: 0 0 0 2px rgba(20, 133, 206, 0.18);
}

#bx-soa-order .bx-sls .quick-location-tag,
#bx-soa-order .bx-slst .quick-location-tag {
	background: #c5e6ef !important;
	border: 1px solid #7fb9cb !important;
	color: #163943 !important;
	font-weight: 500;
}

#bx-soa-order .bx-sls .quick-location-tag:hover,
#bx-soa-order .bx-slst .quick-location-tag:hover {
	background: #aedceb !important;
}

#bx-soa-order .bx-soa-pp-company-graf-container {
	border-color: #aeb6bd;
}

#bx-soa-order .bx-soa-cart-total {
	border-color: #c5cad1 !important;
}

#bx-soa-order .bx-soa-coupon-block .form-control,
#bx-soa-order .bx-soa-coupon-input input[type="text"].form-control {
	background: #fff !important;
	border-color: #aeb6bd !important;
}


/* Person type compact v2 */
#bx-soa-order .form-group:has(> .radio-inline),
#bx-soa-order-form .form-group:has(> .radio-inline) {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	margin-bottom: 12px;
}

#bx-soa-order .form-group:has(> .radio-inline) > .bx-soa-custom-label,
#bx-soa-order-form .form-group:has(> .radio-inline) > .bx-soa-custom-label {
	margin-bottom: 4px;
	padding-bottom: 0;
}

#bx-soa-order .form-group:has(> .radio-inline) > br,
#bx-soa-order-form .form-group:has(> .radio-inline) > br {
	display: none !important;
	content: none !important;
	margin: 0 !important;
	height: 0 !important;
	line-height: 0 !important;
}

#bx-soa-order .form-group > .radio-inline,
#bx-soa-order-form .form-group > .radio-inline {
	display: flex;
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0;
	line-height: 1.25;
}

#bx-soa-order .form-group > .radio-inline > label,
#bx-soa-order-form .form-group > .radio-inline > label {
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1.25 !important;
	gap: 8px;
}

/* Stronger radio/checkbox chrome */
#bx-soa-order-form input[type="radio"],
#bx-soa-order input[type="radio"],
#bx-soa-order-form input[type="checkbox"],
#bx-soa-order input[type="checkbox"] {
	outline: 1px solid #5a6a75;
	outline-offset: 1px;
}
