/**
 * Типография на съдържанието от the_content() — споделен източник за
 * фронтенда (.article-body в single/page шаблоните) и за Gutenberg
 * canvas-а (.editor-styles-wrapper), за да е визуализацията в редактора
 * същата като на живия сайт.
 *
 * Зарежда се на фронтенда през wp_enqueue_style и в редактора през
 * add_editor_style (вж. newstoday_setup_editor_styles).
 */

/* Разстояние между блоковете. */
.article-body > * + *,
.editor-styles-wrapper .wp-block-post-content > * + * {
	margin-top: 1.25rem;
}

/* Заглавия. Шрифтът идва от настройка „Шрифт за заглавия“ (--font-serif). */
.article-body h2,
.editor-styles-wrapper .wp-block-post-content h2 {
	margin-top: 2.5rem;
	font-family: var(--font-serif);
	font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.2;
	scroll-margin-top: 6rem;
}

.article-body h3,
.editor-styles-wrapper .wp-block-post-content h3 {
	margin-top: 2rem;
	font-family: var(--font-serif);
	font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
	font-weight: 800;
	line-height: 1.3;
	scroll-margin-top: 6rem;
}

/* Списъци. */
.article-body ul,
.article-body ol,
.editor-styles-wrapper .wp-block-post-content ul,
.editor-styles-wrapper .wp-block-post-content ol {
	padding-left: 1.5rem;
}

.article-body ul,
.editor-styles-wrapper .wp-block-post-content ul {
	list-style: disc;
}

.article-body ol,
.editor-styles-wrapper .wp-block-post-content ol {
	list-style: decimal;
}

.article-body li + li,
.editor-styles-wrapper .wp-block-post-content li + li {
	margin-top: 0.5rem;
}

/* Линкове. */
.article-body a,
.editor-styles-wrapper .wp-block-post-content a {
	color: var(--color-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.article-body a:hover,
.editor-styles-wrapper .wp-block-post-content a:hover {
	color: var(--color-brand-dark);
}

/* Цитати. */
.article-body blockquote,
.editor-styles-wrapper .wp-block-post-content blockquote {
	margin-top: 2rem;
	margin-bottom: 2rem;
	border-left: 4px solid var(--color-brand);
	border-radius: 0 1rem 1rem 0;
	background: color-mix(in srgb, var(--color-brand) 6%, #fff);
	padding: 1.25rem 1.5rem;
	font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
	font-weight: 600;
	line-height: 1.5;
}

/* Изображения и подписи. */
.article-body img,
.editor-styles-wrapper .wp-block-post-content img {
	border-radius: 1rem;
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}

.article-body figcaption,
.editor-styles-wrapper .wp-block-post-content figcaption {
	margin-top: -0.75rem;
	text-align: center;
	font-size: 0.875rem;
	color: #94a3b8;
}

/* Код. */
.article-body pre,
.editor-styles-wrapper .wp-block-post-content pre {
	overflow-x: auto;
	border-radius: 1rem;
	background: #0f172a;
	color: #e2e8f0;
	padding: 1rem 1.25rem;
	font-size: 0.875rem;
}

.article-body code,
.editor-styles-wrapper .wp-block-post-content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
}

.article-body :not(pre) > code,
.editor-styles-wrapper .wp-block-post-content :not(pre) > code {
	border-radius: 0.375rem;
	background: #f1f5f9;
	padding: 0.1rem 0.35rem;
}

/* Таблици. */
.article-body table,
.editor-styles-wrapper .wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
}

.article-body th,
.article-body td,
.editor-styles-wrapper .wp-block-post-content th,
.editor-styles-wrapper .wp-block-post-content td {
	border: 1px solid #e2e8f0;
	padding: 0.6rem 0.75rem;
	text-align: left;
}
