/* ТЗ №3 (09.2026), этап 6: кнопки обращений юрлиц и модальное окно с четырьмя формами.
   Свои классы с префиксом b2b-, штатные классы Премьера не переопределяем.
   Подключается обработчиком FsB2BAssets только на /catalog/ сайта s1. */

/* ------- кнопки в карточке и в списке ------- */

.b2b-btns--detail {
	margin-top: 8px; /* как между «В корзину» и «Купить в 1 клик» */
}

/* в правой колонке карточки (широкий экран) родитель это grid с row-gap 24px,
   компенсируем, чтобы отступ до «Купить в 1 клик» остался 8px */
.grid-list.gap--24 > .b2b-btns--detail {
	margin-top: -16px;
}

.b2b-btns--detail .b2b-btn {
	display: block;
	width: 100%;
	margin-top: 8px;
}

.b2b-btns--list {
	margin-top: 8px;
}

.b2b-btns--list .b2b-btn {
	display: block;
	width: 100%;
}

.b2b-note {
	margin-top: 10px;
	line-height: 1.45;
}

@media (max-width: 600px) {
	.b2b-btns--list .b2b-btn,
	.b2b-btns--detail .b2b-btn {
		display: block;
		width: 100%;
		margin-top: 8px;
	}
}

/* ------- модальное окно ------- */

body.b2b-lock {
	overflow: hidden;
}

.b2b-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
	background: rgba(0, 0, 0, 0.55);
}

.b2b-modal {
	position: relative;
	width: 100%;
	max-width: 540px;
	margin: auto;
	padding: 28px 28px 24px;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
	color: #222;
	font-size: 15px;
	line-height: 1.45;
}

.b2b-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #888;
	font-size: 26px;
	line-height: 36px;
	text-align: center;
	cursor: pointer;
}

.b2b-close:hover {
	color: #222;
}

.b2b-title {
	margin: 0 30px 8px 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
}

.b2b-subtitle {
	margin-bottom: 18px;
	color: #666;
	font-size: 14px;
}

/* ------- поля ------- */

.b2b-field {
	margin-bottom: 14px;
}

.b2b-label {
	display: block;
	margin-bottom: 5px;
	color: #444;
	font-size: 13px;
}

.b2b-input,
.b2b-modal select.b2b-input,
.b2b-modal textarea.b2b-input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 3px;
	background: #fff;
	color: #222;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.35;
}

.b2b-modal textarea.b2b-input {
	resize: vertical;
}

.b2b-input:focus {
	border-color: #9a9a9a;
	outline: none;
}

.b2b-input[readonly] {
	background: #f5f5f5;
	color: #555;
}

.b2b-field--error .b2b-input {
	border-color: #d0342c;
}

.b2b-error {
	margin-top: 5px;
	color: #d0342c;
	font-size: 13px;
}

.b2b-hint {
	margin-top: 5px;
	color: #888;
	font-size: 13px;
}

/* количество */

.b2b-qty {
	display: flex;
	align-items: stretch;
	max-width: 160px;
}

.b2b-qty-btn {
	flex: 0 0 44px;
	width: 44px;
	min-height: 44px;
	padding: 0;
	border: 1px solid #d5d5d5;
	background: #f7f7f7;
	color: #333;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.b2b-qty-btn:first-child {
	border-radius: 3px 0 0 3px;
}

.b2b-qty-btn:last-child {
	border-radius: 0 3px 3px 0;
}

.b2b-qty .b2b-input {
	border-right: 0;
	border-left: 0;
	border-radius: 0;
	text-align: center;
}

/* файлы */

.b2b-file-btn {
	display: inline-block;
	min-height: 44px;
	padding: 11px 16px;
	border: 1px dashed #c2c2c2;
	border-radius: 3px;
	background: #fafafa;
	color: #333;
	font-size: 15px;
	cursor: pointer;
}

.b2b-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.b2b-file-list {
	margin-top: 8px;
}

.b2b-file-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}

.b2b-file-name {
	overflow: hidden;
	margin-right: 10px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.b2b-file-remove {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #999;
	font-size: 18px;
	line-height: 28px;
	cursor: pointer;
}

.b2b-file-remove:hover {
	color: #d0342c;
}

/* согласие */

.b2b-consent {
	display: flex;
	align-items: flex-start;
	margin-bottom: 14px;
	color: #555;
	font-size: 13px;
}

.b2b-consent input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 10px 0 0;
}

.b2b-consent a {
	text-decoration: underline;
}

/* ловушка: визуально убрана за экран, display none не используем */

.b2b-trap {
	position: absolute !important;
	top: -3000px;
	left: -3000px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* ------- кнопка отправки и служебные экраны ------- */

/* цвет, рамка и скругление от штатных классов btn btn-default (цвет темы), здесь только размер */
.b2b-submit {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	cursor: pointer;
}

.b2b-submit:disabled {
	opacity: .55;
	cursor: default;
}

.b2b-under {
	margin-top: 10px;
	color: #777;
	font-size: 13px;
}

.b2b-form-error {
	margin-top: 10px;
	color: #d0342c;
	font-size: 14px;
}

.b2b-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	vertical-align: -2px;
	animation: b2b-spin 0.8s linear infinite;
}

@keyframes b2b-spin {
	to {
		transform: rotate(360deg);
	}
}

.b2b-success {
	padding: 10px 0 4px;
	text-align: center;
}

.b2b-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: #e8f6ec;
	color: #2e9e4f;
	font-size: 30px;
	line-height: 56px;
}

.b2b-success-title {
	margin-bottom: 10px;
	font-size: 20px;
	font-weight: 600;
}

.b2b-success-text {
	margin-bottom: 20px;
	color: #555;
	font-size: 15px;
}

/* ------- телефон ------- */

@media (max-width: 767px) {
	.b2b-overlay {
		padding: 0;
	}

	.b2b-modal {
		max-width: none;
		min-height: 100%;
		margin: 0;
		padding: 22px 16px 24px;
		border-radius: 0;
	}

	.b2b-title {
		font-size: 20px;
	}
}
