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

.cancel-jetpack-form__dialog {
	// dialog panel

	.formatted-header__title {
		font-size: 1.5rem;
		color: #000;
		line-height: 1.11;
		margin-bottom: 1.5rem;
		text-align: center;
		font-weight: 700;
	}

	.formatted-header__subtitle {
		font-size: 1.25rem;
		color: #000;
		line-height: 1.25;
		margin-bottom: 2rem;
	}
}

.cancel-jetpack-form__dialog-content {
	box-sizing: border-box;

	@include break-medium {
		padding: 1rem 4rem;
	}

	@include break-wide {
		width: 1128px;
		padding: 3rem 12rem;
	}
}

// List of benefits at the bottom of the fist step
.cancel-jetpack-form__jetpack-general-benefits {
	margin-top: 2rem;
}

.cancel-jetpack-form__jetpack-general-benefits-title {
	font-size: 1.25rem;
	margin-bottom: 1rem;
}

// survey step of the flow
.jetpack-cancellation-survey {
	&__card {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 1rem;
		width: 100%;
		font-weight: 600;
		color: var(--studio-black);
		border: 1px solid var(--studio-white);
		transition: border 0.2s ease-in-out;
		font-size: 1rem;

		&:hover,
		&:focus {
			box-shadow: 0 0 0 1px var(--studio-gray-50);
		}

		&.is-selected {
			box-shadow: 0 0 0 1px var(--studio-black);
			border: 1px solid var(--studio-black);
		}

		& > svg {
			margin-left: auto;
		}
	}

	&__card-content {
		align-items: center;
		display: flex;
		flex-direction: column;
		justify-content: center;

		width: 100%;

		text-align: left;

		@include break-medium {
			align-items: flex-start;
		}
	}

	&__choice-item-text-input-label {
		font-size: 0.875rem;
		width: 100%;
	}
}

input[type="text"].form-text-input.jetpack-cancellation-survey__choice-item-text-input {
	margin-top: 0.5em;
}

// Cancellation offer step
.jetpack-cancellation-offer {
	&__card {
		background: var(--studio-white);
		padding: 2rem;
		box-shadow: 0 10px 40px rgb(0 0 0 / 8%);
		border-radius: 4px;
	}

	&__logo {
		margin-bottom: 1.5rem;
	}

	&__headline {
		font-size: 1.5rem;
		color: var(--studio-jetpack-green-60);
		font-weight: 700;
		line-height: 1.15;
		margin-bottom: 1rem;
		max-width: 600px;

		@include break-medium {
			font-size: 2.25rem;
		}
	}

	&__accept-cta {
		padding: 0.5rem 1.25rem;
		font-size: 1rem;
		background-color: var(--studio-gray-100) !important;
		border: none !important;
		margin-bottom: 1rem;

		&:hover,
		&:active {
			background-color: var(--studio-gray-80) !important;
		}

		&:focus {
			box-shadow: none !important;
			outline: solid 2px var(--studio-gray-100);
			outline-offset: 2px;
		}

		&.is-busy {
			background-image: linear-gradient(-45deg, var(--studio-gray-60) 28%, var(--studio-gray-100) 28%, var(--studio-gray-100) 72%, var(--studio-gray-60) 72%) !important;
		}
	}

	&__tos {
		a {
			font-weight: 600;
			text-decoration: underline;
			color: var(--studio-jetpack-green-60);

			&:hover,
			&:focus {
				text-decoration-thickness: 3px;
				color: var(--studio-jetpack-green-70);
			}
		}
	}

	&__error-text {
		color: var(--studio-red-0);
		font-weight: 700;
	}
}

.jetpack-cancellation-offer-accepted__image {
	width: 100%;
	margin-bottom: 1.5rem;
}

.cancel-jetpack-form__notice {
	margin-bottom: 24px;
	align-self: center;
	width: fit-content;
	padding-right: 24px;
}

.cancel-jetpack-form__notice-container {
	display: flex;
	justify-content: center;
}
