@import "../common/mixin.scss";
@import "../common/utils.scss";

@include b(time-panel) {
	margin: 5px 0;
	border-radius: 2px;
	position: absolute;
	width: 180px;
	left: 0;
	z-index: $--index-top;
	user-select: none;
	box-sizing: content-box;
	color: $--color-text-primary;
	box-shadow: $--box-shadow-convex;
	background-color: $--color-background;
	@include e(content) {
		font-size: 0;
		position: relative;
		overflow: hidden;

		&::after,
		&::before {
			content: "";
			top: 50%;
			position: absolute;
			margin-top: -14px;
			height: 32px;
			z-index: -1;
			left: 0;
			right: 0;
			box-sizing: border-box;
			padding-top: 6px;
			text-align: left;
			border-top: 1px solid rgba($--color-text-disabled, 0.38);
			border-bottom: 1px solid rgba($--color-text-disabled, 0.38);
		}

		&::after {
			left: 50%;
			margin-left: 12%;
			margin-right: 12%;
		}

		&::before {
			padding-left: 50%;
			margin-right: 12%;
			margin-left: 12%;
		}

		&.has-seconds {
			&::after {
				left: calc(100% / 3 * 2);
			}

			&::before {
				padding-left: calc(100% / 3);
			}
		}

		@include when(arrow) {
			&::after,
			&::before {
				margin-top: -15px;
			}
		}
	}

	@include e(footer) {
		border-top: 1px solid rgba($--color-text-disabled, 0.38);
		padding: 4px;
		height: 36px;
		line-height: 25px;
		text-align: right;
		box-sizing: border-box;
	}

	@include e(btn) {
		margin-left: 8px;
	}
}
