/* Google CSE v6 相容版自訂樣式
   Updated: 2026-05-04 — 配合 default_v6+en.css
   環境部新聞專區 EPANews 綠色主題 */

/* --- 整體控制容器 --- */
.gsc-control-cse,
.cse .gsc-control-cse {
    background-color: #fff;
    border: none;
    padding: 16px 0;
    width: auto;
    font-family: "Microsoft JhengHei", "Noto Sans TC", "PingFang TC", sans-serif;
}

.gsc-control-wrapper-cse {
    width: 100%;
}

/* --- 隱藏 Google 品牌標誌 --- */
.cse .gsc-branding,
.gsc-branding,
.gcsc-branding,
.gcsc-more-maybe-branding-root {
    display: none !important;
}

/* --- 滿版寬度覆寫（v6 預設有 max-width 限制） --- */
form.gsc-search-box,
.gsc-wrapper,
.gsc-above-wrapper-area,
.gsc-resultsbox-visible,
.gsc-results,
.gsc-resultsRoot {
    max-width: 100% !important;
    width: 100% !important;
}

/* --- 搜尋框（v6 新設計：圓角、微陰影） --- */
form.gsc-search-box {
    margin: 0 0 8px 0;
}

table.gsc-search-box {
    border: none;
    border-spacing: 0;
}

