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

@include b(month-table) {
	font-size: 14px;
	margin: -1px;
	border-collapse: collapse;
	display: table;

	tr,
	tr:nth-child(2n),
	td {
		padding: 0;
		border: none;
		background: transparent;
	}

	td {
		text-align: center;
		cursor: pointer;
		& div {
			box-sizing: border-box;
			margin: 18px 8px;
			padding: 3px;
		}
		&.today {
			.cell {
				color: $--color-primary;
				font-weight: bold;
			}
			&.start-date .cell,
			&.end-date .cell {
				color: $--color-primary;
			}
		}

		&.disabled .cell {
			background-color: $--color-hover-background;
			cursor: not-allowed;
		}

		.cell {
			width: 48px;
			height: 24px;
			display: block;
			line-height: 24px;
			margin: 0 auto;
			transition: all 0.3s;
			border-radius: 2px;
			color: $--color-text-primary;
			border: 1px solid transparent;
			font-weight: $--font-weight-secondary;

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

		&.in-range div {
			> a {
				box-shadow: $--box-shadow-border;
			}
		}

		&.start-date div .cell,
		&.end-date div .cell {
			border: 1px solid $--color-primary;
			color: $--color-primary;
			box-shadow: $--box-shadow-border;
			border-radius: 2px;
		}

		&.current:not(.disabled) .cell {
			border-radius: 2px;
			border: 1px solid $--color-primary;
			color: $--color-primary;
			box-shadow: $--box-shadow-border;
		}
	}
}
