/*
 * Blog, FAQ and Terms pages in every panel theme (loaded only on those pages by contentPageInject(),
 * int/scriptFunc/pagecontent.php).
 * The text, images and tables there are written by the panel owner in the admin editor, so the theme
 * cannot know their size: a wide picture or table pushed the page sideways on phones, long links and
 * one-word titles ran out of their card, and some themes removed list bullets and table spacing.
 * Colours are left to the theme (everything inherits), only size and spacing are set here.
 */

/* long words, links and titles wrap instead of running out of their box */
.pc-prose, h1, h2, h3, h4, h5, .d-card-head { overflow-wrap: anywhere; word-break: normal; }

.pc-prose { line-height: 1.7; }
.pc-prose > :first-child { margin-top: 0; }
.pc-prose > :last-child { margin-bottom: 0; }
.pc-prose p { margin: 0 0 1em; }
.pc-prose h1, .pc-prose h2, .pc-prose h3, .pc-prose h4, .pc-prose h5, .pc-prose h6 { margin: 1.2em 0 .5em; line-height: 1.3; color: inherit; }
.pc-prose h1 { font-size: 1.75em; } .pc-prose h2 { font-size: 1.45em; } .pc-prose h3 { font-size: 1.2em; } .pc-prose h4 { font-size: 1.05em; }

/* pictures and videos from the editor never get wider than the text column */
.pc-prose img, .pc-prose video, .pc-prose svg, .pc-prose canvas { max-width: 100% !important; height: auto !important; }
.pc-prose iframe, .pc-prose embed, .pc-prose object { max-width: 100% !important; }
.pc-prose img { border-radius: 8px; margin: .4em 0 1em; }
.pc-prose p > img:only-child { margin: 0; }

/* lists: some themes remove the bullets and the indent everywhere */
.pc-prose ul, .pc-prose ol { margin: 0 0 1em; padding-inline-start: 1.5em; }
.pc-prose ul { list-style: disc outside; }
.pc-prose ol { list-style: decimal outside; }
.pc-prose li { display: list-item; margin: .3em 0; padding: 0; }
.pc-prose li::before { content: none; }

/* tables scroll inside their own box on small screens */
.pc-prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 1em; -webkit-overflow-scrolling: touch; }
.pc-prose th, .pc-prose td { padding: 8px 14px; border: 1px solid rgba(128, 128, 128, .32); text-align: start; vertical-align: top; }
.pc-prose th { font-weight: 600; background: rgba(128, 128, 128, .1); }

.pc-prose blockquote { margin: 0 0 1em; padding: .7em 1.1em; border-inline-start: 4px solid rgba(128, 128, 128, .5); background: rgba(128, 128, 128, .08); border-radius: 0 8px 8px 0; font-style: italic; }
[dir=rtl] .pc-prose blockquote { border-radius: 8px 0 0 8px; }
.pc-prose a { text-decoration: underline; text-underline-offset: 2px; }
.pc-prose pre, .pc-prose code { white-space: pre-wrap; overflow-wrap: anywhere; }
.pc-prose hr { border: 0; border-top: 1px solid rgba(128, 128, 128, .3); margin: 1.5em 0; }

/* blog list: a tall picture filled the whole screen; pictures share one shape and keep their middle */
.pc-cover { display: block; width: 100%; max-width: 100% !important; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
/* blog post: the picture at the top is shown whole, but never taller than most of the screen */
.pc-hero { display: block; max-width: 100% !important; width: auto; height: auto; max-height: min(70vh, 560px); margin: 0 auto 1.2em; border-radius: 10px; object-fit: contain; }
.pc-date { display: block; font-size: .85em; opacity: .75; margin: 0 0 .6em; }

/* blog list and post (the newer themes use these; the older ones keep their own card markup) */
.pc-post__media { display: block; margin: 0 0 1em; }
/* sizes win over the theme's own h1 / h2 sizes, which made post titles very large on phones in some themes */
.pc-post .pc-post__title { font-size: 22px !important; line-height: 1.3 !important; margin: 0 0 .3em !important; font-weight: 700; letter-spacing: normal; text-transform: none; }
.pc-post .pc-post__title--page { font-size: 30px !important; }
.pc-post__title a { color: inherit; text-decoration: none; }
.pc-post__title a:hover, .pc-post__title a:focus { text-decoration: underline; }
.pc-post__excerpt { margin: 0 0 1.1em; line-height: 1.6; opacity: .85; }
.pc-empty { margin: 0 0 1em; line-height: 1.6; }
@media (max-width: 575px) { .pc-post .pc-post__title { font-size: 19px !important; } .pc-post .pc-post__title--page { font-size: 24px !important; } }

/* blog list: picture beside the text on wide screens, above it on phones */
.pc-post--sep { padding-bottom: 1.5em; margin-bottom: 1.5em; border-bottom: 1px solid rgba(128, 128, 128, .25); }
.pc-post__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
@media (min-width: 640px) {
  .pc-post__row { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .pc-post__row--text { grid-template-columns: minmax(0, 1fr); }
  .pc-post__row .pc-post__media { margin: 0; }
}
.pc-post__text > :last-child { margin-bottom: 0; }
.pc-back { margin: 1.5em 0 0; }
/* page title for themes whose header does not show one (united) */
.pc-page-title { font-size: 28px; font-weight: 700; line-height: 1.25; margin: 26px 0 16px; }
@media (max-width: 575px) { .pc-page-title { font-size: 24px; margin-top: 18px; } }
/* Simplify themes colour every link with ".body a", which also turned the text of link buttons blue on the blue button */
.body .pc-post a.btn-primary, .body .pc-back a.btn-primary { color: #fff; }
/* some themes stretch every .btn across the box; the Read / Back buttons keep their natural width */
.pc-post__text .btn, .pc-back .btn, .pc-empty + .btn { width: auto; display: inline-flex; align-items: center; justify-content: center; }
