@import '@/uni_modules/lime-style/index.scss';

$divider-color: create-var(divider-color, $gray-3) !default;
$divider-text-color: create-var(divider-text-color, $text-color-3) !default;
$divider-font-size: create-var(divider-font-size, 12px) !default;
$divider-line-height: create-var(divider-line-height, 20px) !default;
$divider-line-style: create-var(divider-line-style, solid);
$divider-margin: create-var(divider-margin, 10px);

.l-divider {
	display: flex;
	color: $divider-text-color;
	border-color: $divider-color;
	border-style: $divider-line-style;
	border-width: 0;
	/* #ifdef APP-NVUE */
	&__before,
	&__after,
	/* #endif */
	/* #ifndef APP-NVUE */
	&::before,
	&::after
	/* #endif */
	{
		content: '';
		display: block;
		flex: 1;
		box-sizing: border-box;
		border: inherit;
		border-color: inherit;
		border-style: inherit;
	}

	&--horizontal {
		align-items: center;
		margin-top: $divider-margin;
		margin-bottom: $divider-margin;
		/* #ifdef APP-NVUE */
		.l-divider__before,
		.l-divider__after,
		/* #endif */
		/* #ifndef APP-NVUE */
		&::before,
		&::after 
		/* #endif */
		{
			border-top-width: 1px;
			transform: scaleY(0.5);
		}

		.l-divider__content:not(:empty) {
			margin: 0 24rpx;
		}
	}

	&--vertical {
		flex-direction: column;
		height: 1em;
		margin: 0 $divider-margin;
		/* #ifdef APP-NVUE */
		.l-divider__before,
		.l-divider__after,
		/* #endif */
		/* #ifndef APP-NVUE */
		&::before,
		&::after 
		/* #endif */
		{
			border-left-width: 1px;
			transform: scaleX(0.5);
		}

		&-center {
			align-items: center;
			height: 100%;
		}
	}

	&--dashed {
		border-style: dashed;
	}

	&__content {
		font-size: $divider-font-size;
		line-height: $divider-line-height;
		color: $divider-text-color;
	}

	&--left::before,
	&--right::after {
		max-width: 60rpx;
	}
}