$crc: '.h-date-picker';

#{$crc} {
	color: $c-default-text;
	display: inline-block;

	&.-active #{$crc}__button {
		border-color: $c-hover--primary-border;

		&.-split-button #{$crc}__icon > svg {
			border-left-color: $c-hover--primary-border;
		}
	}

	&.-disabled {
		opacity: $v-control-disabled-opacity;
		pointer-events: none;

		#{$crc}__button {
			background: $c-disabled--primary-background;
			color: $c-disabled--negative-text;
		}
	}
}

#{$crc}__calendar-container {
	border: $v-control-border-width solid $c-primary-border;
	background: $c-primary-background;
	border-radius: $v-box-border-radius;
	padding-top: 3px - $v-control-border-width;
	display: flex;
	flex-direction: column;
	filter: drop-shadow($sd-active--primary-box-shadow);
	width: 270px;

	.h-scroll-container{
		flex-grow: 1;
	}

	&:after {
		content: '';
		position: absolute;
		height: 3px;
		left: 0;
		right: 0;
		top: 0;
		background: $c-primary;
		border-radius: $v-box-border-radius $v-box-border-radius 0 0;
	}

	&[data-floating-placement='top'] #{$crc}__arrow{
		transform: rotate(180deg);
	}
}

#{$crc}__calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: $v-control-height-large;
	padding: 0 $g-8;
	font-size: $fs-default;
}

#{$crc}__calendar {
	padding: $g-12;
	padding-top: 0;
}

#{$crc}__calendar-weekdays {
	display: flex;
	align-items: center;
	height: $v-control-height-small;
	border-bottom: $v-control-border-width solid $c-primary-border;
	font-size: $fs-small;
	margin-bottom: $g-4;

	> div {
		flex: 1 0 1px;
		text-align: center;
	}
}

#{$crc}__calendar-dates {
    &.-has-dots #{$crc}__calendar-date{
		height: $v-control-height-small + 8px;
	}
}

#{$crc}__calendar-date {
	width: 14.28571428571429%;
	height: $v-control-height-small;
	line-height: $v-control-height-small;
	font-size: $fs-default;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	transition: $t-fast-standard;
	border-radius: $v-box-border-radius;
	border-width: $v-box-border-width;
	border-style: solid;
	border-color: transparent;
	box-sizing: border-box;
	cursor: pointer;

	&:hover, &.-focused {
		background: rgba($c-primary, $o-16);
		color: $c-default-text;
	}

	&.-outside-month {
		color: rgba($c-default-text, $o-48);

		#{$crc}__dot {
			opacity: $o-48;
		}
	}

	&.-today {
		border-color: $c-dark-primary;
	}

	&.-selected {
		background: rgba($c-primary, $o-32);
	}
}

#{$crc}__dots-container {
    display: flex;
	gap: $g-4;
	flex-wrap: wrap;
	justify-content: center;
	margin-top: -2px;
	overflow: hidden;
}

#{$crc}__dot {
	background: $c-primary;
    width: 4px;
	height: 4px;
	border-radius: 50%;
	flex-shrink: 0;
}



#{$crc}__calendar-month-label {
	margin-left: $g-8;
}


#{$crc}__arrow{
	$popper-arrow-size: 16px;
	color: $c-primary;
	width: $popper-arrow-size;
	height: $popper-arrow-size;
}
