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

body {
	--wp--custom--form--color--background: var(--sensei-background-color);
	--wp--custom--form--border--width: 1.5px;
	--wp--custom--form--border--style: solid;
	--wp--custom--form--border--color: var(--sensei-text-color);
	--wp--custom--form--border--radius: 2px;
	--wp--custom--form--color--text: inherit;
	--wp--custom--form--padding: 6px 8px;
	--wp--custom--list--spacing--padding--left: 16px;
	--wp--custom--layout--content-size: 900px;
	--wp--custom--layout--wide-size: 1100px;
	--wp--style--root--padding-top: 0px !important;
	--wp--style--root--padding-bottom: 0px;
	--wp--custom--gap--horizontal: var(--content-padding, 24px);

	--max-content-size: 100vw;
	--content-size: min(var(--wp--custom--layout--content-size), var(--max-content-size));
	--wide-size: min(var(--wp--custom--layout--wide-size), var(--max-content-size));

	.wp-site-blocks {
		background-color: var(--sensei-background-color);
	}

}

::selection {
	background-color: var(--sensei-text-color);
	color: var(--sensei-background-color);
}

.sensei-course-theme__main-content,
.sensei-course-theme__quiz__footer__wrapper {
	padding: 0 var(--content-padding);
}

/**
 * Latest template version.
 */

.sensei-course-theme {
	&__main-content__container,
	&__main-content__container > .wp-block-group__inner-container {
		> * {
			max-width: var(--content-size) !important;
			margin-left: auto;
			margin-right: auto;
		}
	}

	&__main-content__container > .wp-block-group__inner-container {
		max-width: unset !important;
	}

	.wp-block-post-content {
		margin-top: 40px;

		& > *, & ~ div > *, .wp-block-group__inner-container > * {
			max-width: var(--content-size) !important;
			margin-left: auto;
			margin-right: auto;
		}

		&, & > &, & ~ div {
			max-width: unset !important;
			width: unset !important;
			padding: 0 !important;
		}

		.alignfull {
			max-width: unset !important;
		}

		.alignwide {
			max-width: var(--wide-size) !important;

		}

		.alignright {
			position: static;
			margin-right: 0;
			float: right;
		}

		.alignleft {
			position: static;
			margin-left: 0;
			float: left;
		}

		.post-nav-links {
			display: none;
		}
	}


	@media screen and (max-width: $break-medium) {
		.sensei-lesson-footer {

			display: block;

			* {
				float: none;
			}

			.sensei-buttons-container {
				display: flex;
				justify-content: space-between;
				gap: 1.25rem;
				margin: 0;

				& > * {
					flex: 1 0 0;
				}

				.sensei-buttons-container__button-block {
					padding: 0;
				}

				.wp-block-button,
				.wp-block-button__link {
					width: 100%;
				}
			}
		}
	}

	.wp-block-post-content {
		.wp-block-sensei-lms-lesson-actions {
			display: none;
		}
	}

	&.sensei-default {
		.sensei-course-theme__main-content {
			> * {
				max-width: var(--content-size) !important;
				margin-left: auto;
				margin-right: auto;
			}
		}
	}
}

.entry-content {
	--wp--custom--gap--horizontal: var(--content-padding);
	--wp--custom--gap--vertical: 12px;
	--wp--custom--spacing--outer: 0px;
	margin-block-end: 40px;

	img {
		max-width: 100%;
		height: auto;
	}

	embed,
	iframe,
	object {
		max-width: 100%;
	}
}
