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

@include b(time-spinner) {
	&.has-seconds {
		.tu-time-spinner__wrapper {
			width: 33.3%;
		}
	}

	@include e(wrapper) {
		max-height: 190px;
		display: inline-block;
		width: 50%;
		vertical-align: top;
		position: relative;

		& .tu-scrollbar__wrap:not(.tu-scrollbar__wrap--hidden-default) {
			padding-bottom: 15px;
		}

		@include when(arrow) {
			box-sizing: border-box;
			text-align: center;
			overflow: hidden;

			.tu-time-spinner__list {
				transform: translateY(-32px);
			}

			.tu-time-spinner__item:hover:not(.disabled):not(.active) {
				background: $--color-hover-background;
				cursor: default;
			}
		}
	}

	@include e(arrow) {
		font-size: 12px;
		position: absolute;
		left: 0;
		width: 100%;
		z-index: $--index-normal;
		text-align: center;
		height: 30px;
		line-height: 30px;
		color: $--color-text-disabled;
		cursor: pointer;
		transition: all 0.3s;

		&:hover {
			color: $--color-primary;
		}

		&.tu-icon-up {
			top: 10px;
		}

		&.tu-icon-down {
			bottom: 10px;
		}
	}

	@include e(input) {
		&.tu-input {
			width: 70%;

			.tu-input__inner {
				padding: 0;
				text-align: center;
			}
		}
	}

	@include e(list) {
		padding: 0;
		margin: 0;
		list-style: none;
		text-align: center;

		&::after,
		&::before {
			content: "";
			display: block;
			width: 100%;
			height: 80px;
		}
	}

	@include e(item) {
		font-size: 14px;
		height: 32px;
		line-height: 32px;
		color: $--color-text-primary;
		transition: all 0.3s;

		&:hover:not(.disabled):not(.active) {
			background: $--color-hover-background;
			cursor: pointer;
		}

		&.active:not(.disabled) {
			color: $--color-primary;
		}

		&.disabled {
			color: $--color-text-disabled;
			cursor: not-allowed;
		}
	}
}
