﻿/* ==========================================================================
   Project: KHURC Official Website - Public Info Styles
   Version: Dev_115.02.25.v2_PublicInfo
   ========================================================================== */

/* --- 1. 篩選控制區 (頁籤 + 年度) --- */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
    gap: 20px;
}

/* 頁籤容器 */
.pi-tabs {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto; /* 手機版可橫滑 */
    -webkit-overflow-scrolling: touch;
}

/* 頁籤按鈕 */
.pi-tab-btn {
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    border-bottom: 4px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
}

    .pi-tab-btn:hover {
        color: var(--primary-color);
        background-color: #fafafa;
    }

    .pi-tab-btn.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }

/* 年度下拉選單容器 */
.year-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-label {
    font-weight: bold;
    color: var(--text-dark);
}

.year-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    color: #333;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    min-width: 120px;
}

    .year-select:focus {
        border-color: var(--primary-color);
    }

/* --- 2. 列表內容區 (繼承並微調 reg-list 風格) --- */
.pi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pi-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px dashed #ddd;
    transition: background 0.2s;
}

    .pi-item:hover {
        background-color: #f9f9f9;
    }

/* 月份標籤 */
.pi-date-badge {
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 20px;
    min-width: 80px;
    text-align: center;
}

.pi-title {
    flex: 1;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    margin-right: 20px;
}

/* 按鈕群組 */
.pi-actions {
    display: flex;
    gap: 10px;
}

/* 通用按鈕樣式 */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

/* 檢視按鈕 (空心) */
.btn-view {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: #fff;
}

    .btn-view:hover {
        background-color: var(--primary-color);
        color: #fff;
    }

/* 下載按鈕 (實心) */
.btn-download {
    background-color: #d32f2f; /* 紅色系 */
    color: #fff;
}

    .btn-download:hover {
        background-color: #b71c1c;
    }

/* 用來隱藏年度選單 */
.hidden {
    display: none !important;
}

/* RWD */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column-reverse; /* 年度放上面，頁籤放下面 */
        align-items: flex-start;
        gap: 10px;
    }

    .year-selector {
        width: 100%;
        justify-content: flex-end;
    }

    .pi-tabs {
        width: 100%;
        border-bottom: 1px solid #eee; /* 手機版加底線 */
    }

    .pi-item {
        flex-wrap: wrap;
    }

    .pi-title {
        width: 100%;
        margin-bottom: 10px;
        order: 1;
    }

    .pi-date-badge {
        order: 0;
        margin-bottom: 5px;
    }

    .pi-actions {
        width: 100%;
        justify-content: flex-end;
        order: 2;
    }
}
