/**
 * Таблица портала остатков: шрифт и отступы ячеек.
 */
.mod-warum-stock-portal .warum-stock-search__input {
	max-width: 28rem;
}

.mod-warum-stock-portal .warum-stock-cur-switcher {
	padding: 0.15rem;
	border: 1px solid var(--bs-border-color, #adb5bd);
	border-radius: 0.375rem;
	background: var(--bs-body-bg, #fff);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.mod-warum-stock-portal .warum-stock-cur-switcher > .btn {
	border-radius: 0.25rem !important;
}

.mod-warum-stock-portal .warum-stock-cur-switcher > .btn + .btn {
	margin-left: 0.15rem;
}

/* Как в stock_api_client_guide: на мобильных — прокрутка, колонки не сжимаются в «кашу» */
.mod-warum-stock-portal .warum-stock-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

.mod-warum-stock-portal .warum-stock-table-wrap .table.warum-stock-table {
	width: max-content;
	min-width: 100%;
	table-layout: auto;
}

@media (min-width: 768px) {
	.mod-warum-stock-portal .warum-stock-table-wrap {
		overflow-x: visible;
	}

	.mod-warum-stock-portal .warum-stock-table-wrap .table.warum-stock-table {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}
}

.mod-warum-stock-portal .table.warum-stock-table {
	font-size: 0.9em;
}

.mod-warum-stock-portal .table.warum-stock-table thead th {
	text-align: left;
}

.mod-warum-stock-portal .table.warum-stock-table > :not(caption) > * > * {
	padding: 0.1rem 0.2rem;
}

.mod-warum-stock-portal .table.table-sm.table-bordered > :not(caption) > * > *,
.mod-warum-stock-portal .table.table-bordered td,
.mod-warum-stock-portal .table.table-bordered th {
	font-size: 0.8rem !important;
	padding: 0.1rem 0.2rem !important;
}

.mod-warum-stock-portal .table.warum-stock-table > thead > * > * {
	vertical-align: middle;
}

.mod-warum-stock-portal .table.warum-stock-table > tbody > * > * {
	vertical-align: middle;
}

/* Колонка 1 — ID. Колонка 3 — артикул производителя (часть ширины отдана в 1). */
.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(1),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(1) {
	width: 4.4%;
	max-width: 3.575rem;
	min-width: 0;
	padding-left: 0.08rem;
	padding-right: 0.12rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(2),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(2) {
	max-width: 8.6rem;
	width: 10.3%;
	min-width: 0;
	line-height: 1.25;
	word-break: break-word;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(3),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(3) {
	max-width: 9.675rem;
	width: 11.1%;
	line-height: 1.2;
	word-break: break-word;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(4),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(4) {
	max-width: 14rem;
	width: 18%;
	min-width: 0;
	line-height: 1.25;
	word-break: break-word;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(5),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(5) {
	max-width: 7.8rem;
	width: 8.5%;
	min-width: 0;
	line-height: 1.25;
	word-break: break-word;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(6),
.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(7),
.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(8) {
	width: 2%;
	min-width: 4.25rem;
	max-width: none;
	line-height: 1.2;
	white-space: normal;
	word-break: break-word;
	hyphens: auto;
}

.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(6),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(7),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(8) {
	width: 2%;
	min-width: 4.25rem;
	max-width: none;
	padding-left: 0.45rem;
	padding-right: 0.45rem;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(9),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(9) {
	min-width: 6.75rem;
	max-width: 9.5rem;
	width: 6%;
	white-space: nowrap;
}

.mod-warum-stock-portal .table.warum-stock-table thead th:nth-child(10),
.mod-warum-stock-portal .table.warum-stock-table tbody td:nth-child(10) {
	width: 8.1%;
	max-width: 8.7rem;
	min-width: 0;
	line-height: 1.25;
	word-break: break-word;
}

.mod-warum-stock-portal .warum-stock-th-category__stack {
	display: block;
	line-height: 1.25;
}

.mod-warum-stock-portal .warum-stock-th-category__title {
	font-weight: inherit;
}

.mod-warum-stock-portal .warum-stock-cat-modal-open {
	display: inline-block;
	font-size: inherit;
	line-height: 1.25;
	font-weight: 400;
	font-style: normal;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.1em;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	vertical-align: baseline;
}

.mod-warum-stock-portal .warum-stock-cat-modal-open:hover,
.mod-warum-stock-portal .warum-stock-cat-modal-open:focus {
	color: inherit;
	opacity: 0.85;
	text-decoration: underline;
}

/**
 * Модальное окно фильтра: выше слоёв конструктора страниц и затемнения по умолчанию.
 * Класс на backdrop вешается скриптом при открытии.
 */
body .modal-backdrop.warum-stock-cat-modal-backdrop {
	z-index: 100090 !important;
}

body .modal.warum-stock-cat-modal {
	z-index: 100100 !important;
}

body .modal.warum-stock-cat-modal .modal-dialog {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

body .modal-backdrop.warum-stock-editor-modal-backdrop {
	z-index: 100090 !important;
}

body .modal.warum-stock-editor-modal {
	z-index: 100100 !important;
}

body .modal.warum-stock-editor-modal .modal-dialog {
	position: relative;
	z-index: 1;
	pointer-events: auto;
}

body .warum-stock-editor-modal .modal-content {
	min-height: 100vh;
	font-size: 0.75rem;
}

body .warum-stock-editor-modal .modal-body {
	padding-bottom: 2rem;
}

body .warum-stock-editor-modal .modal-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: flex-end;
	gap: 0.5rem;
}

body .warum-stock-editor-modal .modal-footer .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 2.25rem;
	min-height: 2.25rem;
	padding: 0 0.9rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	border-width: 1px;
	white-space: nowrap;
	min-width: 7.75rem;
}

body .warum-stock-editor-modal .warum-stock-editor-panel,
body .warum-stock-editor-modal .warum-stock-settings-panel,
body .warum-stock-editor-modal .warum-individual-margins-panel {
	display: none;
}

body .warum-stock-editor-modal .warum-stock-editor-panel-wrap.is-open .warum-stock-editor-panel,
body .warum-stock-editor-modal .warum-stock-editor-panel-wrap.is-open .warum-stock-settings-panel,
body .warum-stock-editor-modal .warum-stock-editor-panel-wrap.is-open .warum-individual-margins-panel {
	display: block;
}

body .warum-stock-editor-modal .warum-stock-editor-panel-wrap {
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.375rem;
	padding: 1rem;
	background: var(--bs-light, #f8f9fa);
}

body .warum-stock-editor-modal .warum-stock-settings-toggle,
body .warum-stock-editor-modal .warum-individual-margins-expand,
body .warum-stock-editor-modal .btn.btn-outline-secondary {
	color: #34495e;
	border: 1px solid #7f94ab !important;
	background-color: #fff;
	font-weight: 500;
	box-shadow: inset 0 0 0 1px rgba(127, 148, 171, 0.08);
}

body .warum-stock-editor-modal .warum-stock-settings-toggle:hover,
body .warum-stock-editor-modal .warum-stock-settings-toggle:focus,
body .warum-stock-editor-modal .warum-stock-settings-toggle:active,
body .warum-stock-editor-modal .warum-individual-margins-expand:hover,
body .warum-stock-editor-modal .warum-individual-margins-expand:focus,
body .warum-stock-editor-modal .warum-individual-margins-expand:active,
body .warum-stock-editor-modal .btn.btn-outline-secondary:hover,
body .warum-stock-editor-modal .btn.btn-outline-secondary:focus,
body .warum-stock-editor-modal .btn.btn-outline-secondary:active {
	color: #212529;
	border: 1px solid #5f748b !important;
	background-color: #eef3f8;
}

body .warum-stock-editor-modal .warum-stock-settings-wrap,
body .warum-stock-editor-modal .warum-individual-margins-wrap,
body .warum-stock-editor-modal .warum-sku-rules-wrap {
	max-width: none;
}

body .warum-stock-editor-modal .warum-category-markup-table-wrap,
body .warum-stock-editor-modal .warum-individual-margins-wrap .table-responsive {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

body .warum-stock-editor-modal .warum-category-markup-table,
body .warum-stock-editor-modal .warum-stock-editor-cat-table {
	display: inline-table;
	width: max-content;
	min-width: 0;
	max-width: none;
	table-layout: auto;
}

body .warum-stock-editor-modal .warum-category-markup-table th:first-child,
body .warum-stock-editor-modal .warum-category-markup-table td:first-child,
body .warum-stock-editor-modal .warum-stock-editor-cat-table th:first-child,
body .warum-stock-editor-modal .warum-stock-editor-cat-table td:first-child {
	width: auto;
	white-space: nowrap;
}

body .warum-stock-editor-modal .warum-category-markup-table th:nth-child(2),
body .warum-stock-editor-modal .warum-category-markup-table td:nth-child(2),
body .warum-stock-editor-modal .warum-category-markup-table th:nth-child(3),
body .warum-stock-editor-modal .warum-category-markup-table td:nth-child(3),
body .warum-stock-editor-modal .warum-stock-editor-cat-table th:nth-child(2),
body .warum-stock-editor-modal .warum-stock-editor-cat-table td:nth-child(2),
body .warum-stock-editor-modal .warum-stock-editor-cat-table th:nth-child(3),
body .warum-stock-editor-modal .warum-stock-editor-cat-table td:nth-child(3) {
	width: 1%;
	white-space: nowrap;
}

body .warum-stock-editor-modal .table {
	font-size: 0.75rem;
}

body .warum-stock-editor-modal .table > :not(caption) > * > * {
	color: var(--body-color);
	font-size: 0.75rem;
	vertical-align: top;
}

body .warum-stock-editor-modal .warum-stock-editor-cat-table .form-control,
body .warum-stock-editor-modal .warum-stock-editor-margins-table .form-control,
body .warum-stock-editor-modal .warum-stock-editor-cat-bulk,
body .warum-stock-editor-modal .warum-stock-editor-markup-all,
body .warum-stock-editor-modal .warum-sku-rule-input {
	min-width: 0;
}

body .warum-stock-editor-modal .warum-stock-editor-col-compact,
body .warum-stock-editor-modal .warum-stock-editor-cell-compact {
	width: 1%;
	white-space: nowrap;
}

body .warum-stock-editor-modal .warum-stock-editor-col-price {
	width: 1%;
	min-width: 11rem;
	white-space: nowrap;
}

body .warum-stock-editor-modal .warum-stock-editor-col-money {
	width: 1%;
	min-width: 7rem;
	white-space: nowrap;
}

body .warum-stock-editor-modal .warum-stock-editor-th-label {
	display: block;
	white-space: normal !important;
	overflow-wrap: normal;
	word-break: normal;
	line-height: 1.2;
}

body .warum-stock-editor-modal .warum-stock-editor-markup-head,
body .warum-stock-editor-modal .warum-stock-editor-price-head {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.35rem;
}

body .warum-stock-editor-modal .warum-stock-editor-price-head label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
}

body .warum-stock-editor-modal .warum-stock-editor-price-input {
	width: 12ch;
	min-width: 12ch;
	max-width: 12ch;
}

body .warum-stock-editor-modal .warum-stock-editor-cat-table thead th {
	font-size: 0.75rem;
}

body .warum-stock-editor-modal .form-text,
body .warum-stock-editor-modal .small,
body .warum-stock-editor-modal .btn-sm,
body .warum-stock-editor-modal .form-control-sm {
	font-size: 0.75rem;
}

body .warum-stock-editor-modal .warum-stock-editor-mini-btn,
body .warum-stock-editor-modal .warum-stock-editor-sku-rule-add {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	min-width: 1.65rem;
	min-height: 1.65rem;
	padding: 0.1rem 0.35rem;
	line-height: 1;
	border-radius: 0.2rem;
	vertical-align: middle;
}

body .warum-stock-editor-modal .warum-stock-editor-margins-table th {
	white-space: normal;
	word-break: break-word;
}

body .warum-stock-editor-modal .warum-stock-editor-margins-table td {
	vertical-align: top;
}

body .warum-stock-editor-modal .warum-sku-rule-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

body .warum-stock-editor-modal .warum-stock-editor-global-rules-box {
	background: #f8f9fa;
}

body .warum-stock-editor-modal .warum-stock-editor-margins-table input[type=number],
body .warum-stock-editor-modal .warum-stock-editor-cat-table input[type=number],
body .warum-stock-editor-modal .warum-stock-editor-cat-bulk,
body .warum-stock-editor-modal .warum-stock-editor-markup-all {
	-moz-appearance: textfield;
	appearance: textfield;
}

body .warum-stock-editor-modal .warum-stock-editor-margins-table input[type=number]::-webkit-outer-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-margins-table input[type=number]::-webkit-inner-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-cat-table input[type=number]::-webkit-outer-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-cat-table input[type=number]::-webkit-inner-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-cat-bulk::-webkit-outer-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-cat-bulk::-webkit-inner-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-markup-all::-webkit-outer-spin-button,
body .warum-stock-editor-modal .warum-stock-editor-markup-all::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
