/* 個人資料圖片樣式 */
.profile-image {
    width: 70px;
    height: 70px;
    background-color: #ccc;
    margin-bottom: 10px;
    object-fit: cover;
    object-position: center;
}

.profile-name {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.profile-email {
    color: #555;
    margin: 0 0 10px 0;
}

/* 標籤樣式 */
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    gap: 5px;
}

.tag {
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 14px;
    color: #333;
    display: inline-block;
}

/* 表格樣式 */
.table tbody tr td.highlight-cell {
    background-color: #f1f1f1 !important;
}

/* 特定欄位水平置中 */
.table th:nth-child(4),
.table td:nth-child(4),
.table th:nth-child(5),
.table td:nth-child(5),
.table th:nth-child(6),
.table td:nth-child(6),
.table th:nth-child(7),
.table td:nth-child(7),
.table th:nth-child(8),
.table td:nth-child(8),
.table th:nth-child(9),
.table td:nth-child(9) {
    text-align: center !important;
}

/* 固定寬度欄位 */
.fixed-width-col {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
}

/* 彈性寬度欄位 */
.flex-col {
    flex: 1;
    min-width: 0;
}

.reviewboard-col {
    width: 30%;
    min-width: 30%;
    max-width: 30%;
}

/* 評分欄位固定寬度 */
.rating-col {
    width: 5%;
    min-width: 5%;
    max-width: 5%;
}

/* 不推薦原因欄位固定寬度 */
.reason-col {
    width: 15%;
    min-width: 15%;
    max-width: 15%;
}

/* 表格容器樣式 */
#tableContainer {
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    max-height: 800px; /* 設定最大高度以啟用滾動 */
}

/* 分組表格樣式 */
.group-table {
    margin-bottom: 0;
}

.group-table:not(:last-child) {
    border-bottom: 2px solid #dee2e6;
}

/* Sticky header 樣式 */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #DADADA;
    transition: z-index 0.1s ease;
}

.sticky-header th {
    background-color: #DADADA;
    font-weight: bold;
    padding: 2px 8px;
    white-space: nowrap;
    vertical-align: top;
    border: 0;
}

/* 確保表格標題列的樣式一致 */
.table thead th {
    vertical-align: middle;
}

/* Group 信息標題樣式 */
.group-info-badge {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: normal;
    font-size: 11px;
    color: #333;
    display: inline-block;
    margin-bottom: 4px;
    text-align: center;
}

.header-text {
    font-weight: bold;
    font-size: 14px;
}

/* 確保表格列寬度一致性 - 調整為新的列結構 */
.group-table .name-col-new {
    width: 20%;
    min-width: 20%;
    max-width: 20%;
}

.group-table .reviewboard-col {
    width: 30%;
    min-width: 30%;
    max-width: 30%;
}

.group-table .reason-col {
    width: 20%;
    min-width: 20%;
    max-width: 20%;
}

.group-table .rating-col {
    width: 10%;
    min-width: 10%;
    max-width: 10%;
}

/* Overall 項目後的邊框樣式 - 參考 restaurant.css */
.group-table td:nth-child(3),
.group-table th:nth-child(3) {
    border-right: 1px solid #dee2e6 !important;
}


.table td:nth-child(4),
.table td:nth-child(5),
.table td:nth-child(6),
.table td:nth-child(7),
.table td:nth-child(8),
.table td:nth-child(9) {
    background-color: #f1f1f1 !important;
}

/* 靜態標題列圓角樣式 */
.row.border-top {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #DADADA;
}

