@use "@wordpress/base-styles/colors";
@use "@wordpress/base-styles/variables";
@use "@wordpress/base-styles/mixins";
@use "./reset";
@use "./editor-styles";

.playground {
	padding-top: 20px;

	@include mixins.break-small() {
		width: calc(100% - #{variables.$sidebar-width});
	}

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

	iframe {
		width: 100%;
	}
}

.playground__content {
	// Reference element for the block popover position.
	position: relative;
}

.playground__sidebar {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: variables.$sidebar-width;
	border-left: variables.$border-width solid colors.$gray-300;
	height: auto;
	overflow: auto;
	-webkit-overflow-scrolling: touch;

	// Temporarily disable the sidebar on mobile
	display: none;

	@include mixins.break-small() {
		display: block;
	}
}

/**
 * Animations
 */

// These keyframes should not be part of the _animations.scss mixins file.
// Because keyframe animations can't be defined as mixins properly, they
// are duplicated. Since they are only for the editor, we add them here instead.
@keyframes edit-post__fade-in-animation {

	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}
