/* Тендерная заявка «Отправить закупку на расчёт» (/tenders/). Модалка всегда тёмная, как остальные формы сайта. */
.tender-modal .modal-dialog {
	max-width: 760px;
}

.tender-modal .modal-dialog:not(.modal-fullscreen) .modal-content {
	max-width: 760px;
	max-height: calc(100vh - 3.5rem);
	max-height: calc(100dvh - 3.5rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	color: #fff;
}

.tender-form__eyebrow {
	margin-bottom: 8px;
	padding-right: 40px;
	font-size: 12px;
	line-height: 16px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #9a9a9a;
}

.tender-modal .h3 {
	padding-right: 40px;
}

.tender-form__lead {
	margin: 8px 0 24px;
	font-size: 14px;
	line-height: 20px;
	color: #bdbdbd;
}

.tender-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.tender-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 16px;
}

.tender-field {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.tender-field__label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 6px;
	padding: 0;
	font-size: 13px;
	line-height: 16px;
	color: #9a9a9a;
}

.tender-field__req {
	color: #ff1531;
}

.tender-field__input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	font: inherit;
	font-size: 15px;
	line-height: 22px;
	color: #fff;
	background: #2a2a2a;
	border: 1px solid #3a3a3a;
	border-radius: 0;
	outline: none;
	color-scheme: dark;
	transition: border-color .15s;
}

.tender-field__input::placeholder {
	color: #6f6f6f;
}

.tender-field__input:focus {
	border-color: #8a8a8a;
}

.tender-field__textarea {
	min-height: 72px;
	resize: vertical;
}

.tender-field_invalid .tender-field__input,
.tender-field_invalid .tender-segment,
.tender-field_invalid .tender-drop {
	border-color: #ff1531;
}

.tender-field__error {
	margin-top: 4px;
	font-size: 12px;
	line-height: 16px;
	color: #ff4d61;
}

.tender-field__error:empty {
	display: none;
}

/* Переключатели: тип закупки, что нужно */
.tender-segment {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid #3a3a3a;
}

.tender-segment_wide {
	grid-template-columns: repeat(3, 1fr);
}

.tender-segment__item {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.tender-segment__item + .tender-segment__item {
	border-left: 1px solid #3a3a3a;
}

.tender-segment__item input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tender-segment__item span {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 48px;
	padding: 8px;
	font-size: 14px;
	line-height: 18px;
	text-align: center;
	color: #fff;
	background: #1d1d1d;
	transition: background-color .15s, color .15s;
}

.tender-segment__item:hover span {
	background: #2a2a2a;
}

.tender-segment__item input:checked + span {
	color: #111;
	background: #f2f2f2;
}

.tender-segment__item input:focus-visible + span {
	outline: 2px solid #ff1531;
	outline-offset: -2px;
}

/* Загрузка документов */
.tender-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 20px 16px;
	text-align: center;
	cursor: pointer;
	background: #232619;
	border: 1px dashed #6b6f4a;
	transition: background-color .15s, border-color .15s;
}

.tender-drop:hover,
.tender-drop_over {
	background: #2b2f1d;
	border-color: #b6bb7a;
}

.tender-drop:focus-within {
	outline: 2px solid #ff1531;
	outline-offset: 2px;
}

.tender-drop__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.tender-drop__title {
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	color: #fff;
}

.tender-drop__title .fi {
	margin-right: 4px;
	vertical-align: -2px;
}

.tender-drop__link {
	display: block;
	font-weight: 400;
	text-decoration: underline;
	color: #d8dbb0;
}

.tender-drop__hint {
	font-size: 12px;
	line-height: 16px;
	color: #9a9a9a;
}

.tender-files {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.tender-files:empty {
	display: none;
}

.tender-files__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0 8px 12px;
	font-size: 13px;
	line-height: 18px;
	border-bottom: 1px solid #2f2f2f;
}

.tender-files__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #fff;
}

.tender-files__size {
	flex-shrink: 0;
	color: #9a9a9a;
}

.tender-files__item_rejected .tender-files__name {
	text-decoration: line-through;
	color: #9a9a9a;
}

.tender-files__item_rejected .tender-files__size {
	color: #ff4d61;
}

.tender-files__remove {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: #9a9a9a;
	background: none;
	border: 0;
	cursor: pointer;
}

.tender-files__remove:hover {
	color: #fff;
}

/* Согласие: свой чекбокс, стандартный сайта в светлой теме даёт тёмную ссылку на тёмном фоне */
.tender-check {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	cursor: pointer;
}

.tender-check__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.tender-check__box {
	position: relative;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	background: #2a2a2a;
	border: 1px solid #6f6f6f;
	transition: background-color .15s, border-color .15s;
}

.tender-check__input:checked + .tender-check__box {
	background: #ff1531;
	border-color: #ff1531;
}

.tender-check__input:checked + .tender-check__box::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2px;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.tender-check__input:focus-visible + .tender-check__box {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.tender-field_invalid .tender-check__box {
	border-color: #ff1531;
}

.tender-check__text {
	font-size: 14px;
	line-height: 22px;
	color: #fff;
}

.tender-check__text a {
	color: #ff1531;
	text-decoration: underline;
}

.tender-check__text a:hover {
	color: #ff4d61;
}

.tender-form__message {
	padding: 8px 16px;
	font-size: 14px;
	line-height: 20px;
	color: #ff4d61;
	border: 1px solid #ff1531;
}

.tender-form__submit {
	width: 100%;
}

.tender-form__submit:disabled {
	opacity: .7;
	cursor: progress;
}

/* Подтверждение */
.tender-success {
	outline: none;
}

.tender-success .h3 {
	margin-bottom: 16px;
}

.tender-success__text {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 22px;
	color: #d6d6d6;
}

.tender-success__files {
	margin: 0 0 16px;
	padding-left: 20px;
	font-size: 14px;
	line-height: 22px;
	color: #fff;
	word-break: break-word;
}

.tender-success__warning {
	margin: 0 0 16px;
	padding: 8px 16px;
	font-size: 14px;
	line-height: 20px;
	color: #ffd27a;
	border: 1px solid #8a6d2f;
}

.tender-success .btn {
	margin-top: 12px;
}

@media (max-width: 767.98px) {
	.tender-modal .modal-dialog:not(.modal-fullscreen) .modal-content {
		max-height: none;
	}

	.tender-form__row {
		grid-template-columns: 1fr;
	}

	.tender-segment {
		grid-template-columns: repeat(2, 1fr);
	}

	.tender-segment__item + .tender-segment__item {
		border-left: 0;
	}

	.tender-segment__item:nth-child(even) {
		border-left: 1px solid #3a3a3a;
	}

	.tender-segment__item:nth-child(n+3) {
		border-top: 1px solid #3a3a3a;
	}

	.tender-segment_wide {
		grid-template-columns: 1fr;
	}

	.tender-segment_wide .tender-segment__item:nth-child(even) {
		border-left: 0;
	}

	.tender-segment_wide .tender-segment__item + .tender-segment__item {
		border-top: 1px solid #3a3a3a;
	}

	.tender-field__input {
		font-size: 16px; /* без автозума на iOS */
	}
}
