*, ::before, ::after {
	box-sizing: border-box;
}

* {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1em;
	font-weight: inherit;
	font-style: inherit;
	line-height: 1;
	list-style: none;
	text-decoration: inherit;
}

body {
	margin: 0;
	font-family: system-ui, BlinkMacSystemFont, -apple-system, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
	font-size: 14px;
	line-height: 1;
	-webkit-font-smoothing: subpixel-antialiased;
	color: #29323d;
}

.image {
	background-color: #222222;

	> img {
		display: block;
		max-width: 100%;
		height: auto;
		margin: auto;

		@supports (object-fit: contain) {
			max-height: 200px;
			object-fit: contain;
		}
	}
}

.code {
	position: relative;
	overflow: auto;
	max-height: 75vw;
	padding: 24px;
	background-color: #f2f5f8;

	> iframe,
	> twitterwidget {
		margin: 0 !important;
	}

	> video {
		max-width: 100%;
	}

	&.is-ratio {
		padding: 75% 0 0 0;

		> iframe {
			display: block;
			position: absolute;
			top: 0;
			left: 0;
			width: 100% !important;
			height: 100% !important;
		}
	}
}

.content {
	padding: 22px 24px;

	> h1 {
		overflow: hidden;
		max-height: 40px;
		font-size: 16px;
		font-weight: bold;
		line-height: 20px;
		color: #29323d;
	}

	> p {
		overflow: hidden;
		max-height: 60px;
		margin-top: 11px;
		font-size: 14px;
		line-height: 20px;
		color: #8f98a3;
	}

	> ul {
		display: flex;
		margin-top: 6px;

		> li {
			padding: 8px 24px 0 0;
			line-height: 16px;
			color: #29323d;

			> img {
				display: inline-block;
				width: 16px;
				height: 16px;
				margin-right: 6px;
				vertical-align: middle;
				object-fit: contain;
			}
		}
	}

	> h1,
	> p,
	> ul > li {

		> a {
			color: #0d78f2;

			&:hover {
				text-decoration: underline;
			}
		}
	}
}

.image + .content,
.code + .content {
	position: relative;
	box-shadow: 0 -1px rgba(0, 0, 20, 0.1);
}

.warning {
	cursor: pointer;
	display: block;
	width: 1em;
	height: 1em;
	font-size: 16px;
	background-image: url('./assets/warning.svg');
	filter: brightness(0%);
	opacity: 0.2;

	&:hover {
		filter: none;
		opacity: 1;
	}
}

.volume-preview {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	overflow-y: auto;

	> .code {
		display: flex;
		justify-content: center;
	}

	> .image {
		width: 100%;
		height: 100%;

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