@import "@automattic/typography/styles/variables";
@import "@automattic/onboarding/styles/mixins";
@import "@wordpress/base-styles/breakpoints";

.jetpack-rna-action-card {
	box-sizing: content-box;
	background-color: var(--studio-white);
	background-repeat: no-repeat;
	background-position: top right;
	width: 100%;
	max-width: 1010px;
	margin-top: 15px;
	border: 1px solid var(--studio-gray-5);
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: space-between;
	@include break-large {
		flex-direction: row;
	}
	&.is-placeholder {
		background-color: #fdfdfd;
		border: none;
	}

	&__body {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		min-width: 238px;
		padding: 16px 26px 46px;
		box-sizing: border-box;
		@include break-large {
			flex: 0 55 550px;
			padding: 64px;
		}
	}

	&__action {
		display: flex;
		align-items: flex-end;
		margin-top: 24px;
		flex: 1;
		flex-wrap: wrap;
	}

	&__button {
		&.button {
			font-size: $font-body;
			padding: 8px 32px;
			width: 100%;
			@include break-medium {
				width: auto;
			}
			@include break-large {
				width: 100%;
			}
			@include break-wide {
				width: auto;
			}
			.is-placeholder & {
				@include placeholder( --studio-gray-5 );
				color: transparent !important;
			}
		}
	}

	&__footer {
		box-sizing: border-box;
		order: -1;
		@include break-large {
			order: initial;
			flex: 0 46 460px;
			display: flex;
			align-items: center;
		}
	}

	&__footer-image {
		width: 100%;
		@include break-large {
			padding-left: 0;
		}
		img {
			width: 100%;
		}
	}

	&__header {
		font-size: $font-headline-small;
		font-weight: 700;
		margin-bottom: 24px;
		line-height: 40px;
		.is-placeholder & {
			display: inline-block;
			@include placeholder( --studio-gray-5 );
		}
	}

	&__description {
		font-size: $font-title-small;
		line-height: 30px;
		font-weight: 500;
		margin-bottom: 24px;
		.is-placeholder & {
			@include placeholder( --studio-gray-5 );
		}
	}

	&__placeholder-image {
		height: 0;
		margin: 25px 65px 25px 25px;
		padding-bottom: 85%;
		@include placeholder( --studio-gray-5 );
	}

	&__secondary-cta {
		text-align: center;
		margin: 25px auto 0;

		a,
		a:visited {
			color: var(--studio-gray-80);
		}

		a:hover,
		a:focus,
		a:active,
		a.is_active {
			color: var(--studio-jetpack-green-50);
		}

		@include break-medium {
			text-align: left;
			align-self: center;
			margin: 0 0 0 28px;
		}

		@include break-large {
			text-align: center;
			margin: 25px auto 0;
		}

		@include break-wide {
			text-align: left;
			align-self: center;
			margin: 0 0 0 28px;
		}
	}
}
