/*
 Theme Name:   Bloghash Child
 Theme URI:    https://rbuttsrsmokinbbq.com/
 Description:  Bloghash 子主題 - 修復無障礙色彩對比、標題層級樣式、URL 底線問題
 Author:       EasyClaw
 Author URI:   https://easyclaw.com
 Template:     bloghash
 Version:      1.0.0
 Text Domain:  bloghash-child
*/

/* =========================================================
 * 1. 無障礙：修復色彩對比問題
 * ========================================================= */

/* 淺灰色文字 → 加深為符合 WCAG AA 標準（4.5:1）*/
:root {
    --color-text-light: #595959;       /* 原本過淺，改為 #595959（白底對比 7:1）*/
    --color-text-muted: #6c757d;       /* 次要文字最低對比 */
}

/* 確保正文文字顏色夠深 */
body,
p,
li,
td,
th {
    color: #222222;
}

/* 淺色背景上的淺色文字修復 */
.has-very-light-gray-background-color,
.has-very-light-gray-color {
    color: #444444 !important;
}

/* screen-reader-text focus 可見度 */
.screen-reader-text:focus {
    background: #ffffff;
    color: #111111;
    border: 2px solid #0073aa;
    clip: auto !important;
    clip-path: none;
    height: auto;
    width: auto;
    padding: 8px 12px;
    z-index: 100000;
}

/* =========================================================
 * 2. 無障礙：按鈕 focus 可見度（鍵盤導航）
 * ========================================================= */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* =========================================================
 * 3. 無障礙：標題層級視覺一致性
 *    （避免視覺大小與 HTML 語意層級不符）
 * ========================================================= */
.entry-content h1 { font-size: 2em; margin-top: 1.5em; }
.entry-content h2 { font-size: 1.6em; margin-top: 1.4em; }
.entry-content h3 { font-size: 1.35em; margin-top: 1.3em; }
.entry-content h4 { font-size: 1.15em; margin-top: 1.2em; }
.entry-content h5 { font-size: 1em; margin-top: 1.1em; font-weight: 700; }
.entry-content h6 { font-size: 0.9em; margin-top: 1em; font-weight: 700; color: #555; }

/* =========================================================
 * 4. 效能：避免 CLS — 圖片尺寸佔位
 * ========================================================= */
img {
    height: auto;
    max-width: 100%;
}

/* =========================================================
 * 5. 無障礙：表格標頭樣式
 * ========================================================= */
table th {
    background: #f0f4f8;
    font-weight: 700;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #dee2e6;
}

table td {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
}

/* =========================================================
 * 6. 按鈕無障礙樣式（確保有足夠的點擊區域）
 * ========================================================= */
button {
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
}

/* =========================================================
 * 7. 作者署名樣式（插件注入的 byline）
 * ========================================================= */
.rbsf-byline {
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
    padding: 10px 16px;
    margin-bottom: 24px;
    font-size: 0.9em;
    color: #555;
    border-radius: 0 4px 4px 0;
}

.rbsf-byline a {
    color: #0073aa;
    text-decoration: none;
}

.rbsf-byline a:hover {
    text-decoration: underline;
}
