/*
 Theme Name:   子比主题-子主题
 Theme URI:    https://waytometa.com
 Description:  元界深掘子主题：后台文章拖拽排序，前台按自定义顺序/发布时间显示，父主题更新不丢失定制。
 Author:       元界深掘
 Template:     zibll
 Version:      1.0.8
 Text Domain:  zibll-child
*/

/* 去掉文章正文 h1–h4 标题下主题色短横线 */
.wp-posts-content > h1:not([class]),
.wp-posts-content > h2:not([class]),
.wp-posts-content > h3:not([class]),
.wp-posts-content > h4:not([class]),
.wp-posts-content > h1.wp-block-heading,
.wp-posts-content > h2.wp-block-heading,
.wp-posts-content > h3.wp-block-heading,
.wp-posts-content > h4.wp-block-heading {
  padding-bottom: 0;
}

.wp-posts-content > h1:not([class]):before,
.wp-posts-content > h2:not([class]):before,
.wp-posts-content > h3:not([class]):before,
.wp-posts-content > h4:not([class]):before,
.wp-posts-content > h1.wp-block-heading:before,
.wp-posts-content > h2.wp-block-heading:before,
.wp-posts-content > h3.wp-block-heading:before,
.wp-posts-content > h4.wp-block-heading:before {
  display: none !important;
  content: none !important;
}

/* 付费卡片：隐藏与文章标题重复的商品标题 */
.pay-box:not(.paid-box) .pay-title {
  display: none !important;
}

/* 右侧整列：垂直居中 + 内容水平居中 */
.pay-box:not(.paid-box) .pay-flexbox > .flex-auto-h.flex.xx {
  justify-content: center;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.pay-box:not(.paid-box) .pay-flexbox > .flex-auto-h > .mt6 {
  margin-top: 0;
  font-size: 15px;
}

/* 积分价格放大 */
.pay-box:not(.paid-box) .price-box {
  font-size: 18px;
}

.pay-box:not(.paid-box) .price-box .em3x {
  font-size: 2.2em;
}

/* 黄金/钻石会员价徽章放大 */
.pay-box:not(.paid-box) .vip-price {
  font-size: 13px;
  padding: 6px 16px;
}

.pay-box:not(.paid-box) .vip-price .em12,
.pay-box:not(.paid-box) .vip-price-text {
  font-size: 1.15em;
}

/* 立即购买：居中 + 变大 */
.pay-box:not(.paid-box) .pay-flexbox > .flex-auto-h > .text-right {
  text-align: center !important;
  width: 100%;
  margin-top: 10px;
}

.pay-box:not(.paid-box) .cashier-link,
.pay-box:not(.paid-box) .initiate-pay {
  padding: 0.75em 2.4em;
  font-size: 16px;
  min-width: 160px;
}

/* 正文 code 标签：跟随主题色，并允许换行折行 */
.wp-posts-content code:not([class]) {
  color: var(--focus-color);
  background-color: var(--focus-color-opacity1);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  display: inline-block;
  box-sizing: border-box;
  vertical-align: top;
  line-height: 1.65;
}

.wp-posts-content pre,
.wp-posts-content .wp-block-code code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 整段只有 code 的段落：收紧间距，避免每行一块灰底拉得很开 */
.wp-posts-content p:has(> code:not([class]):only-child) {
  margin-top: 0;
  margin-bottom: 4px;
}

.wp-posts-content p:has(> code:not([class]):only-child) > code:not([class]) {
  display: block;
  width: 100%;
  margin: 0;
}

/* 文章内代码高亮：取消数字/关键字等自动分色 */
.wp-posts-content .enlighter-default .enlighter span {
  color: inherit !important;
  font-style: inherit !important;
  font-weight: inherit !important;
  background: transparent !important;
}
