/**
 * Gutenberg 区块基础样式
 *
 * 让区块编辑器内容在经典主题下保持合理的排版与对齐，
 * 仅提供最小必要样式，不覆盖主题既有外观。
 */

.context > *,
.post-entry > *,
.entry-content > * {
	max-width: 100%;
	box-sizing: border-box;
}

/* 通用区块间距 */
.context .wp-block,
.post-entry .wp-block {
	margin-top: 0;
	margin-bottom: 1.2em;
}

/* 图片 / 图注 */
.wp-block-image {
	margin: 0 0 1.2em;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}

.wp-block-image figcaption {
	color: #888;
	font-size: 13px;
	text-align: center;
	margin-top: 6px;
}

/* 引用 */
.wp-block-quote {
	margin: 1.5em 0;
	padding: 1em 1.5em;
	border-left: 4px solid #3d98d6;
	background: #f7f9fb;
}

.wp-block-quote cite {
	display: block;
	margin-top: .6em;
	color: #888;
	font-size: 13px;
	font-style: normal;
}

/* 分隔线 */
.wp-block-separator {
	border: 0;
	border-top: 1px solid #e6e6e6;
	margin: 2em auto;
	max-width: 100%;
}

.wp-block-separator.is-style-wide {
	width: 100%;
}

/* 表格 */
.wp-block-table {
	overflow-x: auto;
}

.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid #e6e6e6;
	padding: 8px 10px;
	text-align: left;
}

.wp-block-table th {
	background: #f7f7f7;
	font-weight: 600;
}

/* 多栏 */
.wp-block-columns {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
}

.wp-block-column {
	flex: 1 1 0;
	min-width: 0;
}

@media screen and (max-width: 780px) {
	.wp-block-columns {
		display: block;
	}
	.wp-block-column {
		margin-bottom: 1.2em;
	}
}

/* 按钮 */
.wp-block-button__link {
	display: inline-block;
	padding: 10px 18px;
	background: #3d98d6;
	color: #fff;
	border-radius: 3px;
	text-decoration: none;
}

.wp-block-button__link:hover {
	background: #2f7fb5;
	color: #fff;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 1px solid #3d98d6;
	color: #3d98d6;
}

/* 列表 */
.wp-block-list,
.context ul.wp-block-list {
	list-style: disc;
	padding-left: 1.6em;
}

.context ul.wp-block-list li,
.context ol.wp-block-list li {
	list-style: inherit;
}

/* 嵌入内容自适应 */
.wp-block-embed,
.wp-block-video,
.wp-block-audio {
	margin: 0 0 1.2em;
}

.wp-block-embed__wrapper,
.wp-block-embed iframe,
.wp-block-video video {
	max-width: 100%;
}

.wp-block-embed figcaption {
	color: #888;
	font-size: 13px;
	text-align: center;
}

/* 代码 */
.wp-block-code,
.wp-block-preformatted {
	background: #f6f8fa;
	border: 1px solid #e6e6e6;
	border-radius: 3px;
	padding: 12px 14px;
	overflow-x: auto;
}

.wp-block-code code {
	background: none;
	padding: 0;
	margin: 0;
}

/* 对齐选项 */
.alignwide {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

.alignfull {
	max-width: 100%;
	width: 100%;
}

.alignleft {
	float: left;
	margin: 0 1.2em 1em 0;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.2em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* 封面 / 分组 */
.wp-block-cover {
	position: relative;
	background-size: cover;
	background-position: center;
	min-height: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-block-cover__inner-container {
	width: 100%;
	padding: 2em;
	color: #fff;
}

.wp-block-group {
	overflow: hidden;
}

/* 最新文章 / 分类列表等 */
.wp-block-latest-posts,
.wp-block-archives,
.wp-block-categories {
	list-style: none;
	padding-left: 0;
}

.wp-block-latest-posts li,
.wp-block-archives li,
.wp-block-categories li {
	padding: 6px 0;
	border-bottom: 1px dashed #eee;
}

/* 搜索框 */
.wp-block-search__input {
	border: 1px solid #ddd;
	padding: 8px 10px;
}

.wp-block-search__button {
	margin-left: 6px;
}

/* 小工具区块 */
.widget .wp-block-group__inner-container > *:last-child {
	margin-bottom: 0;
}
