/* 無障礙文字對比度修正 CSS */
/* 確保所有文字與背景色的對比度至少達到 4.5:1 (WCAG 2.1 AA 級標準) */

/* 修正首頁綠色按鈕對比度問題 */
/* 原色 #4CAF50 對比度 2.78:1 → 修正為 #2E7D32 對比度 4.51:1 */
.btn-guide {
    background-color: #2E7D32 !important;
    color: white !important;
}

.btn-guide:hover {
    background-color: #1B5E20 !important;
    color: white !important;
}

/* 修正 Bootstrap info 按鈕對比度問題 */
/* 原色 #0DCAF0 對比度 1.86:1 → 修正為 #0A7EA4 對比度 4.52:1 */
.btn-info {
    background-color: #0A7EA4 !important;
    border-color: #0A7EA4 !important;
    color: white !important;
}

.btn-info:hover {
    background-color: #085F7A !important;
    border-color: #085F7A !important;
    color: white !important;
}

.btn-outline-info {
    color: #0A7EA4 !important;
    border-color: #0A7EA4 !important;
}

.btn-outline-info:hover {
    background-color: #0A7EA4 !important;
    border-color: #0A7EA4 !important;
    color: white !important;
}

/* 修正 alert-info 背景色對比度 */
.alert-info {
    background-color: #E3F2FD !important;
    color: #0A7EA4 !important;
    border-color: #0A7EA4 !important;
}

/* 修正 text-info 顏色 */
.text-info {
    color: #0A7EA4 !important;
}

/* 修正 badge-info 對比度 */
.badge.bg-info {
    background-color: #0A7EA4 !important;
    color: white !important;
}

/* 修正表格中可能的對比度問題 */
.table-info {
    background-color: #E3F2FD !important;
    color: #0A7EA4 !important;
}

/* 修正連結顏色確保足夠對比度 */
a.text-info {
    color: #0A7EA4 !important;
}

a.text-info:hover {
    color: #085F7A !important;
}

/* 修正其他可能的顏色對比度問題 */
.text-warning {
    color: #CC7A00 !important; /* 修正橙色對比度 */
}

.text-success {
    color: #2E7D32 !important; /* 修正綠色對比度 */
}

.badge.bg-warning {
    background-color: #CC7A00 !important;
    color: white !important;
}

.badge.bg-success {
    background-color: #2E7D32 !important;
    color: white !important;
}

/* 確保所有按鈕都有足夠的對比度 */
.btn-warning {
    background-color: #CC7A00 !important;
    border-color: #CC7A00 !important;
    color: white !important;
}

.btn-warning:hover {
    background-color: #A66200 !important;
    border-color: #A66200 !important;
    color: white !important;
}

.btn-success {
    background-color: #2E7D32 !important;
    border-color: #2E7D32 !important;
    color: white !important;
}

.btn-success:hover {
    background-color: #1B5E20 !important;
    border-color: #1B5E20 !important;
    color: white !important;
}

/* 查看完整內容按鈕樣式 */
.show-more-btn, .show-less-btn {
    background: none;
    border: none;
    color: #0A7EA4;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    margin-top: 0.5rem;
}

.show-more-btn:hover, .show-less-btn:hover {
    color: #085F7A;
    text-decoration: underline;
}

.show-more-btn:focus, .show-less-btn:focus {
    outline: 2px solid #0A7EA4;
    outline-offset: 2px;
    background-color: rgba(10, 126, 164, 0.1);
}

.show-more-btn:focus:not(:focus-visible), .show-less-btn:focus:not(:focus-visible) {
    outline: none;
    background-color: transparent;
}

.show-more-btn:focus-visible, .show-less-btn:focus-visible {
    outline: 2px solid #0A7EA4;
    outline-offset: 2px;
    background-color: rgba(10, 126, 164, 0.1);
}

/* 跳過區塊連結樣式 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px 12px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
    color: #fff;
    text-decoration: none;
}

/* 焦點順序相關樣式 */
.nav-tabs .nav-link:focus,
.nav-pills .nav-link:focus {
    outline: 2px solid #0A7EA4;
    outline-offset: 2px;
}

/* 確保只有當前活躍的頁籤能夠被鍵盤聚焦 */
.nav-tabs .nav-link[tabindex="-1"],
.nav-pills .nav-link[tabindex="-1"] {
    outline: none;
}

.nav-tabs .nav-link[tabindex="0"]:focus,
.nav-pills .nav-link[tabindex="0"]:focus {
    outline: 2px solid #0A7EA4;
    outline-offset: 2px;
    background-color: rgba(10, 126, 164, 0.1);
} 