/* ==================================================
   Sidebar Menu Styles
   Применяются к шаблону createSidebarMenu для бокового меню с категориями и подкатегориями.
   Совместимы с реализацией через createElement и createStructure с escapeAttr для имён атрибутов.
================================================== */

.sidebar-menu {
	width: 100%;
	background: #f0f0f0;
	align-self: stretch;
}

.sidebar-menu .category {
	text-align: left;
	padding-bottom: 0.1in;
}

.sidebar-menu .category-title, .sidebar-menu .subcategory-title {
	font-size: 0.2in;
	line-height: 0.3in;
	cursor: pointer;
	padding: 0.1in 0;
	display: flex;
	align-items: center;
	gap: 0.1in;
	position: relative;
	padding-left: 0.3in;
	transition: background-color ease 250ms;
}

.sidebar-menu .category-title {
	background-color: rgba(0, 0, 0, 0.1);
}

.sidebar-menu .subcategory-title {
	background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-menu .category-icon,
.sidebar-menu .subcategory-icon {
	width: 0.3in;
	height: 0.3in;
	margin-right: 0.1in;
}

.sidebar-menu .category-title:hover,
.sidebar-menu .subcategory-title:hover {
	background-color: rgba(0, 0, 0, 0.2);
}

/* ==================================================
   Grouped Table Styles
   Применяются к шаблонам createGroupedTable и createTableFooter для таблицы с группировкой строк.
   Совместимы с реализацией через createElement и createStructure с escapeAttr для имён атрибутов.
================================================== */

.grouped-table {
	width: 100%;
	border-collapse: collapse;
}

.grouped-table th {
	font-weight: normal;
	background-color: #f0f0f0;
}

.grouped-table td {
	vertical-align: middle;
	height: 0;
}

/* Стили для колонок таблицы */

.grouped-table .col-name {
	text-align: left;
	text-align-last: left;
}

.grouped-table .col-quantity {
	text-align: center;
	text-align-last: center;
	width: 0;
	text-wrap-mode: nowrap;
}

.grouped-table .col-quantity > div {
	text-wrap-mode: nowrap;
}

.grouped-table .col-price {
	width: 0;
	text-wrap-mode: nowrap;
}

.grouped-table .col-price,
.grouped-table .total-row .col-name,
.grouped-table .total-row .col-quantity {
	text-align: right;
	text-align-last: right;
}

.grouped-table .col-controls {
	text-align: right;
	width: 0;
}

.grouped-table td.col-name > div {
	background-color: white;
}

/* Стили для строк таблицы */

.grouped-table th.col-name,
.grouped-table .col-name > div,
.grouped-table .col-quantity > div {
	padding-left: 0.2in;
	padding-right: 0.2in;
}

.grouped-table .first td > div,
.grouped-table .total-row td {
	padding-top: 0.1in;
	margin-top: 0.05in;
}

.grouped-table .first .col-name > div {
	border-top-left-radius: 0.1in;
	border-top-right-radius: 0.1in;
}

.grouped-table .last td > div {
	padding-bottom: 0.1in;
	margin-bottom: 0.05in;
}

.grouped-table .last .col-name > div {
	border-bottom-left-radius: 0.1in;
	border-bottom-right-radius: 0.1in;
}

.grouped-table .sub-item {
	text-indent: 0.2in;
}

.grouped-table .item-single {
	font-weight: normal;
}

.grouped-table .col-controls > div {
	padding-left: 0.2in;
}

/* ==================================================
   Quantity Control Styles
   Применяются к шаблону createQuantityControl для управления количеством (+/-).
   Кнопки создаются через createIconButton с классом .icon-button.
   Совместимы с реализацией через createElement и createStructure с escapeAttr для имён атрибутов.
================================================== */

.grouped-table .controls-inner,
.quantity-control {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 0.1in;
}
	
.grouped-table .controls-inner {
	align-items: flex-end;
	justify-content: flex-end;
}

.quantity-control {
	align-items: center;
	justify-content: center;
}

/* ==================================================
   Icon Button Styles
   Применяются к шаблону createIconButton для символьных кнопок (например, редактирование, удаление, +,-).
   Совместимы с реализацией через createElement и createStructure с escapeAttr для имён атрибутов.
================================================== */

.icon-button {
	color: white;
	background: #007bff;
	border: none;
	border-radius: 0.05in;
	cursor: pointer;
	width: 0.3in;
	height: 0.3in;
	text-align: center;
	text-align-last: center;
}

.icon-button.red {
	background: #ff0000;
}

.icon-button .far {
	-webkit-text-stroke: unset;
	text-stroke: unset;
}
