/**
 * Markdown extension for phpBB.
 * @author Alfredo Ramos <alfredo.ramos@proton.me>
 * @copyright 2019 Alfredo Ramos
 * @license GPL-2.0-only
 */
@reference "tailwindcss";

@layer utilities {
	.markdown:last-child {
		@apply mb-0;
	}

	.markdown li .markdown {
		@apply mt-0;
	}

	h6.markdown,
	h5.markdown,
	h4.markdown,
	h3.markdown,
	h2.markdown,
	h1.markdown {
		@apply font-bold! leading-none normal-case float-none! mx-0! my-2! p-0!;
		border: none !important;
	}

	h6.markdown:first-child,
	h5.markdown:first-child,
	h4.markdown:first-child,
	h3.markdown:first-child,
	h2.markdown:first-child,
	h1.markdown:first-child {
		@apply mt-0!;
	}

	h6.markdown:last-child,
	h5.markdown:last-child,
	h4.markdown:last-child,
	h3.markdown:last-child,
	h2.markdown:last-child,
	h1.markdown:last-child {
		@apply mb-0!;
	}

	h1.markdown {
		@apply text-4xl!;
	}

	h2.markdown {
		@apply text-3xl!;
	}

	h3.markdown {
		@apply text-2xl!;
	}

	h4.markdown {
		@apply text-xl!;
	}

	h5.markdown {
		@apply text-lg!;
	}

	h6.markdown {
		@apply text-base!;
	}

	table.markdown,
	details.markdown {
		@apply mx-0 my-4;
	}

	table.markdown,
	table.markdown th,
	table.markdown td {
		@apply border border-solid;
	}

	table.markdown th,
	table.markdown td {
		@apply px-2! py-1!;
	}

	.content p,
	.polls p,
	.poll-title p,
	.forums .list-inner p,
	.markdown p {
		font-size: inherit !important;
	}

	.polls p,
	.forums .list-inner p {
		@apply inline-block;
	}

	.polls p,
	.poll-title p,
	.forums .list-inner p,
	.markdown li p,
	.content p:last-child,
	.signature p:last-child,
	.markdown p:last-child {
		@apply mb-0!;
	}
}
