@import "@automattic/typography/styles/variables";
@import "calypso/assets/stylesheets/shared/mixins/breakpoints";

.support-article-dialog__story-content {
	color: var(--color-neutral-70);
	font-size: $font-body;
	line-height: 1.7;
	margin: 0;
	padding-top: 16px;
	position: relative;
	overflow-wrap: break-word;
	word-wrap: break-word;

	h1 {
		font-size: $font-title-large;
		font-weight: 600;
		margin: 0 0 16px;
	}

	h2 {
		font-size: $font-title-medium;
		font-weight: 600;
		margin: 0 0 8px;
	}

	h3 {
		font-size: $font-title-small;
		font-weight: 600;
		margin: 0 0 8px;
	}

	h4 {
		font-size: $font-title-small;
		font-weight: 600;
		margin: 0 0 8px;
	}

	h5 {
		font-weight: 600;
	}

	p,
	> div {
		margin: 0 0 24px;

		&:last-child {
			margin-bottom: 0;
		}
	}

	blockquote {
		padding: 0 24px 0 32px;
		margin: 16px 0 32px;
		border-left: 3px solid var(--color-neutral-0);
		color: var(--color-neutral-50);
		font-weight: 400;
		background: transparent;
	}

	hr {
		background: var(--color-neutral-0);
		margin: 24px 0;
	}

	img {
		max-width: 100%;
		height: auto;
		display: inline;
		margin: auto;
		margin-bottom: 12px;
	}

	figure img {
		display: inherit;
		margin-bottom: 0;
	}

	audio {
		display: block;
		width: 100%;
		margin: 24px auto;
	}

	iframe[class^="twitter-"],
	iframe[class^="instagram-"],
	.fb_iframe_widget {
		display: block;
		margin: 24px auto !important;
	}

	@include breakpoint-deprecated( ">660px" ) {
		.alignleft {
			max-width: 100%;
			float: left;
			margin-top: 12px;
			margin-bottom: 12px;
			margin-right: 32px;
		}

		.alignright {
			max-width: 100%;
			float: right;
			margin-top: 12px;
			margin-bottom: 12px;
			margin-left: 32px;
		}
	}

	@include breakpoint-deprecated( "<660px" ) {
		.alignleft,
		.alignright {
			clear: both;
			margin-top: 24px;
			margin-bottom: 24px;
		}
	}

	.aligncenter {
		clear: both;
		display: block;
		margin-top: 24px;
		margin-bottom: 24px;
	}

	.wp-caption.alignnone {
		clear: both;
		display: block;
		margin-top: 24px;
		margin-bottom: 24px;
	}

	.wp-caption {
		position: relative;
		max-width: 100%;

		&.alignright {
			float: right;
		}

		&.alignleft {
			float: left;
		}

		&.alignright,
		&.alignleft {
			max-width: 100%;

			@include breakpoint-deprecated( ">660px" ) {
				max-width: 50%;
			}

			img.alignright,
			img.alignleft {
				float: none;
			}
		}

		img {
			display: block;
			margin: 0 auto;
		}
	}

	.wp-caption-text,
	figure figcaption,
	figure .caption,
	.wp-caption .wp-media-credit {
		padding: 12px;
		margin: 0;
		font-size: $font-body-small;
		text-align: center;
		color: var(--color-neutral-40);
	}

	// placeholder for videopress videos
	.video-plh-notice {
		position: relative;
		margin-bottom: 24px;
		padding: 11px 24px;
		border-radius: 2px;
		background: var(--color-neutral-0);
		box-sizing: border-box;
		font-size: $font-body-small;
		line-height: 1.4285;
		animation: appear 0.3s ease-in-out;

		@include breakpoint-deprecated( ">660px" ) {
			padding: 13px 48px;
			font-size: inherit;
		}
	}

	sup,
	sub {
		vertical-align: baseline;
		position: relative;
		font-size: $font-body-extra-small;
	}

	sup {
		top: -0.4em;
	}

	sub {
		bottom: -0.2em;
	}

	table th,
	table td {
		padding: 10px;
	}

	img:first-child {
		margin-top: 0;
	}
}
