@mixin label-styles {
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: $gray-700;
	margin-bottom: 8px;
}

@mixin amount-styles {
	font-size: 20px;
	font-weight: 500;
	color: $gray-900;
	line-height: 28px;
}

.wcpay-payment-activity {
	&__card {
		&__body {
			padding: 0 !important;
			&__empty-state-wrapper {
				text-align: center;
				color: $gray-600;
				padding: 16px 0 19px;
			}
		}

		&__header {
			.wcpay-filter.components-custom-select-control {
				.wcpay-filter.components-custom-select-control {
					&__menu {
						// Ensure date preset items are shown without vertical scroll.
						max-height: fit-content;
					}

					&__item {
						// Set alignment of columns in the date preset dropdown.
						grid-template-columns: 10% 25% 65%;
					}
				}
			}

			@include breakpoint( '<660px' ) {
				// Sets Mobile view of the payment activity widget header. Date preset dropdown is moved to a new line.
				flex-direction: column !important;
				gap: 16px;
			}
		}
	}
}

.wcpay-payment-activity-data {
	display: grid;
	grid-template-columns: 1fr 1fr;
	width: 100%;

	@include breakpoint( '<660px' ) {
		grid-template-columns: 1fr;
		padding: 24px;

		> .wcpay-payment-data-highlights__item:nth-of-type( 1 ) {
			// Mobile view of the Total payment volume tile.
			border-bottom: 1px solid $gray-200;
			padding-top: 0;
			padding-bottom: 24px;

			.wcpay-tooltip__tooltip-wrapper {
				left: 45px !important;
			}
		}
	}

	.wcpay-payment-data-highlights {
		display: grid;
		grid-template-columns: 1fr 1fr;

		@include breakpoint( '<660px' ) {
			grid-template-columns: 1fr;
		}

		&__item {
			padding: 24px;
			border-left: 1px solid $gray-200;
			display: flex;
			flex-direction: column;
			justify-content: flex-start;
			align-items: flex-start;
			min-height: 129px;

			&:nth-of-type( 3 ),
			&:nth-of-type( 4 ) {
				@include breakpoint( '>660px' ) {
					border-top: 1px solid $gray-200;
				}
			}

			&:nth-last-of-type( 1 ) {
				@include breakpoint( '<660px' ) {
					border-bottom: none;
					padding-bottom: 0;
				}
			}

			&:hover {
				.wcpay-payment-data-highlights__item__wrapper a {
					opacity: 1;
				}
			}

			&__label {
				@include label-styles;
				margin: 0 0 8px 0;
			}

			&__wrapper {
				display: flex;
				flex-direction: column;
				align-items: flex-start;
				width: 100%;

				@include breakpoint( '<660px' ) {
					flex-direction: row;
					justify-content: space-between;
					align-items: center;
				}

				&__amount {
					@include amount-styles;
					margin: 0 0 8px 0;

					@include breakpoint( '<660px' ) {
						margin: 0;
					}
				}

				a {
					text-decoration: none;
					font-size: 12px;
					opacity: 0;

					&:focus {
						opacity: 1;
					}

					@include breakpoint( '<660px' ) {
						min-height: unset;
						opacity: 1;
					}
				}
			}

			@include breakpoint( '<660px' ) {
				border-left: none;
				border-bottom: 1px solid $gray-200;
				padding: 16px 0;
				min-height: unset;
			}
		}

		@include breakpoint( '<660px' ) {
			flex-direction: column;
		}
	}

	&__total-payment-volume {
		border-left: none;
		align-self: stretch;

		&__label {
			@include label-styles;
		}

		&__amount {
			@include amount-styles;
		}

		&__tooltip {
			.wcpay-inline-notice.components-notice {
				margin-top: 8px;
				margin-right: 0;
				padding: 8px;
				color: $studio-blue-70;

				.components-notice__content {
					font-size: 11px;
					line-height: 16px;
					margin: 0;
				}
			}
		}
	}

	.wcpay-tooltip__tooltip {
		line-height: 20px;
	}
}
