.c-rich-text {
	color: var(--color-primary);

	&.c-rich-text--dark {
		background-color: var(--color-primary);
		color: var(--color-white);
	}

	.c-rich-text__wrapper {
		display: flex;
		gap: 40px;

		@media (width < 768px) {
			flex-direction: column;
		}

		/* When wrapper has 2+ columns, make full width */
		&:has(> .c-rich-text__column:nth-child(2)) {
			width: 100%;

			.c-rich-text__column {
				@media (width > 768px) {
					width: 50%;
				}
			}
		}

		/* When wrapper has exactly 1 column */
		&:has(> .c-rich-text__column:only-child) {
			&.c-rich-text__wrapper--narrow {
				@media (width > 768px) {
					width: 40%;
				}
			}

			&.c-rich-text__wrapper--wide {
				@media (width > 768px) {
					width: 66.66%;
				}
			}

			&.c-rich-text__wrapper--center {
				justify-content: center;

				.c-rich-text__button-wrapper {
					justify-self: center;
				}
			}
		}

		&.c-rich-text__wrapper--center {
			text-align: center;
		}
	}

	.c-rich-text__text {
		margin-top: 20px;

		p:only-child {
			margin-bottom: 0;
		}

		p {
			margin-bottom: 20px;
		}

		a {
			font-weight: 700;
		}
	}

	.c-rich-text__button-wrapper {
		display: flex;
		gap: 1rem;
		margin-top: var(--spacing-md);

		@media (width < 480px) {
			flex-direction: column;
		}
	}
}
