/* Запасные стили для браузеров примерно до 2021 года (ориентир - браузеры 2018 года: Chrome 64+, Firefox 58+, Safari 11.1+).
   Подключается последним. В современных браузерах блоки ниже не срабатывают.

   Условие @supports not (inset: 0): нужно определить браузеры без gap у flex (Chrome 84, Safari 14.1, Firefox 63), но проверить
   это напрямую нельзя: @supports (gap: 0) истинно из-за грида. inset появился в них почти одновременно с gap (Chrome 87, Safari 14.1, Firefox 66) */

@supports not (inset: 0) {
	/* Базовые правила root.css на :where() */
	input, select, textarea, button { font-family: inherit; color: inherit; }

	/* Отступы вместо gap у flex: ряд - слева, колонка - сверху, с переносом - справа и снизу */
	.footer_groups > * { margin-right: 32px; margin-bottom: 8px; }
	.console .active span > * + * { margin-left: 5px; }
	.console.expand .report > * + * { margin-top: 8px; }
	.console .node ul li > * + * { margin-left: 8px; }
	.labels_ready_head > * + * { margin-left: 12px; }
	.complex_table.labels_ready .labels_ready_head .table_controls > * + * { margin-left: 6px; }
	.info_toggle > * + * { margin-left: 4px; }
	.auth_note > * + * { margin-left: 8px; }
	.trigger_buttons > * + * { margin-left: 4px; }
	.trigger_action_switch > * { margin-right: 6px; margin-bottom: 6px; }
	.trigger_fields_links > * { margin-right: 8px; margin-bottom: 8px; }
	.collapsed_box[style*="display: block"] > * { margin-right: 6px; margin-bottom: 6px; }
	.complex_table .table_controls > * + * { margin-left: 6px; }
	.complex_table .btn-small-action > a > * + * { margin-left: 6px; }
	.complex_table .btn-small-glyph > * + * { margin-left: 6px; }
	.complex_table .dropdown-menu > a > * + * { margin-left: 8px; }
	.complex_table .dropdown-menu > li > a > * + * { margin-left: 8px; }
	[data-pagination] > * { margin-right: 2px; margin-bottom: 2px; }
	[data-pagination] .page_more_list > * + * { margin-top: 1px; }
	.complex_table .filter > * { margin-right: 6px; margin-bottom: 6px; }
	.complex_table .filter a > * + * { margin-left: 6px; }
	.complex_table .table_navigation:not(.sborka_navigation) > * { margin-right: 12px; margin-bottom: 12px; }
	.table_params > * { margin-right: 20px; margin-bottom: 12px; }
	.table_period_toggle > * + * { margin-left: 8px; }
	.table_dropdown_toggle > * + * { margin-left: 8px; }
	.table_period_menu.show > * + * { margin-left: 12px; }
	#notifications > * + * { margin-top: 8px; }
	#notifications .notification > * + * { margin-left: 10px; }
	#app_tip .app_tip_row > * + * { margin-left: 10px; }
	.service_menu > ul > * { margin-right: 4px; margin-bottom: 4px; }
	.service_menu .activate-tab > * + * { margin-left: 8px; }
	.user_menu_copy > * + * { margin-left: 6px; }
	.user_menu_logout > * + * { margin-left: 8px; }
	.menu.horizontal > li > * + * { margin-left: 8px; }
	.menu_wrapper > * { margin-right: 8px; margin-bottom: 8px; }
	.panel_toggle > * + * { margin-left: 8px; }
	.mp_instruction > * + * { margin-top: 16px; }
	.video_card > * + * { margin-left: 16px; }
	.video_card_text > * + * { margin-top: 4px; }
	.mp_step > * + * { margin-left: 16px; }
	.mp_service > * + * { margin-top: 8px; }
	.mp_service_title > * + * { margin-left: 8px; }
	.node_settings > * + * { margin-top: 16px; }
	.node_settings_head > * + * { margin-left: 12px; }
	.field_with_action > * + * { margin-left: 8px; }
	.section_cards > * + * { margin-top: 16px; }
	.section_settings > * + * { margin-top: 16px; }
	.section_head > * + * { margin-left: 12px; }
	.section_actions > * { margin-right: 8px; margin-bottom: 8px; }
	.time_select > * + * { margin-left: 6px; }
	.store_rows > * + * { margin-top: 8px; }
	.store_days > * { margin-right: 10px; margin-bottom: 2px; }
	.status_field > * + * { margin-top: 6px; }
	a.video_link > * + * { margin-left: 14px; }
	.video_link_text > * + * { margin-top: 2px; }
	.video_link_go > * + * { margin-left: 6px; }
	.section_cards .complex_table > .table_controls > * + * { margin-left: 6px; }
	.accounts_tab > * + * { margin-top: 16px; }
	.accounts_toolbar > * { margin-right: 20px; margin-bottom: 12px; }
	.cheze_token > * + * { margin-top: 6px; }
	.user_head > * + * { margin-left: 12px; }
	.account_settings > * + * { margin-top: 16px; }
	.pay_switch > * { margin-right: 4px; margin-bottom: 4px; }
	#pay_supercalculator .mplace_options h4 > * + * { margin-left: 8px; }
	#pay_supercalculator .mplace_box.pay_options > * + * { margin-top: 4px; }
	#pay_supercalculator .mplace_box.pay_summ > * { margin-right: 8px; margin-bottom: 8px; }
	#pay_buttons .final > * + * { margin-left: 12px; }
	.pay_buttons_row > * { margin-right: 8px; margin-bottom: 8px; }
	.tlgrm_layout > * { margin-right: 20px; margin-bottom: 20px; }
	.tlgrm_bots > * + * { margin-top: 16px; }
	.sborka_instruction > * + * { margin-top: 16px; }
	.sborka_instruction .si_notice > * + * { margin-left: 12px; }
	.sborka_instruction .si_step > * + * { margin-left: 16px; }
	.sborka_instruction .si_done > * + * { margin-left: 8px; }
	.sborka_instruction .si_downloads > * { margin-right: 12px; margin-bottom: 8px; }
	.sborka_instruction .si_downloads .btn > * + * { margin-left: 8px; }
	#picking_orders .picking_batches > * { margin-right: 4px; margin-bottom: 4px; }
	#picking_orders .picking_batches a > * + * { margin-left: 8px; }
	#picking_orders .sborka_navigation > * + * { margin-top: 14px; }
	#picking_orders .settings_for_picking:not(.hidden) > * + * { margin-top: 14px; }
	.sborka_filter_row > * { margin-right: 6px; margin-bottom: 6px; }
	.sborka_brick > * + * { margin-left: 6px; }
	.sborka_status_brick.tbl-state > * + * { margin-left: 6px; }
	.sborka_ctrl_btn:not(.hidden) > * + * { margin-left: 8px; }
	.sborka_nodes_picker:not(.hidden) > * + * { margin-top: 12px; }
	.nodes_for_sborka_title > * + * { margin-left: 8px; }
	.sborka_search_row > * + * { margin-left: 12px; }
	.picking_scan_label_hint:not(.hidden) > * + * { margin-left: 10px; }
	#settings_for_picking_by_batch_id:not(.hidden) > * + * { margin-left: 16px; }
	.picking_label_modes:not(.hidden) > * + * { margin-left: 3px; }
	.address_picking_slot > * + * { margin-left: 6px; }
	.sborka_picker_bar > * + * { margin-left: 12px; }
	.sborka_settings > * + * { margin-top: 16px; }
	.sborka_settings .count_labels > * + * { margin-left: 12px; }
	.custom_select_trigger > * + * { margin-left: 8px; }
	.custom_select_multiple .custom_select_option > * + * { margin-left: 8px; }
}

/* Соотношение сторон: видео и обложка */
@supports not (aspect-ratio: 1 / 1) {
	#modal.youtube iframe { height: 400px !important; }
	.video_card_cover { height: 108px; }
}

/* Контейнерный запрос параметров таблицы (components.css) заменяем шириной экрана */
@supports not (container-type: inline-size) {
	@media (max-width: 991.98px) {
		.table_params > .table_param { flex-basis: 100%; }
	}
}

/* Кнопка выбора файла: ::file-selector-button - с Chrome 89, Safari 14.1 */
.form-control[type="file"]::-webkit-file-upload-button {
	background-color: var(--secondary);
	color: var(--secondary-foreground);
}
