/*
Theme Name: CtouyPHP
Theme URI: https://php.ctouy.com
Author: 穿透云
Author URI: https://php.ctouy.com
Description: CtouyPHP 产品发布站主题。首页横幅 + 八宫格特性，另有功能、价格、下载、常见问题、用户手册、购买与咨询、更新日志、授权查询等模板，前端用 UIkit 3，样式与 CtouyPHP 官网同一份。
Version: 2.10.13
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ctouyphp
Tags: custom-logo, custom-menu, featured-images, translation-ready, full-width-template
*/

/*
 * 主题的视觉样式全部在 assets/css/site.css 里 —— 与 CtouyPHP 官网同一份文件，
 * 换肤只改那一处。这里只放 WordPress 必需的主题头，加上站点样式没覆盖到的
 * 一小段 WordPress 兼容补丁（对齐类、图片说明、后台工具条留白、无障碍隐藏）。
 */

/*
 * ---------- WordPress 后台工具条：固定头部不要被压住 ----------
 * 前台的工具条已经由 inc/setup.php 里的 show_admin_bar 过滤器关掉，所以这两条
 * 平时用不上；留作兜底 —— 万一哪个子主题或插件把工具条放回来，固定头部不会
 * 被压在它下面。
 */
body.admin-bar .ct-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .ct-header {
    top: 46px;
  }
}

/* ---------- 无障碍：仅供读屏的文本 ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
  clip: auto !important;
  clip-path: none;
  color: #1f2a44;
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 8px;
  line-height: normal;
  padding: 14px 22px;
  text-decoration: none;
  top: 8px;
  width: auto;
  z-index: 100000;
}

/* ---------- 编辑器内容的对齐类（站内正文用得到） ---------- */
.ct-body .alignleft,
.ct-article .alignleft {
  float: left;
  margin: .4rem 1.4rem 1rem 0;
}

.ct-body .alignright,
.ct-article .alignright {
  float: right;
  margin: .4rem 0 1rem 1.4rem;
}

.ct-body .aligncenter,
.ct-article .aligncenter {
  display: block;
  margin: 1.2rem auto;
}

.ct-body .wp-caption,
.ct-article .wp-caption {
  max-width: 100%;
}

.ct-body .wp-caption-text,
.ct-article .wp-caption-text {
  color: var(--ct-muted, #6b7688);
  font-size: .86rem;
  margin-top: .4rem;
  text-align: center;
}

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

.ct-body .wp-block-quote,
.ct-article .wp-block-quote {
  border-left: 3px solid var(--ct-line, #d8dfea);
  margin: 1.2rem 0;
  padding-left: 1.1rem;
}

/* ---------- 表单提交后的提示条 ---------- */
.ct-form-ok {
  background: #eef9f1;
  border: 1px solid #b9e3c6;
  border-radius: 10px;
  color: #1c5c33;
  margin-bottom: 1.2rem;
  padding: 1rem 1.2rem;
}

.ct-form-err {
  background: #fdf1f1;
  border: 1px solid #f0c2c2;
  border-radius: 10px;
  color: #8a2626;
  margin-bottom: 1.2rem;
  padding: 1rem 1.2rem;
}

.ct-form-err ul {
  margin: .5rem 0 0;
  padding-left: 1.2rem;
}

/* ---------- 侧栏小工具（WordPress 小工具区） ---------- */
.ct-widget {
  background: #fff;
  border: 1px solid var(--ct-line, #e3e8f0);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  padding: 1.4rem 1.5rem;
}

.ct-widget > h3,
.ct-widget > h2 {
  font-size: 1.02rem;
  margin: 0 0 .8rem;
}

.ct-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ct-widget li {
  border-top: 1px solid var(--ct-line, #eef1f6);
  padding: .55rem 0;
}

.ct-widget li:first-child {
  border-top: 0;
}

/* ---------- 下载页：文件缺失时的说明块 ---------- */
.ct-dl-missing code {
  background: #f2f5fa;
  border-radius: 4px;
  padding: .1rem .35rem;
}
