@use "../mixin";
@use "../../scss/mixins/breakpoints";
@use "../../scss/calypso-colors";
@use "../../scss/mixins/rna";
@use "../../scss/typography";

.jp-recommendations-summary__main {
	display: grid;
	grid-template-columns: 54% 46%;

	background: var(--jp-white-off);

	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.03);
	border: 1px solid calypso-colors.$gray-lighten-20;

	@include breakpoints.breakpoint( "<782px" ) {
		display: flex;
		flex-direction: column;
	}
}

.jp-recommendations-summary__content {
	background: calypso-colors.$white;

	@include breakpoints.breakpoint( "<480px" ) {
		padding-bottom: 1rem;
	}

	&.isLoading {
		min-height: 730px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

.jp-recommendations-summary__configuration {
	margin: 3rem 3rem 2rem 3rem;

	@include breakpoints.breakpoint( "<480px" ) {
		margin: 1rem 1rem 0 1rem;
	}

	h1 {
		font-size: typography.$font-title-medium;

		color: var(--jp-gray-80);
	}

	h2 {
		margin: 2rem 0 1rem 0;

		color: var(--jp-gray-100);

		font-size: typography.$font-body;
	}
}

.jp-recommendations-summary__recommendation-notice {
	font-size: typography.$font-body-small;

	color: var(--jp-gray-50);
}

.jp-recommendations-summary__sidebar {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;

	@include mixin.recommendation-sidebar-blob;

	padding: 2rem 2.5rem 4.5rem;

	@include breakpoints.breakpoint( "<782px" ) {
		padding: 1rem;
	}

	&.isLoading {
		min-height: 430px;
		display: flex;
		justify-content: center;
	}

	.jp-recommendations-product-card-upsell__cta-button {
		width: 100%;
	}
}

.jp-recommendations-summary__underside {
	margin-top: 1rem;
}

.jp-recommendations-summary__discount {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;

	padding: 1.5rem 0;

	border-bottom: 1px solid var(--jp-gray-5);

	font-size: 1rem;

	.jp-recommendations-summary__reco-link {
		color: var(--jp-black);

		text-align: right;
		text-decoration: underline;

		&:active,
		&:hover {
			text-decoration: none;
		}
	}
}

.jp-recommendations-summary__timer {
	display: flex;
	flex-direction: column;

	color: var(--jp-gray-60);

	font-size: 0.875rem;
}

.jp-recommendations-summary__time {
	margin-top: 0.25rem;

	font-size: 1.125rem;
}

.jp-recommendations-summary__footer {
	padding-top: 2rem;
}

.jp-recommendations-summary__footnote {
	margin-top: 0.625rem;
	margin-bottom: 0;

	color: var(--jp-gray-30);

	font-size: typography.$font-body-small;
	text-align: center;
}
