/* Editorial HTML written in the back-office. Loaded by the public layouts and by the editor, so
   what is written is what the page renders. Every class here is one of SmileIt\Content\Html\EditorStyles,
   the only list the server keeps on save. */

/* A side image floats beside the text: the container grows to hold it instead of letting it spill below. */
:is(.smile-content, .ck-content)::after {
	content: "";
	display: table;
	clear: both;
}

:is(.smile-content, .ck-content) table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

:is(.smile-content, .ck-content) th,
:is(.smile-content, .ck-content) td {
	border: 1px solid #ddd;
	padding: .5rem .75rem;
	text-align: left;
	vertical-align: top;
}

:is(.smile-content, .ck-content) th {
	background-color: #f4f8f4;
	color: #33672F;
}

:is(.smile-content, .ck-content) figure.table {
	overflow-x: auto;
	margin: 0 0 1rem;
}

:is(.smile-content, .ck-content) figure.image {
	margin: 0 0 1rem;
	text-align: center;
}

:is(.smile-content, .ck-content) img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

:is(.smile-content, .ck-content) figure.image-style-side {
	float: right;
	max-width: 50%;
	margin: 0 0 1rem 1.5rem;
}

:is(.smile-content, .ck-content) figcaption {
	font-size: .875rem;
	color: #6c757d;
	margin-top: .5rem;
}

:is(.smile-content, .ck-content) blockquote {
	border-left: 4px solid #6cbae8;
	padding-left: 1rem;
	font-style: italic;
}

h2.smile-accent {
	font-size: calc(1.3rem + .6vw);
	color: #33672F;
	margin-bottom: 1rem;
}

@media (min-width: 1200px) {
	h2.smile-accent {
		font-size: 1.75rem;
	}
}

h3.smile-subtitle {
	display: block;
	font-size: 1.25rem;
	color: #6cbae8;
	margin-bottom: .5rem;
}

p.smile-lead {
	line-height: 2;
	margin-bottom: 1.5rem;
}

p.smile-note {
	background-color: #eef7fc;
	border-left: 4px solid #6cbae8;
	border-radius: 8px;
	padding: 1rem 1.25rem;
}

/* The theme's .butn-style1 needs a nested span for its hover animation, which no editor produces:
   this is the same button for a bare link. */
a.smile-cta {
	display: inline-block;
	background-color: #33672F;
	border: 1px solid #33672F;
	border-radius: 8px;
	color: #fff;
	font-weight: 500;
	padding: 10px 30px;
	text-decoration: none;
	transition: background-color ease .35s, color ease .35s;
}

a.smile-cta:hover {
	background-color: #fff;
	color: #33672F;
}

a.smile-link {
	color: #6cbae8;
}

a.smile-link-green {
	color: #33672F;
}

ul.smile-checklist {
	list-style: none;
	padding-left: 0;
}

ul.smile-checklist > li {
	position: relative;
	padding-left: 1.75rem;
	margin-bottom: .5rem;
}

ul.smile-checklist > li::before {
	content: "\f00c";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	left: 0;
	color: #33672F;
}

/* A titled block with an icon on its left. The icon is drawn here rather than written in the HTML,
   since an editor cannot produce an empty <i>: the modifier class names it. */
div.smile-feature {
	position: relative;
	padding-left: 3rem;
	margin-bottom: 1.5rem;
}

div.smile-feature::before {
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 1.9rem;
	line-height: 1;
	position: absolute;
	left: 0;
	top: .25rem;
	color: #33672F;
}

div.smile-feature h3 {
	font-size: 1.25rem;
	color: #33672F;
	margin-bottom: .25rem;
}

div.smile-feature p {
	margin-bottom: 0;
}

div.smile-feature ul {
	margin: .5rem 0 0;
}

div.smile-feature--route::before { content: "\f4d7"; }
div.smile-feature--location-dot::before { content: "\f3c5"; }
div.smile-feature--people-group::before { content: "\e533"; }
div.smile-feature--building::before { content: "\f1ad"; }
div.smile-feature--clock::before { content: "\f017"; }
div.smile-feature--battery-full::before { content: "\f240"; }
div.smile-feature--hand-holding-heart::before { content: "\f4be"; }
div.smile-feature--leaf::before { content: "\f06c"; }
div.smile-feature--list-check::before { content: "\f0ae"; }
div.smile-feature--phone::before { content: "\f095"; }
div.smile-feature--repeat::before { content: "\f363"; }
div.smile-feature--user-check::before { content: "\f4fc"; }

/* A phone has no room for text beside an image: the side image takes the full width. */
@media (max-width: 575.98px) {
	:is(.smile-content, .ck-content) figure.image-style-side {
		float: none;
		max-width: 100%;
		margin: 0 0 1rem;
	}
}

/* A text ends where its container ends: the container owns the spacing below it. Last in the
   file, the figure selector as specific as the figure rules above, so it wins over their margin. */
:is(.smile-content, .ck-content) > :last-child,
:is(.smile-content, .ck-content) > figure:last-child {
	margin-bottom: 0;
}
