body.seo_page_wpseo_page_settings {
	@apply yst-bg-slate-100;

	/* Move WP footer behind our content. */
	z-index: -1;

	#wpcontent {
		padding-left: 0 !important;
	}

	#wpfooter {
		@apply yst-pr-4;

		@media (min-width: 768px) {
			@apply yst-pr-8;

			padding-left: 17rem;
		}
	}

	.wp-responsive-open #wpbody {
		@media screen and (max-width: 782px) {
			right: -190px; /* Override to not leave space between the mobile menu and the content. */
		}
	}

	#modal-search .yst-modal__close {
		margin-top: -0.25rem;
	}

	&.sticky-menu {
		.yst-root .yst-notifications--bottom-left {
			@media (min-width: 783px) and (max-width: 962px) {
				left: calc(160px + 2rem); /* Next to admin menu. 160px is the admin menu width. */
			}
		}

		&.folded, &.auto-fold {
			.yst-root .yst-notifications--bottom-left {
				@media (min-width: 783px) and (max-width: 963px) {
					left: calc(32px + 2rem); /* Next to admin menu. 32px is the collapsed admin menu width. */
				}
			}
		}

		&.folded {
			.yst-root .yst-notifications--bottom-left {
				@media (min-width: 962px) {
					left: calc(32px + 2rem); /* Next to admin menu. 32px is the collapsed admin menu width. */
				}
			}
		}
	}

	&:not(.sticky-menu) .wp-responsive-open .yst-root {
		.yst-notifications--bottom-left {
			@media (max-width: 783px) {
				left: calc(190px + 2rem); /* Next to admin menu. 190px is the responsive admin menu width. */
			}
		}
	}

	.yst-root {
		.yst-notifications {
			max-height: calc(100% - 4rem - 32px); /* Extra 32px for the height of the WP admin bar. */

			@media (max-width: 782px) {
				max-height: calc(100% - 4rem - 48px); /* Extra 48px for the height of the mobile WP admin bar. */
			}
		}

		.yst-notifications--bottom-left {
			z-index: 9991; /* 1 above admin menu */

			@media (min-width: 783px) {
				left: calc(160px + 2rem); /* Next to admin menu. 160px is the admin menu width. */
			}
		}

		.yst-mobile-navigation__top {
			@media (min-width: 601px) and (max-width: 768px) {
				top: 46px;
			}

			@media (min-width: 783px) {
				@apply yst-hidden;
			}
		}

		.yst-mobile-navigation__dialog {
			z-index: 99999;
		}

		.yst-replacevar {
			@apply yst-relative;

			/* This needs additional nesting, specificity wise. */

			.emoji-select-popover {
				@apply yst-z-20 yst-right-auto yst-left-0;
			}
		}

		.yst-replacevar--disabled {
			.yst-replacevar__label,
			.yst-replacevar__editor,
			.emoji-select-button {
				@apply yst-opacity-50;
			}

			.yst-replacevar__button-insert,
			.yst-replacevar__label,
			.yst-replacevar__editor,
			.emoji-select-button {
				@apply yst-cursor-not-allowed;
			}

			.emoji-select-button {
				@apply yst-pointer-events-none;
			}
		}

		.yst-replacevar__label {
			@apply yst-mb-2;

			/* .yst-label */
			@apply
			yst-flex
			yst-text-sm
			yst-font-medium
			yst-text-slate-800;
		}

		.yst-replacevar__buttons {
			@apply yst-inline-flex yst-gap-1.5;
		}

		.yst-replacevar__button-insert {
			@apply yst-mb-2;

			/* .yst-button */
			@apply
			yst-inline-flex
			yst-items-center
			yst-py-2
			yst-px-3
			yst-border
			yst-shadow-sm
			yst-no-underline
			yst-cursor-pointer
			yst-rounded-md
			yst-text-sm
			yst-font-medium
			yst-leading-4

			focus:yst-outline-none
			focus:yst-ring-2
			focus:yst-ring-offset-2
			focus:yst-ring-primary-500

			disabled:yst-cursor-not-allowed
			disabled:yst-pointer-events-none
			disabled:yst-opacity-50;

			/* .yst-button--secondary */
			@apply
			yst-text-slate-800
			yst-bg-white
			yst-border-slate-300

			hover:yst-bg-slate-50;
		}

		.yst-replacevar__editor {
			/* .yst-text-field */
			@apply
			yst-w-full
			yst-py-2
			yst-px-3
			yst-border
			yst-border-slate-300
			yst-rounded-md
			yst-shadow-sm
			yst-bg-white
			yst-text-sm
			yst-leading-6
			yst-text-slate-800
			yst-placeholder-slate-500
			focus-within:yst-outline-none
			focus-within:yst-ring-primary-500
			focus-within:yst-border-primary-500
			focus-within:yst-ring-2
			focus-within:yst-border-opacity-0;

			[data-popper-reference-hidden] {
				@apply
				yst-w-56
				yst-py-1
				yst-rounded-md
				yst-shadow-lg
				yst-bg-white
				yst-ring-1
				yst-ring-black
				yst-ring-opacity-5
				focus:yst-outline-none
				yst-z-20;

				div > div {
					@apply
					yst-block
					yst-px-4
					yst-py-2
					yst-text-sm
					yst-text-slate-800
					yst-no-underline
					hover:yst-bg-slate-200
					hover:yst-text-slate-900
					yst-cursor-pointer;

					&[aria-selected] {
						@apply yst-bg-slate-200 yst-text-slate-900
					}
				}
			}
		}

		.yst-replacevar--description .yst-replacevar__editor {
			min-height: 5rem;
		}

		.yst-replacevar__mention {
			@apply
			yst-inline-block
			yst-py-0.5
			yst-px-2
			yst-mx-0.5
			yst-rounded-full
			yst-leading-tight
			yst-text-xs
			yst-font-medium
			yst-bg-slate-200
			yst-text-slate-900;
		}
	}

	/* RTL */

	&.rtl {
		.yst-root .yst-replacevar .emoji-select-popover {
			@apply yst-left-0 yst-right-auto;
		}
	}
}
