@import '@wordpress/base-styles/breakpoints';
@import '@wordpress/base-styles/mixins';

.review-licenses__lightbox.jetpack-lightbox__modal {
	min-height: 300px;
	width: 95%;

	.jetpack-lightbox__content-main,
	.jetpack-lightbox__content-aside {
		padding: 24px;

		@media only screen and ( min-width: 782px ) {
			padding: 16px;
		}

		@include break-xlarge {
			padding: 32px;
		}
	}
}

.review-licenses__title {
	color: var( --studio-gray-100 );
	font-size: rem( 24px );
	font-weight: 700;
}

.review-licenses__subtitle {
	color: var( --studio-gray-80 );
	font-size: rem( 16px );
	font-weight: 400;
}

.review-licenses__selected-licenses {
	margin-block-start: 24px;
}

.review-licenses__selected-license {
	margin-block-end: 24px;

	.review-licenses__license-details {
		display: flex;
		gap: 14px;

		.review-licenses__license-icon {
			display: none;
			box-sizing: border-box;
			width: 48px;
			height: 48px;
			background: linear-gradient( 159.87deg, #f6f6f4 7.24%, #f7f4ea 64.73%, #ddedd5 116.53% );
			border-radius: 4px;

			@media only screen and ( min-width: 821px ) {
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}

		.review-licenses__license-icon > img {
			width: 22px;
			height: auto;
		}

		.review-licenses__license-text-content {
			width: 100%;
		}

		.review-licenses__license-header {
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.review-licenses__license-label {
			font-size: rem( 16px );
			font-weight: 700;
		}

		.review-licenses__license-count {
			background-color: var( --studio-gray-0 );
			padding: 5px 15px;
			border-radius: 4px;
			font-weight: 500;
		}

		.review-licenses__license-description {
			color: var( --studio-gray-70 );
			font-size: rem( 16px );
			font-weight: 400;
			margin-block: 4px 0;
		}
	}
}

.review-licenses__pricing {
	background-color: var( --studio-white );
	border-radius: 8px;
	border: 1px solid var( --color-link );
	padding: 1rem;

	@media only screen and ( min-width: 782px ) {
		margin-block-start: 32px;
	}

	@include break-xlarge {
		margin-block-start: 24px;
	}

	.review-licenses__pricing-discounted {
		font-size: 1.25rem;
		font-weight: 600;
		color: var( --studio-gray-80 );
		line-height: 1;

		@include break-xlarge {
			font-size: 1.5rem;
			font-weight: 700;
			color: var( --studio-black );
		}
	}

	.review-licenses__pricing-original {
		text-decoration: line-through;
		font-weight: 400;
		font-size: 1rem;
		margin-inline-start: 8px;
	}

	.review-licenses__pricing-interval {
		font-size: 0.75rem;
		font-weight: 400;
		color: var( --studio-gray-60 );
		line-height: 2;
	}
}

.review-licenses__cta-button {
	margin-block: 16px 8px;
	width: 100%;
}

.review-licenses__notice {
	color: var( --studio-gray-50 );
	font-size: rem( 12px );
	margin-block-end: 16px;

	a {
		text-decoration: underline;
		color: var( --studio-black );
	}
}

.review-licenses__pricing-breakdown {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	max-height: 55vh;

	.review-licenses__license-item {
		display: flex;
		gap: 12px;
		align-items: center;
		font-size: rem( 14px );
		color: var( --studio-gray-70 );
		justify-content: space-between;
		margin-block-end: 4px;

		.review-licenses__license-item-column {
			display: flex;
			align-items: center;

			svg {
				min-width: 22px;
			}
		}

		.review-licenses__license-item-actual-cost {
			text-decoration: line-through;
			margin-inline-start: 8px;
		}
	}
}

.review-licenses__pricing-breakdown-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-block-start: 20px;
	padding-block-start: 20px;
	color: var( --studio-gray-70 );
	font-weight: 500;
	border-block-start: 1px solid var( --studio-gray-10 );
}
