/**
 * TTTheme Framework — 底座核心样式
 * @package TTTHEME
 * @since 1.0.0
 */

/* ── 标题字重基线(设计规则): h1-h6 一律不加粗, 需要强调须在主题层特别指定 ── */
h1, h2, h3, h4, h5, h6 { font-weight: 400; }

/* ── 全局圆角 ── */
.wp-block-button__link   { border-radius: var(--tttheme-radius, 6px) !important; }
.wp-block-image img      { border-radius: var(--tttheme-radius, 6px); }
.wp-block-search__input  { border-radius: var(--tttheme-radius, 6px); }

/* ── 屏幕阅读器专用（视觉隐藏但可读屏） ── */
.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;
    width: 1px;
    word-wrap: normal !important;
}

/* ═══════════════════════════════════════════
   暗色模式
   设计令牌（class-design-tokens.php）动态注入颜色变量，
   此处仅保留组件级暗色微调。
   ═══════════════════════════════════════════ */

html.tttheme-dark { color-scheme: dark; }

/* 暗色组件微调 */
html.tttheme-dark .wp-block-code,
html.tttheme-dark .wp-block-preformatted {
    background: var(--tttheme-color-card-bg) !important;
    color: var(--tttheme-color-text);
}
html.tttheme-dark .wp-block-table th {
    background: var(--tttheme-color-card-bg);
}
html.tttheme-dark .wp-block-separator {
    border-color: var(--tttheme-color-border);
}
html.tttheme-dark .wp-block-quote {
    border-left-color: var(--tttheme-color-accent);
}
/* ═══════════════════════════════════════════
   瀑布流布局
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   底座增强（原 ttb-visual.css / editorial.css 底座段归并）
   ═══════════════════════════════════════════ */

/* ── visual §1 选中色/滚动条 ── */
/* 更柔和的选中色 */
::selection {
    background: var(--wp--preset--color--primary, #1a1a1a);
    color: var(--wp--preset--color--background, #faf8f5);
}

/* 滚动条（Firefox）*/
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--wp--preset--color--border, #e8e4df) transparent;
}

/* 滚动条（Webkit）— 极简风格 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--border, #e8e4df);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--wp--preset--color--muted, #8a8a8a);
}

/* ── visual §11 暗色滚动条 ── */
/* 暗色 scrollbar */
html.tttheme-dark {
    scrollbar-color: var(--wp--preset--color--border, #2a2826) transparent;
}
html.tttheme-dark ::-webkit-scrollbar-thumb {
    background: var(--wp--preset--color--border, #2a2826);
}
html.tttheme-dark ::-webkit-scrollbar-thumb:hover {
    background: var(--wp--preset--color--muted, #8a8480);
}

/* ── visual §13 无障碍(reduced-motion) ── */
/* ═══════════════════════════════════════════════
   13. 无障碍
   ═══════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .wp-block-post-template.is-layout-grid .wp-block-post:hover {
        transform: none;
    }
    .wp-block-post-featured-image img:hover {
        transform: none;
    }
}

/* ── editorial 无障碍(reduced-motion组件行) ── */
@media (prefers-reduced-motion: reduce) {
    .entry-content a,
    .wp-block-post-content a { transition: none; }
}

/* ═══════════════════════════════════════════
   快捷预设圆点（后台）
   ═══════════════════════════════════════════ */

/* ── editorial 打印样式 ── */
/* ═══════════════════════════════════════════
   打印样式
   ═══════════════════════════════════════════ */
@media print {
    header, footer, .wp-block-comments, .wp-block-separator {
        display: none !important;
    }
    body {
        font-size: 12pt;
        line-height: 1.6;
        color: #000;
        background: #fff;
    }
    a {
        color: #000;
        text-decoration: underline;
    }
    .entry-content {
        max-width: 100%;
    }
}
