@import "calypso/my-sites/stats/theme-override-mixin";

.stats .customer-home__card.stats__with-chart {
	box-shadow: none;

	@include breakpoint-deprecated( ">660px" ) {
		padding: 16px 24px 0;
		margin-bottom: 16px;
	}
}

.stats .customer-home__card .chart {
	margin: 0 -16px;
	background: none;

	@include breakpoint-deprecated( ">480px" ) {
		margin: 0 -24px;
	}

	.color-scheme.is-classic-dark.is-section-home & {
		@include apply-improved-classic-dark-colors();
	}

	.chart__bar:hover {
		cursor: default;
	}

	&.is-placeholder {
		padding: 16px;
		margin: 0 -16px;

		@include breakpoint-deprecated( ">660px" ) {
			padding: 16px 24px;
			margin: -24px -24px 0;
		}

		.chart__y-axis-markers,
		.chart__bars,
		.chart__bar {
			height: 150px;
		}

		.chart__empty {
			text-align: center;
		}
	}
}

.stats .card-heading {
	@include breakpoint-deprecated( ">660px" ) {
		margin-left: -24px;
	}
}

.stats .customer-home__card .inline-support-link {
	margin-left: 4px;

	&:focus-visible {
		box-shadow: 0 0 0 2px var(--color-primary);
		outline: 0;
	}
}

.stats__empty {
	margin-top: 16px;
	display: flex;
	align-items: center;
}

.stats__empty-illustration {
	flex: 1 0 70px;
	margin-right: 16px;
}

.stats__data {
	display: flex;
	flex-wrap: wrap;
	margin: 8px -24px 0;
}

.stats__data-item {
	border: 1px solid var(--color-neutral-5);
	border-right: none;
	width: 25%;
	box-sizing: border-box;
	text-align: center;
	padding: 16px 24px;
	display: flex;
	flex-direction: column;

	&:first-child {
		border-top-left-radius: 3px;
	}

	&:last-child {
		padding-right: 24px;
		border-right: 1px solid var(--color-neutral-5);
		border-top-right-radius: 3px;
	}

	@include breakpoint-deprecated( ">660px" ) {
		border-bottom: none;
	}

	@include breakpoint-deprecated( "1040px-1280px", "<960px" ) {
		width: 50%;

		&:nth-child(1),
		&:nth-child(2) {
			border-bottom: none;
		}
		&:nth-child(2) {
			border-top-right-radius: 3px;
			border-right: 1px solid var(--color-neutral-5);
		}
	}

	@include breakpoint-deprecated( "<660px" ) {
		&:first-child,
		&:nth-child(2),
		&:last-child {
			border-radius: 0;
		}
	}

	@include breakpoint-deprecated( "1040px-1280px" ) {
		&:last-child {
			border-top-right-radius: 0;
		}
	}
}

.stats__data-label {
	font-size: $font-body-small;
	color: var(--color-text-subtle);
	margin-bottom: 4px;
}

.stats__data-value {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.stats__all {
	margin: 0 -24px;
	border-top: none;
	border-bottom-left-radius: 3px;
	border-bottom-right-radius: 3px;
	@include breakpoint-deprecated( ">660px" ) {
		border: 1px solid var(--color-neutral-5);
	}
}

.stats__all-link {
	display: block;
	padding: 12px 24px;
	font-size: $font-body-small;

	&:hover {
		background: var(--color-neutral-0);
	}

	&:focus {
		background: var(--color-primary);
		color: var(--color-text-inverted);
	}
}

.layout__primary .customer-home__layout-col-right {
	.stats__data-item {
		width: 50%;
		text-align: left;
		font-size: rem(14px);
		padding: 14px;

		&:nth-child(1),
		&:nth-child(2) {
			border-bottom: none;
		}
		&:nth-child(2) {
			border-right: 1px solid var(--color-neutral-5);
		}
	}

	.stats__all-link {
		padding: 14px;
	}
}
