@import "~@wordpress/base-styles/colors";
@import "~@wordpress/base-styles/variables";

.simpay-admin-charts-period-over-period {
	position: relative;
	padding-bottom: $grid-unit-15;

	* {
		box-sizing: border-box;
	}

	&__tooltip {
		position: absolute;
		background: #fff;
		border: 1px solid #c3c3c3;
		box-shadow: 0 2px 6px rgb(0, 0, 0, 0.05);
		border-radius: 2px;
		padding: 10px 14px;
		display: flex;
		flex-direction: column;
		z-Index: 10000;
		min-width: 175px;

		&-data {
			white-space: nowrap;
			margin-bottom: $grid-unit;
			display: grid;
			grid-template-columns: 1fr auto;
			grid-auto-rows: auto;
			column-gap: $grid-unit-20;

			&:last-child {
				margin-bottom: 0;
			}

			&[data-dataset="1"] {
				opacity: 0.65;
			}

			em {
				font-style: normal;
				text-align: right;
			}
		}

		&-delta {
			font-size: 12px;
			margin: 0 -14px -10px;
			padding: 8px 14px;
			border-top: 1px solid #eee;
			background: #fdfdfd;
			border-radius: 2px;
			display: flex;
			align-items: center;
			justify-content: center;

			.simpay-admin-charts-badge {
				margin-right: 4px;
			}

			strong.is-positive {
				color: #006908;
			}

			strong.is-negative {
				color: #b3093c;
			}
		}
	}
}

.simpay-admin-charts-badge {
	color: $gray-800;
	font-size: 12px;
	font-weight: 500;
	font-style: normal;
	line-height: 1;
	padding: 3px 6px;
	display: inline-flex;
	align-items: center;
	background: $gray-100;
	border-radius: 100px;

	&.is-positive {
		color: #006908;
		background-color: #d7f7c2;
	}

	&.is-negative {
		color: #b3093c;
		background-color: #ffe7f2;
	}

	&__icon {
		width: 15px;
		height: 15px;
	}
}

.simpay-admin-charts-no-data {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	background: rgba(255, 255, 255, 0.5);
	z-index: 2;

	> div {
		text-align: center;
		padding: $grid-unit-30;
		background: #fff;
		border: 1px solid #c3c3c3;
		box-shadow: 0 2px 6px rgb(0, 0, 0, 0.10);
		border-radius: 2px;
		max-width: 60%;
	}

	strong {
		font-size: 15px;
		margin-bottom: $grid-unit;
		display: block;
	}
}