/*******************************************************************************************
*   ___  _          ______                     _ _                _                        *
*  / _ \| |         | ___ \                   | (_)              | |              © 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-horizontal-tabs-wrap {
	flex-wrap: wrap;

	.ty-tabs {
		margin: 0 0 var(--gap-s);

		.ut2-scroll-left, .ut2-scroll-right {
			> span {
				background: var(--ab-mb-bg-color,@content_bg);

				.darken & {
					&:before {
						color: white;
					}
				}
			}
		}
		.ut2-scroll-left {
			left: -4px;

			> span {
				&:after {
					background: linear-gradient(to left, rgba(0,0,0,0), var(--ab-mb-bg-color,@content_bg));
				}
			}
		}
		.ut2-scroll-right {
			right: -4px;

			> span {
				&:after {
					background: linear-gradient(to right, rgba(0,0,0,0), var(--ab-mb-bg-color,@content_bg));
				}
			}
		}
	}

	.ab-mb-horizontal-tabs.ty-tabs__list {
		.darken & {
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type1) {
				&:before  {
					background: color-mix(in srgb, var(--ab-mb-bg-color,@content_bg) 100%, white 30%);
				}
			}
			.ut2_style_tabs();
		}
	}
}
.ab-mb-horizontal-content {
	width: 100%;
}
.ab-mb-horizontal__item {
	&:not(.active) {
		display: none;
	}
}
.ab-mb-horizontal__item-tab.ty-tabs__item {
	&:not(.active) {
		.darken & {
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type1) {
				&:hover:before {
					background: fade(white, 70%);
				}
			}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type2) {}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type3) {}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type4) {}
			.ut2_style_tabs();
		}
	}
	&.active {
		.lighten & {
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type2) {
				background: @content_bg;
				box-shadow: inset 0 0 0 1px @base10;
			}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type3) {
				background: @content_bg;
			}
			.ut2_style_tabs();
		}
		.darken & {
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type1) {
				&:before {
					background: @content_bg;
				}
			}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type2) {
				background: transparent;
				box-shadow: inset 0 0 0 1px white;
			}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type3) {
				background: color-mix(in srgb, var(--ab-mb-bg-color) 100%, white 20%);
			}
			.ut2_style_tabs() when (@abt__ut2_general_style_tabs = type4) {}
			.ut2_style_tabs();
		}
	}
}
.ab-mb-horizontal__title-tab.ty-tabs__span {
	span {
		display: flex;
		align-items: center;
		width: max-content;
		gap: var(--gap-xxs);

		.lighten & {
			color: @font;
		}
		.darken & {
			color: white;
		}

		.ty-tabs__item:not(.active) & {
			.lighten & {
				color: var(--color-font-lighten);
			}
			.darken & {
				color: fade(white, 70%);
			}
		}

		i {
			font-size: 18px;

			.ty-tabs__item:not(.active) & {
				.lighten & {
					color: currentColor !important;
				}
				.darken & {
					color: fade(white, 70%) !important;
				}
			}
			.ty-tabs__item.active & {
				.lighten & {

				}
				.darken & {
					color: white !important;
				}
			}
		}
		img {
			max-height: calc(~'var(--min-height-button) / 1.75');
			width: auto;
		}
	}
}
.ab__mb_items {

	&.framed, &.colored {
		padding: var(--gap-sm);
		border-radius: var(--border-radius-box);

		.ab__mb_item-description {
			padding: 0;
		}
	}
	&.framed {
		&: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%)
				}
			}
		}
	}
	&.colored {
		background-color: @mb-item-color;

		.ty-tabs__list {
			background: none;
		}
	}
}

