/*******************************************************************************************
*   ___  _          ______                     _ _                _                        *
*  / _ \| |         | ___ \                   | (_)              | |              © 2025   *
* / /_\ | | _____  _| |_/ /_ __ __ _ _ __   __| |_ _ __   __ _   | |_ ___  __ _ _ __ ___   *
* |  _  | |/ _ \ \/ / ___ \ '__/ _` | '_ \ / _` | | '_ \ / _` |  | __/ _ \/ _` | '_ ` _ \  *
* | | | | |  __/>  <| |_/ / | | (_| | | | | (_| | | | | | (_| |  | ||  __/ (_| | | | | | | *
* \_| |_/_|\___/_/\_\____/|_|  \__,_|_| |_|\__,_|_|_| |_|\__, |  \___\___|\__,_|_| |_| |_| *
*                                                         __/ |                            *
*                                                        |___/                             *
* ---------------------------------------------------------------------------------------- *
* This is commercial software, only users who have purchased a valid license and accept    *
* to the terms of the License Agreement can install and use this program.                  *
* ---------------------------------------------------------------------------------------- *
* website: https://cs-cart.alexbranding.com                                                *
*   email: info@alexbranding.com                                                           *
*******************************************************************************************/

.ab__mb_item-name {
	word-break: break-word;
	font-size: var(--font-size-medium);
	font-weight: 600;
	line-height: 1;
	color: @mb_item_title_color;
	-webkit-transition: all 150ms;
	transition: all 150ms;

	&:hover {
		color: @mb_item_link_color;
	}
}
.ab__mb_item-title {
	position: relative;
	cursor: pointer;
	display: flex;
	align-items: center;
	padding-inline-start: var(--gap-sm);
	padding-inline-end: var(--gap-m);
	padding-block: var(--gap-sm);
	box-sizing: content-box;

	img + div {
		padding-left: var(--gap-xs);
	}
	.ty-pict {
		max-width: @mb_item_icon_size;
		max-height: @mb_item_icon_size;
	}
}
.ab__mb_item-icon {
	font-style: normal;
	margin-right: calc(var(--gap-sm) / 2);
	font-size: @mb_item_icon_size;
	color: @mb_item_icon_color;
}

.ab__mb_items {

	&.fill {
		&:not(.colored) {
			.ab__mb_item:not(:last-child) {
				margin-block-end: var(--gap-sm);
				border-bottom: 1px solid @base;
			}
		}
		&.colored {
			display: flex;
			flex-flow: column;
			gap: var(--gap-xs);

			.ab__mb_item {
				background-color: @mb-item-color;
				border-radius: var(--border-radius-box);
				overflow: hidden;
			}
		}

		.ab__mb_item-title {
			.ab__mb-cm-pl {
				display: contents;

				&:after {
					.ut2-icon();
					content: "\e908";
					font-size: 20px;
				}
			}
			&:hover .ab__mb-cm-pl:after {
				color: @mb_item_link_color;
			}
			&.open .ab__mb-cm-pl:after {
				transform: rotate(180deg);
			}
		}
	}
	&.framed {
		border-radius: var(--border-radius-box);
		overflow: hidden;

		&:not(.colored)  {
			border: 1px solid @base;

			.ab__mb_item:not(:last-child) {
				border-bottom: 1px solid @base;
			}
		}
		&.colored {

			&.lighten {
				border: 1px solid color-mix(in srgb, @mb-item-color 100%, rgba(0,0,0,1)10%);

				.ab__mb_item:not(:last-child) {
					border-bottom: 1px solid color-mix(in srgb, @mb-item-color 100%, rgba(0,0,0,1)10%)
				}
			}
			&.darken {
				border: 1px solid color-mix(in srgb, @mb-item-color 100%, rgba(255,255,255,1)30%);

				.ab__mb_item:not(:last-child) {
					border-bottom: 1px solid color-mix(in srgb, @mb-item-color 100%, rgba(255,255,255,1)30%)
				}
			}
		}

		.ab__mb_item-title {
			.ab__mb-cm-pl {
				.ut2_plus(12px, var(--ab-mb-items-color,@font));
				position: absolute !important;
				right: var(--gap-sm);
			}
			&.open {
				.ab__mb-cm-pl {
					.ut2_minus(12px, var(--ab-mb-items-color,@font));
				}
			}
		}
	}
	&.colored {
		.ab__mb_item {
			background-color: @mb-item-color;
		}
	}
}

.ut2-pb__right, .ut2-pb__second {
	.ab__mb_items {
		&.fill {
			&.colored {
				.ab__mb_item {
					border-radius: calc(~'var(--border-radius-box) - (var(--border-radius-box) / 3)');
				}
			}
		}
		&.framed {
			border-radius: calc(~'var(--border-radius-box) - (var(--border-radius-box) / 3)');
		}
	}
}

.ab__mb_items {
	&:not(.colored):not(.framed) {
		.ab__mb_item-title {
			padding-inline: 0;
			padding-block: 0 var(--gap-sm);
		}
		.ab__mb_item-description {
			padding-inline: 0;
		}
	}
}