/**
 * CUTEPOL WordPress 适配样式。
 * 原站样式在 cutepol.css（1:1）；本文件仅补充 WP 环境所需：
 * 平滑滚动、缺失工具类、admin-bar 修正、Elementor 兼容、表单/评论。
 */

/* ---------- 平滑滚动与锚点偏移（与原站 anchor 行为一致） ---------- */
html { scroll-behavior: smooth; }
section[id], [id="top"] { scroll-margin-top: 5.5rem; }

/* ---------- 原站 CSS 未编译到的动态状态类 ---------- */
.pointer-events-auto { pointer-events: auto; }
.opacity-100 { opacity: 1; }

/* ---------- WP 管理栏修正（固定头部避让） ---------- */
body.admin-bar header.fixed { top: 32px; }
@media screen and (max-width: 782px) {
	body.admin-bar header.fixed { top: 46px; }
}

/* ---------- 图片与对齐 ---------- */
img { max-width: 100%; height: auto; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }

/* ---------- Elementor 兼容 ---------- */
/* HTML/短代码小工具内容紧贴区块（保持 1:1 布局），编辑器内同样生效 */
.elementor-widget-html, .elementor-widget-shortcode { margin-bottom: 0 !important; }
.elementor-widget-wrap > .elementor-widget-html:last-child { margin-bottom: 0 !important; }
.elementor-section.elementor-section-full_width .elementor-container { max-width: 100%; }
/* Elementor 画布/全宽模板下不重复背景 */
.elementor-page .site-content { background: transparent; }

/* ---------- 文章正文 / 评论基础排版 ---------- */
.cutepol-prose > * + * { margin-top: 1em; }
.cutepol-prose h2, .cutepol-prose h3 { font-family: var(--font-display); color: var(--color-ink, #2b2521); font-weight: 800; }
.cutepol-prose a { color: #c97722; text-decoration: underline; }
.cutepol-comments .comment-list { list-style: none; padding: 0; }
.cutepol-comments .comment-list .comment { background: #fff; border-radius: 1.5rem; padding: 1.25rem; box-shadow: 0 4px 24px rgba(90,60,20,0.07); margin-bottom: 1rem; }
.cutepol-comments .comment-list .children { list-style: none; }
.cutepol-comments .reply a { font-weight: 800; font-size: 0.8rem; color: #c97722; }

/* ---------- 表单基础（搜索/评论） ---------- */
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], textarea, select {
	font-family: inherit;
	border: 2px solid rgba(43,37,33,0.1);
	border-radius: 1rem;
	padding: 0.65rem 1rem;
	background: #fff;
	color: #2b2521;
	font-weight: 600;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: #e8963c; }
button, .button, input[type="submit"] { cursor: pointer; }

/* 屏幕阅读器 */
.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; }
.skip-link:focus { background: #2b2521; color: #fff; padding: .5rem 1rem; z-index: 100; position: fixed; top: 0; left: 0; border-radius: 0 0 .75rem 0; }

/* 键盘可达性 */
a:focus-visible, button:focus-visible { outline: 2px solid #e8963c; outline-offset: 2px; border-radius: 4px; }

/* 分页 */
.nav-links { display: flex; gap: 0.5rem; }
.nav-links .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; border-radius: 9999px; background: #fff; color: #5c534b; font-weight: 800; font-size: 0.875rem; box-shadow: 0 2px 12px rgba(90,60,20,0.08); }
.nav-links .page-numbers.current { background: #2b2521; color: #fff; }
