/* =====================================================================
   Ashley Richmond Accountants — styles for content written in the CMS
   editor (CKEditor). style.css, the original design, is unchanged; these
   rules only cover elements the editor can add — sub-headings, lists,
   images, tables, quotes and video embeds — in the site's own style.
   ===================================================================== */

/* service page description */
.service-content { margin-top: 1.25rem; }
.service-content > :first-child { margin-top: 0; }
.service-content p { line-height: 1.75; }

/* sub-headings inside editor content */
.rich-text h2, .rich-text h3, .rich-text h4,
.profile-body h2, .profile-body h3, .profile-body h4,
.article h3:not([class]), .article h4:not([class]) { margin-top: 2rem; margin-bottom: .75rem; }
.rich-text h2:not([class]) { font-size: 1.6rem; }
.rich-text h3:not([class]), .profile-body h3:not([class]) { font-size: 1.3rem; }
.rich-text h4:not([class]), .profile-body h4:not([class]) { font-size: 1.12rem; }
.article h3:not([class]) { font-size: 1.25rem; }
.article h4:not([class]) { font-size: 1.1rem; }

/* headings added in the editor on legal and news pages match the existing
   "h4 mt-4" headings of those pages */
.article h2:not([class]) { font-size: calc(1.275rem + .3vw); margin-top: 1.5rem; margin-bottom: .5rem; }
@media (min-width: 1200px) { .article h2:not([class]) { font-size: 1.5rem; } }

/* bulleted lists use the site's gold tick, like .check-list */
.rich-text ul, .article ul, .profile-body ul { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.rich-text ul li, .article ul li, .profile-body ul li { position: relative; padding-left: 2rem; margin-bottom: .7rem; }
.rich-text ul li::before, .article ul li::before, .profile-body ul li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .1em; color: var(--gold-500); font-size: 1.1rem; }
.rich-text ol, .article ol, .profile-body ol { padding-left: 1.4rem; margin: 0 0 1.4rem; }
.rich-text ol li, .article ol li, .profile-body ol li { margin-bottom: .6rem; padding-left: .3rem; }
.rich-text ol li::marker, .article ol li::marker, .profile-body ol li::marker { color: var(--wine-800); font-weight: 600; }
.article li { font-size: 1.1rem; line-height: 1.7; }

/* quotes */
.rich-text blockquote, .article blockquote, .profile-body blockquote { border-left: 3px solid var(--gold-500); padding: .2rem 0 .2rem 1.2rem; margin: 1.8rem 0; font-family: var(--ff-display); font-size: 1.22rem; line-height: 1.5; color: var(--wine-800); }
.rich-text blockquote p, .article blockquote p { font-size: inherit; margin-bottom: .6rem; }

/* images (CKEditor image styles) */
.rich-text figure, .article figure, .profile-body figure { margin: 1.8rem 0; }
.rich-text img, .article img, .profile-body img { border-radius: var(--r-md); height: auto; max-width: 100%; }
.rich-text figure.image, .article figure.image, .profile-body figure.image { display: table; clear: both; margin-left: auto; margin-right: auto; }
.rich-text figure.image img, .article figure.image img, .profile-body figure.image img { display: block; margin: 0 auto; }
figure.image.image_resized { max-width: 100%; display: block; box-sizing: border-box; }
figure.image.image_resized img { width: 100%; }
figure.image > figcaption { display: table-caption; caption-side: bottom; color: var(--slate); font-size: .88rem; padding-top: .6rem; text-align: center; }
.image-style-side, .image-style-align-right { float: right; margin-left: 1.5rem !important; max-width: 50%; }
.image-style-align-left { float: left; margin-right: 1.5rem !important; max-width: 50%; }
.image-style-block-align-left { margin-left: 0 !important; }
.image-style-block-align-right { margin-right: 0 !important; }
img.image_resized { height: auto; }
.rich-text::after, .article::after, .profile-body::after { content: ""; display: table; clear: both; }
@media (max-width: 575.98px) { .image-style-side, .image-style-align-right, .image-style-align-left { float: none; max-width: 100%; margin-left: 0 !important; margin-right: 0 !important; } }

/* tables */
.rich-text figure.table, .article figure.table { display: block; overflow-x: auto; }
.rich-text table, .article table, .profile-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .97rem; background: #fff; }
.rich-text th, .rich-text td, .article th, .article td, .profile-body th, .profile-body td { border: 1px solid var(--line); padding: .65rem .85rem; vertical-align: top; }
.rich-text th, .article th, .profile-body th { background: var(--mist); color: var(--wine-800); font-weight: 600; text-align: left; }
.rich-text td p, .article td p { font-size: inherit; margin: 0; }

/* video embeds (YouTube, Vimeo …) */
.rich-text figure.media, .article figure.media { margin: 1.8rem 0; }
.rich-text figure.media iframe, .article figure.media iframe { border-radius: var(--r-md); }

/* horizontal rule */
.rich-text hr, .article hr { border: 0; height: 1px; background: var(--line); opacity: 1; margin: 2.2rem 0; }