/* 統計資訊方塊樣式 */
.stats-box {
    background-color: #f3f3f3;
    padding: 10px;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid #dee2e6;
    flex: 1;
    min-width: 0;
    margin-bottom: 0.5rem;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-box h2 {
    font-size: 12px;
    color: #000000;
    margin-bottom: 5px;
}

.stats-box p {
    font-size: 30px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 5px;
}

.stats-section {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stats-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.stats-section-title:hover {
    color: #3A6FAC;
}

.collapse-icon {
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
}

.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* 增加率樣式 */
.rate-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.rate-change.increase {
    color: #198754;
}

.rate-change.decrease {
    color: #dc3545;
}

.rate-change i {
    font-size: 0.75rem;
}

/* 統計區塊容器 */
.stats-container {
    gap: 1rem;
    width: 100%;
}

.stats-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* 平均分配寬度 */
}

/* 篩選區樣式 */
.filter-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-section .form-check {
    margin: 0;
    display: flex;
    align-items: center;
}

.filter-section .form-check-input {
    margin-right: 0.25rem;
}

.filter-section .form-check-label {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* 搜尋輸入框群組樣式 */
.search-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: white;
    width: auto;
}

.search-input-group input {
    border: none;
    background: transparent;
    flex-grow: 1;
    height: 100%;
    padding: 0.25rem 0.5rem;
    box-shadow: none;
}

.search-input-group button {
    border: none;
    background: transparent;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
}

.search-input-group button:hover {
    color: #495057;
}

.search-profile-name {
    color: #65BB56;
}

.search-profile-attendee {
    background-color: rgb(101,187,86, 0.5);
}

/* Feedback 表格中的 td 寬度設定 */
.table tbody tr td:first-child {
    width: 20%;
}

.table tbody tr td:last-child {
    width: 80%;
}

/* Restaurant Select 樣式 */
#restaurantSelect {
    width: 150px !important;
}

/* 統計區塊標題中的餐廳選擇器容器靠右對齊 */
.stats-section-title .restaurantSelection {
    margin-left: auto !important;
}

/* Feedback 內部表格樣式 */
.feedback-inner-table {
    margin-bottom: 0;
    font-size: 12px;
}

.feedback-inner-table td {
    padding: 4px 6px;
    vertical-align: middle;
}

/* Feedback 表格列寬度 */
.feedback-name-col {
    width: 18%;
    min-width: 18%;
    max-width: 18%;
}

.feedback-badge-col {
    width: 12%;
    min-width: 12%;
    max-width: 12%;
    text-align: center;
}

.feedback-remarks-col {
    width: 70%;
    min-width: 70%;
    max-width: 70%;
}

/* Feedback Badge 樣式 */
.feedback-badge {
    font-size: 10px;
    padding: 2px 6px;
    font-weight: bold;
}

/* Like Badge - 底色：65BB56 文字色：白 */
.feedback-badge-like {
    background-color: #65BB56 !important;
    color: white !important;
}

/* Normal Badge - 底色：CCCCCC 文字色：黑 */
.feedback-badge-normal {
    background-color: #CCCCCC !important;
    color: black !important;
}

/* Dislike Badge - 底色：F23E3E 文字色：白 */
.feedback-badge-dislike {
    background-color: #F23E3E !important;
    color: white !important;
}

/* Late Badge - 底色：AA6549 文字色：白 */
.feedback-badge-late {
    background-color: #AA6549 !important;
    color: white !important;
}

/* No Show Badge - 底色：FFAB23 文字色：白 */
.feedback-badge-noshow {
    background-color: #FFAB23 !important;
    color: white !important;
}

/* 其它原因欄位的紅色文字樣式 */
.remarks-red-text {
    color: #F23E3E !important;
}

@media (max-width: 768px) {
    .content > .my-3.d-flex > .d-flex {
        flex-wrap: wrap;
        width: 100%;
    }

    .content > .my-3.d-flex input,
    .content > .my-3.d-flex select {
        flex: 1 1 150px;
        min-width: 0;
    }

    .content > .my-3.d-flex .input-group {
        flex: 1 1 100%;
    }

    .content > .my-3.d-flex .btn {
        flex: 1 1 120px;
        margin-right: 0 !important;
    }

    .stats-container .row {
        gap: 10px;
    }

    .stats-section-title {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        padding-left: 0;
    }

    .stats-section-title .ms-3,
    .stats-section-title .restaurantSelection {
        display: flex;
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: 8px;
        margin-left: 0 !important;
        width: 100%;
    }

    .stats-section-title .input-group,
    .stats-section-title .form-select,
    .stats-section-title .btn {
        flex: 1 1 150px;
        width: 100% !important;
    }

    #restaurantSelect {
        width: 100% !important;
    }

    .stats-section {
        display: grid;
        grid-template-columns: 1fr;
    }

    .stats-box {
        min-height: 92px;
    }

    .stats-box p {
        font-size: 24px;
    }

    #tableContainer {
        --mobile-table-min-width: 900px;
    }

    .group-table {
        min-width: 900px;
    }
}