.gsc-input-box {
    border: 2px solid #e0e0e0;
    border-radius: 28px;
    background: #f8f9fa;
    box-shadow: none;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.gsc-input-box tr {
    background-color: #fff;
}

.gsc-resultsRoot .gsc-results .gsc-cursor-box {
    margin: 50px 24px 0;
}


.gsc-input-box:hover,
.gsc-input-box-hover {
    border-color: #81c784;
    box-shadow: 0 2px 8px rgba(0, 105, 92, .10);
}

.gsc-input-box-focus,
.gsc-search-box .gsc-input>input:focus {
    border-color: #00695C;
    box-shadow: 0 0 0 3px rgba(0, 105, 92, .15);
    outline: none;
}

input.gsc-input {
    color: #3c4043;
    font-size: 16px;
    line-height: 24px;
    padding: 11px 16px;
    border: none;
    background: transparent;
    width: 100%;
}

/* --- 搜尋送出按鈕：強制顯示（無障礙 WCAG 2.1 AA 合規） --- */
.gsc-search-button {
    display: inline-flex !important;
    align-items: center;
    height: 56px !important;
}

td.gsc-search-button:hover {
    background-color: transparent !important;
    box-shadow: none !important;
}

.gsc-search-button-v2 {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px;
    padding: 0 !important;
    margin-left: 8px;
    border: none;
    border-radius: 50%;
    background-color: #00695C;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
    outline-offset: 2px;
}

.gsc-search-button:hover,
.gsc-search-button-v2:hover {
    background-color: #004D40;
    box-shadow: 0 3px 10px rgba(0, 105, 92, .35);
    transform: translateY(-1px);
}

.gsc-search-button:focus,
.gsc-search-button-v2:focus {
    outline: 3px solid #00695C;
    outline-offset: 2px;
    background-color: #004D40;
}

.gsc-search-button svg,
.gsc-search-button-v2 svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* --- 清除按鈕（v6 路徑） --- */
div.gsc-clear-button {
    background-image: url('//www.google.com/cse/static/css/v2/clear.png');
}

div.gsc-clear-button:hover {
    background-image: url('//www.google.com/cse/static/css/v2/clear-hover.png');
}

/* --- 分類標籤列 (tabs) --- */
.gsc-tabsArea {
    font-size: 14px;
    border-bottom: 2px solid #e0e0e0;
    margin-top: 16px;
    margin-bottom: 0;
    height: auto;
    overflow: visible;
    clear: both;
}

.gsc-tabsArea>div {
    height: auto;
    overflow: visible;
}

.gsc-tabsArea .gs-spacer,
.gsc-tabsArea .gs-spacer-opera {
    display: none;
}

.gsc-tabHeader {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 3px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: #5f6368;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.gsc-tabHeader.gsc-tabhActive {
    color: #00695C;
    border-bottom-color: #00695C;
    font-weight: 600;
}

.gsc-tabHeader.gsc-tabhInactive:hover {
    color: #00695C;
    background: #E0F2F1;
    border-radius: 6px 6px 0 0;
}

.gsc-tabHeader.gsc-tabhInactive,
.gsc-refinementHeader.gsc-refinementhInactive {
    color: #333;
    border-color: #333;
}

.gsc-tabHeader.gsc-tabhActive,
.gsc-refinementHeader.gsc-refinementhActive {
    border-bottom: 0px;
}

/* --- 細化篩選區 --- */
.gsc-refinementsArea {
    border-bottom: 1px solid #e8eaed;
    margin-top: 12px;
    padding: 8px 0;
}

.gsc-refinementHeader {
    text-decoration: none;
    font-weight: 500;
    color: #5f6368;
    font-size: 13px;
}

.gsc-refinementHeader.gsc-refinementhActive {
    color: #00695C;
}

.gsc-refinementhActive>span {
    border-bottom: 2px solid #00695C;
    padding-bottom: 2px;
}

/* --- 搜尋結果資訊列 --- */
.gsc-result-info {
    color: #70757a;
    font-size: 13px;
    padding: 10px 0 6px 0;
    margin: 0;
}

/* --- 單筆搜尋結果項目 --- */
.gsc-webResult.gsc-result {
    padding: 14px 16px 18px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
    transition: background 0.2s ease, border-radius 0.2s ease;
}

.gsc-webResult.gsc-result:last-child {
    border-bottom: none;
}

.cse .gsc-webResult.gsc-result:hover,
.gsc-webResult.gsc-result:hover {
    background: #F1F8E9;
    border-radius: 8px;
}

/* --- 結果標題（v6 修正：不限制高度） --- */
.gsc-result .gs-title {
    height: auto;
    line-height: 1.45;
    margin-bottom: 4px;
    overflow: visible;
}

.gs-result .gs-title,
.gs-result .gs-title * {
    color: #00695C;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
}

.gs-result .gs-title:hover,
.gs-result .gs-title *:hover {
    text-decoration: underline;
    color: #004D40;
}

.gsc-control-cse .gs-result .gs-title,
.gsc-control-cse .gs-result .gs-title * {
    font-size: 18px;
}

/* --- 可見 URL（麵包屑樣式） --- */
.gs-result a.gs-visibleUrl,
.gs-result .gs-visibleUrl,
.gs-webResult .gs-visibleUrl,
.gs-promotion .gs-visibleUrl {
    color: #2E7D32;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    margin-bottom: 4px;
    display: block;
}

.gs-webResult div.gs-visibleUrl-short,
.gs-promotion div.gs-visibleUrl-short {
    display: none;
}

.gs-webResult div.gs-visibleUrl-long,
.gs-promotion div.gs-visibleUrl-long {
    overflow: hidden;
}

.gs-visibleUrl-breadcrumb {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- URL 位置（上方顯示） --- */
.gsc-url-top {
    display: block;
}

.gsc-url-bottom {
    display: none;
}

.gsc-thumbnail-left {
    display: none;
}

.gsc-thumbnail-inside {
    display: block;
}

/* --- 摘要文字 --- */
.gs-snippet,
.gsc-control-cse .gs-snippet {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 4px;
}

.gsc-control-cse-zh_TW .gs-snippet b,
.gsc-control-cse-zh_TW .gs-promotion em,
.gsc-control-cse-zh_CN .gs-snippet b,
.gsc-control-cse-zh_CN .gs-promotion em {
    color: #BF360C;
    font-style: normal;
    font-weight: 600;
}

/* --- 拼字建議 --- */
.gs-spelling {
    color: #3c4043;
    font-size: 14px;
    padding: 4px 0;
}

.gs-spelling a {
    color: #00695C;
    cursor: pointer;
}

/* --- 翻頁 (cursor) --- */
.gsc-results .gsc-cursor-box {
    margin: 20px 0;
    text-align: center;
}

.gsc-results .gsc-cursor-box .gsc-cursor-page {
    display: inline-block;
    min-width: 38px;
    height: 38px;
    line-height: 38px;
    padding: 0 8px;
    margin: 0 3px;
    border-radius: 50%;
    color: #00695C;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.gsc-results .gsc-cursor-box .gsc-cursor-page:hover {
    background: #E0F2F1;
    text-decoration: none;
    transform: translateY(-1px);
}

.gsc-results .gsc-cursor-box .gsc-cursor-current-page {
    font-weight: 700;
    color: #fff;
    background: #00695C;
    text-decoration: none;
    cursor: default;
}

/* --- 促銷/廣告結果 --- */
.cse .gsc-webResult.gsc-result.gsc-promotion,
.gsc-webResult.gsc-result.gsc-promotion {
    background-color: #FAFAFA;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    margin: 8px 0 12px 0;
    padding: 14px 18px;
}

.cse .gs-promotion a.gs-title:link,
.gs-promotion a.gs-title:link,
.cse .gs-promotion a.gs-title:link *,
.gs-promotion a.gs-title:link * {
    color: #00695C;
}

.cse .gs-promotion .gs-snippet,
.gs-promotion .gs-snippet {
    color: #4d5156;
}

.cse .gs-promotion .gs-visibleUrl,
.gs-promotion .gs-visibleUrl {
    color: #2E7D32;
}

/* --- 圖片結果 --- */
.gsc-imageResult-column,
.gsc-imageResult-classic {
    padding: .25em;
    border: none;
    margin-bottom: 1em;
}

.gs-web-image-box,
.gs-promotion-image-box {
    float: right;
    padding: 2px 0 2px 16px;
}

/* --- 自動完成下拉 --- */
.gsc-completion-selected {
    background: rgba(0, 105, 92, .06);
}

.gsc-completion-container {
    font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
    font-size: 15px;
    color: #444746;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    margin: 0;
}

.gsc-completion-title {
    color: #00695C;
}

.gsc-completion-snippet {
    color: #4d5156;
}

.gsc-completion-container .gsc-completion-icon-cell {
    width: 42px;
    height: 42px;
    padding-right: 10px;
}

/* --- 其他輔助資訊 --- */
.gsc-snippet-metadata,
.gsc-role,
.gsc-tel,
.gsc-org,
.gsc-location,
.gsc-reviewer,
.gsc-author {
    color: #70757a;
    font-size: 13px;
}

.gsc-wrapper.gsc-thinWrapper {
    border-right: 1px solid #e9e9e9;
}

.gsc-adBlock {
    padding-bottom: 5px;
}

.gsc-table-cell-snippet-close,
.gsc-table-cell-snippet-open {
    padding-left: 0;
    padding-right: 0;
}

.gsc-table-result {
    padding-left: 0;
    padding-right: 0;
    border-spacing: 0;
}

/* --- 排序下拉 --- */
.gsc-result-info-container {
    text-align: left;
}

.gsc-orderby-label {
    color: #70757a;
    font-size: 13px;
}

.gsc-selected-option-container {
    background-color: #f8f9fa;
}

.gsc-webResult-divider {
    display: none;
}

/* --- 麵包屑 URL 容器 --- */
.gsc-table-cell-snippet-close .gs-title,
.gsc-table-cell-snippet-open .gs-title {
    overflow: visible;
    height: auto;
}

/* --- 響應式調整 --- */
@media (max-width: 768px) {
    .gsc-tabHeader {
        padding: 10px 10px;
        font-size: 13px;
        margin: 0 1px;
    }

    .gs-result .gs-title,
    .gs-result .gs-title * {
        font-size: 16px;
    }

    .gsc-webResult.gsc-result {
        padding: 10px 8px 12px 8px;
    }

    .gsc-search-button-v2 {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
    }

    input.gsc-input {
        font-size: 15px;
        padding: 9px 12px;
    }
}

.gs-web-image-box::after,
.gs-promotion-image-box::after {
    display: none;
}

@media (max-width: 480px) {
    .gsc-tabHeader {
        padding: 8px 6px;
        font-size: 12px;
    }

    .gs-result .gs-title,
    .gs-result .gs-title * {
        font-size: 15px;
    }

    .gs-snippet,
    .gsc-control-cse .gs-snippet {
        font-size: 13px;
    }

    .gsc-results .gsc-cursor-box .gsc-cursor-page {
        min-width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 13px;
    }
}