/**
 * Written fields rendered as real HTML.
 *
 * The three fatwa fields — and the extra description on the other types — are
 * authored in a full editor, so what lands here is whatever the author built:
 * paragraphs, headings, lists, quotations, tables, images. The design carries
 * only inherited typography (size, colour), so everything structural is set
 * here, in the design's own rhythm rather than the browser's defaults.
 *
 * Colours are expressed against currentColor so a field keeps working if the
 * design's palette is re-cut, and the wrapper class is doubled throughout:
 * Elementor's own reset (`.elementor img{border-radius:0}` and friends) loads
 * after plugin styles and matches at the same weight otherwise.
 */

.as-rich.as-rich > :first-child {
	margin-top: 0;
}

.as-rich.as-rich > :last-child {
	margin-bottom: 0;
}

.as-rich.as-rich p {
	margin: 0 0 1em;
}

.as-rich.as-rich h2,
.as-rich.as-rich h3,
.as-rich.as-rich h4,
.as-rich.as-rich h5 {
	margin: 1.7em 0 .6em;
	font-weight: 700;
	line-height: 1.4;
}

.as-rich.as-rich h2 { font-size: 1.35em; }
.as-rich.as-rich h3 { font-size: 1.2em; }
.as-rich.as-rich h4 { font-size: 1.08em; }
.as-rich.as-rich h5 { font-size: 1em; }

.as-rich.as-rich ul,
.as-rich.as-rich ol {
	margin: 0 0 1em;
	padding-inline-start: 1.6em;
}

.as-rich.as-rich ul { list-style: disc; }
.as-rich.as-rich ol { list-style: decimal; }
.as-rich.as-rich ul ul { list-style: circle; }

.as-rich.as-rich li {
	margin: 0 0 .4em;
}

.as-rich.as-rich li > ul,
.as-rich.as-rich li > ol {
	margin-top: .4em;
}

.as-rich.as-rich blockquote {
	margin: 1.4em 0;
	padding: .2em 1em;
	border-inline-start: 3px solid currentColor;
	opacity: .85;
}

.as-rich.as-rich blockquote p:last-child {
	margin-bottom: 0;
}

.as-rich.as-rich a {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.as-rich.as-rich hr {
	margin: 1.8em 0;
	border: 0;
	border-top: 1px solid currentColor;
	opacity: .18;
}

.as-rich.as-rich pre {
	margin: 1.2em 0;
	padding: .9em 1.1em;
	overflow-x: auto;
	border-radius: 8px;
	background: rgba(0, 0, 0, .05);
	font-size: .95em;
	direction: ltr;
	text-align: left;
}

.as-rich.as-rich code {
	padding: .1em .35em;
	border-radius: 4px;
	background: rgba(0, 0, 0, .05);
	font-size: .95em;
}

.as-rich.as-rich pre code {
	padding: 0;
	background: none;
}

/* ------------------------------------------------------------------ media */

.as-rich.as-rich img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.as-rich.as-rich figure,
.as-rich.as-rich .wp-caption {
	max-width: 100%;
	margin: 1.6em 0;
}

.as-rich.as-rich figcaption,
.as-rich.as-rich .wp-caption-text {
	margin-top: .6em;
	font-size: .85em;
	opacity: .75;
}

.as-rich.as-rich .aligncenter,
.as-rich.as-rich figure.aligncenter {
	display: block;
	margin-inline: auto;
	text-align: center;
}

.as-rich.as-rich .alignright {
	float: right;
	margin: .4em 0 1em 1.4em;
}

.as-rich.as-rich .alignleft {
	float: left;
	margin: .4em 1.4em 1em 0;
}

.as-rich.as-rich .alignnone,
.as-rich.as-rich .size-full {
	height: auto;
}

/* Floats must not escape the field and drag the next section up with them. */
.as-rich.as-rich::after {
	content: "";
	display: table;
	clear: both;
}

@media (max-width: 600px) {
	.as-rich.as-rich .alignright,
	.as-rich.as-rich .alignleft {
		float: none;
		display: block;
		margin: 1.2em auto;
	}
}

/* ----------------------------------------------------------------- tables */

/* A table wider than the column scrolls inside its own box rather than
   forcing the whole page sideways. */
.as-rich.as-rich .as-table-scroll {
	margin: 1.5em 0;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.as-rich.as-rich table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: .96em;
}

.as-rich.as-rich .as-table-scroll > table {
	min-width: 26em;
}

.as-rich.as-rich th,
.as-rich.as-rich td {
	padding: .6em .8em;
	border: 1px solid rgba(0, 0, 0, .16);
	text-align: start;
	vertical-align: top;
}

.as-rich.as-rich thead th,
.as-rich.as-rich tr:first-child th {
	background: rgba(0, 0, 0, .045);
	font-weight: 700;
}

.as-rich.as-rich tbody tr:nth-child(even) td {
	background: rgba(0, 0, 0, .02);
}

.as-rich.as-rich caption {
	margin-bottom: .6em;
	font-size: .88em;
	opacity: .75;
	caption-side: top;
	text-align: start;
}
