.countdown-box {
	.box-time {
		padding: 0 10px;
		display: inline-block;
		position: relative;

		&:first-child {
			padding-left: 0px;
		}

		&:last-child {
			padding-right: 0px;
		}

		.box-count {
			min-width: 70px;
			height: 34px;
			line-height: 34px;
			display: inline-block;
			vertical-align: middle;
			display: inline-block;
			font-weight: 600;
			font-size: 28px;
			font-family: $font_titles;
			text-align: center;
			overflow: hidden;
			@include border_radius();
		}

		.box-label {
			display: block;
			text-align: center;
			font-size: 14px;
			line-height: 24px;
			margin: 8px auto;
		}
	}
}

.countdown-classic {
	.box-time {
		font-size: 28px;

		// Dots
		&:after, &:before {
			content: '';
			background-color: $color_dark;
			display: block;
			width: 5px;
			height: 5px;
			border-left: none;
			border-right: none;
			position: absolute;
			top: 58%;
			left: -0.13em;
			-webkit-border-radius: 50%;
			-moz-border-radius: 50%;
			border-radius: 50%;
		}

		&:before {
			top: 32%;
		}

		&:first-child {
			&:after, &:before {
				display: none;
			}
		}

		.box-count {
			min-width: 1em;
			height: 1em;
			line-height: 1;
			font-size: inherit;
		}

		.box-label {
			display: none;
		}
	}
}

.countdown-boxed {
	.box-time {
		&:after, &:before {
			display: none;
		}
	}

	.box-time .box-count {
		line-height: 70px;
		color: #fff;
		height: 70px;
	}

	.box-count {
		background-color: $color_text;
		position: relative;
		perspective: 300px;

		.box-current,
		.box-next {
			background: #fff;
			position: absolute;
			outline: 1px solid transparent;
			top: 0;
			left: 0;
			z-index: 1;
		}

		.box-current.box-top,
		.box-next.box-bottom {
			transform-origin: 50% 100%;
			transition: none;
			transform: rotateX(0deg);
			backface-visibility: hidden;
			z-index: 2;
		}

		.box-current.box-top {
			z-index: 3;
		}

		.box-next.box-bottom {
			transform-origin: 50% 0;
			transform: rotateX(180deg);
		}

		.box-top {
			background: inherit;

			&:after {
				content: '';
				background: rgba(#000, .3);
				width: 100%;
				height: 100%;
				position: absolute;
				top: 0;
				left: 0;
			}
		}

		.box-bottom {
			background: inherit;
		}

		.box-top,
		.box-bottom {
			width: 100%;
			height: 50%;
			overflow: hidden;
		}

		.box-bottom {
			height: 50%;
			border-top: none;
			top: 50%;
			margin-top: 0;
			.number {
				top: -35px;
			}
		}

		.number {
			position: relative;
			z-index: 4;
		}
	}

	.box-time {
		&:after {
			margin-top: -32px;
		}

		.box-label {
			line-height: 1;
			margin: 10px auto;
		}

		@include sm_screen() {
			&:after {
				margin-top: -28px;
			}
		}
	}

	.flip {
		.box-current.box-top {
			transition: transform .5s ease-in-out;
			transform: rotateX(-180deg);
		}

		.box-next.box-bottom {
			transition: transform .5s ease-in-out;
			transform: rotateX(0);
		}
	}

}

@include sm_screen(){
	.countdown-box:not(.countdown-classic),
	.countdown-boxed:not(.countdown-classic) {
		display: flex;
		justify-content: space-between;
		
		.box-time {
			.box-count {
				min-width: 50px;
				height: 50px;
				line-height: 49px;
				font-size: 20px;
				.box-bottom .number {
					top: -25px;
				}
			}
		}
	}
	.countdown-box .box-time {
		padding: 0 5px;
	}

	.countdown-classic {
		.box-time {
			&:after, &:before {
				width: 5px;
				height: 5px;
			}

			.box-count {
				min-width: 10px;
				font-size: 30px;
			}
		}
	}
}