.rfw-account-card {
	line-height: variables.$rfw-line-height-smaller;

	&--is-disabled {
		opacity: 0.5;
	}

	&--is-expanded-detail {
		.rfw-account-card__indicator {
			grid-area: 1/3;
		}

		.rfw-account-card__detail {
			grid-area: 2/2/auto/span 2;
		}
	}

	&__styled {
		&--align-top {
			align-self: flex-start;
		}
	}

	&__body-layout {
		display: grid;
		grid-template-columns: auto 1fr auto;
		align-items: start;
	}

	&__icon {
		grid-area: 1/1/span 2;
		line-height: 0;
		margin-inline-end: wpVariables.$grid-unit-20;
	}

	&__subject {
		grid-area: 1/2;
	}

	&__indicator {
		grid-area: 1/3/span 2;
		margin-inline-start: wpVariables.$grid-unit-20;

		&--align-to-detail {
			grid-area: 2/3;
			margin-block-start: wpVariables.$grid-unit-15;
		}
	}

	&__detail {
		grid-area: 2/2;
		margin-block-start: wpVariables.$grid-unit-15;
	}

	&__actions {
		grid-area: 3/2/auto/span 2;
		margin-block-start: wpVariables.$grid-unit-15;
	}

	&__title {
		color: wpColors.$black;
		margin: 0;
	}

	&__description {
		align-items: flex-start;
		color: wpColors.$gray-900;
		display: flex;
		flex-direction: column;
		gap: 1em;
		margin-block-start: wpVariables.$grid-unit-05;

		> p {
			margin: 0;
		}
	}

	&__helper {
		margin-block-start: wpVariables.$grid-unit-05;
		font-style: italic;
		font-size: wpVariables.$helptext-font-size;
		color: wpColors.$gray-700;
	}

	.components-card__footer {
		padding-block: calc(var(--main-gap) / 3 * 2);
		padding-inline: var(--main-gap);

		// The buttons in card footer usually use the link style in RFW,
		// but the default link style has a smaller size that doesn't meet
		// the visual design needs. So we override its size here.
		> .components-button.is-link {
			min-block-size: variables.$rfw-size-control-height;
			padding-block: calc(wpVariables.$grid-unit-15 / 2);
			padding-inline: wpVariables.$grid-unit-15;
		}
	}

	.components-notice.is-error {
		margin: 0;
		background-color: #f8ebea;
	}

	.components-notice.is-success {
		background-color: #edfaef;
		border: 0;
		font-size: wpVariables.$helptext-font-size;
		margin-block-start: 0;
		margin-block-end: var(--main-gap);
		margin-inline: var(--large-gap);
		padding: wpVariables.$grid-unit-20;
	}

	@media (max-width: wpBreakpoints.$break-small) {
		&__body-layout {
			align-items: flex-start;
			display: flex;
			flex-direction: column;

			> div {
				margin-block: wpVariables.$grid-unit-10;
				margin-inline: wpVariables.$grid-unit-10;
			}
		}
	}
}
