﻿
/* 기본 테이블 스타일 */

/* 목록 화면 콘텐츠 영역(제목바 아래, 검색패널+테이블+페이징)을 감싸는 테두리 박스. MemberList.razor/OrgSearch.razor의 목록 컨테이너에 사용됨 */
.list-wrap-border {
    flex: 1;
    /* Flex 자식이 테이블의 최소 너비만큼 부모를 늘리지 않도록 허용합니다. */
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--page-wrap-border);
    border-radius: var(--page-wrap-radius);
    overflow: hidden;
}

    /* list-wrap-border 내부 하단 페이징(AppPagination) 영역의 좌우 여백 */
    .list-wrap-border .app-pager-container {
        padding: 0.3rem 1rem;
    }

/* 목록 화면 상단 검색조건 패널. MemberList.razor/OrgSearch.razor에서 ListSearchDate/ListSearchSelect/ListSearchInput 등을 가로로 배치하는 컨테이너 */
.list-search-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    row-gap: 0.5rem;
    column-gap: 0.9rem;
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    background: #fff;
}
/* list-search-panel 내부의 검색조건 단위(라벨+입력요소) 묶음 */
.list-search-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* list-search-panel 내부 MudBlazor 입력 컨트롤의 상하 여백 제거(레이아웃 정렬용) */
.list-search-panel .mud-input-control {
    margin-top: 0;
    margin-bottom: 0;
}

/* OrgSearch.razor에서 ListSearchSelect/ListSearchInput처럼 두 컨트롤을 한 묶음으로 배치하는 df(자유 배치) 그룹의 간격 */
.list-search-panel div.df {
    gap: 0.2rem;
    align-items: center;
}

/* list-search-item 내부 라벨 텍스트 스타일(줄바꿈 방지, 회색조 색상) */
.list-search-panel label {
    color: #475569;
    white-space: nowrap;
}

/* 시작일~종료일처럼 두 입력을 이어 붙여 표시하는 날짜 범위 그룹(예: OrgSearch.razor의 ListSearchDate 내부) */
.date-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

    /* date-input-group 내부 개별 날짜 입력창 너비 */
    .date-input-group input {
        width: 115px;
    }

    /* 시작일과 종료일 입력 사이에 표시되는 구분 기호(~) 스타일 */
    .date-input-group .bridge {
        font-size: 12px;
        color: #94a3b8;
    }

/* MemberList.razor/OrgSearch.razor의 목록 테이블을 감싸며 세로/가로 스크롤을 담당하는 영역 */
.list-table-scroll {
    position: relative;
    flex: 1;
    /* 테이블의 실제 너비는 내부 스크롤 영역에서 처리하도록 제한합니다. */
    min-width: 0;
    background-color: #ffffff;
    overflow: auto;
    box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.02);
    min-height: 0;
    border: 1px solid var(--page-wrap-border);
    margin: 0 -1px;
}

/* MemberList.razor/OrgSearch.razor에서 GridTableRow가 렌더링하는 목록 테이블 자체의 레이아웃 */
.list-table {
    width: max-content;
    table-layout: fixed;
    border-spacing: 0;
}

    /* 목록 테이블의 헤더(th)/본문(td) 공통 셀 스타일(구분선, padding, 말줄임 처리) */
    .list-table th, .list-table td {
        border-right: 1px solid #e2e8f0;
        padding: 0.375rem 0.5rem;
        vertical-align: middle;
        height: 1.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
        /* 적요(비고) 등 줄바꿈이 필요한 셀에 붙이는 lineauto 클래스: 높이 자동, 줄바꿈 허용 */
        .list-table th, .list-table td.lineauto {
            height: auto;
            overflow: visible;
            white-space: normal;
            word-wrap: break-word;
            word-break: break-word;
            vertical-align: top;
        }

    /* 스크롤 시 헤더가 상단에 고정되도록 하는 sticky 헤더 처리(MemberList.razor/OrgSearch.razor 공통) */
    .list-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: rgba(241, 245, 249, 1);
        box-shadow: 0 1px 0 #cbd5e1;
    }

    /* 목록 테이블 헤더(th) 텍스트 스타일: 중앙 정렬, 굵게 */
    .list-table th,
    .list-table thead th,
    .list-table thead td {
        color: rgb(71 85 105);
        border-bottom: none;
        text-align: center;
        font-weight: 600;
    }

    /* thead 첫 번째 행을 제외한 행에 상단 경계선을 표시한다. */
    .list-table thead tr + tr th,
    .list-table thead tr + tr td {
        border-top: 1px solid #e2e8f0;
    }

    /* 목록 테이블 본문(td) 기본 텍스트 색상 */
    .list-table td {
        color: #334155;
    }

        /* 숫자(금액/수량 등) 컬럼 우측 정렬 규칙. GridColumn.Class="num"으로 지정된 컬럼에 적용됨 */
        .list-table th.num,
        .list-table td.num,
        .list-table td .num,
    .list-table td input.num,
    .list-table td.num input,
    .list-table td.num input[type="number"],
    .list-table td.num .mud-input-slot,
    .list-table td.num .mud-input-root {
            text-align: right;
        }

    /* 목록 테이블 본문 행(tr) 기본 배경/높이/구분선 */
    .list-table tbody tr {
        background-color: #ffffff;
        border-bottom: 1px solid var(--page-wrap-border);
        height: 2.25rem;
    }

    /* 목록 테이블 본문 셀(td) 하단 구분선 */
    .list-table tbody td {
        border-bottom: 1px solid #f1f5f9;
    }

    /* 짝수 행 배경색을 다르게 주는 지브라(줄무늬) 스타일 */
    .list-table tbody tr:nth-child(even) {
        background-color: #fbfcfd;
    }

    /* 목록 테이블 행에 마우스 오버 시 강조 배경색 */
    .list-table tbody tr:not(.list-empty-row):hover {
        background-color: rgba(240, 247, 255, 1) !important;
    }

    /* 목록 데이터가 페이지 크기보다 적을 때 빈 공간을 채우는 필러(더미) 행의 셀 스타일 */
    .list-table tbody .list-filler-row td {
        padding: 0;
        border-right: 1px solid #f1f5f9;
        border-bottom: 0;
        background-color: #ffffff;
    }
    /* 클릭 가능한 셀은 배경색을 변경하지 않고 커서와 글자색으로만 표시합니다. GridTableRow.razor의 Click 컬럼(회원코드/사원코드 링크 등)에 사용됨 */
    .list-table tbody td.clickable-cell {
        cursor: pointer;
        color: #1d4ed8;
    }

        /* 마우스 오버 시 글자색만 은은하게 변경합니다. 행 배경색은 기존 스타일을 사용합니다. */
        .list-table tbody td.clickable-cell:hover {
            text-decoration: underline;
        }

    /* 목록 테이블 하단 합계(Footer) 행이 스크롤 시 하단에 고정되도록 하는 sticky 처리 */
    .list-table tfoot {
        position: sticky;
        bottom: 0;
        z-index: 10;
        color: #0f172a;
        background: #eef2f7;
    }

        /* 합계(Footer) 행 상단 구분선 */
        .list-table tfoot td {
            border-top: 1px solid #94a3b8;
            border-bottom: 1px solid #94a3b8;
        }

/* 조회 결과가 없을 때 표시되는 안내 행(tr)의 배경/여백 초기화 */
.list-empty-row {
    background-color: #ffffff !important;
    padding: 0 !important;
}

/* list-empty-row 안내 문구("조회된 자료가 없습니다." 등)의 위치/색상 스타일. OrgSearch.razor/OrgMap.razor/DocsList.razor 등에서 사용됨 */
.list-table tbody .list-empty-row td {
    padding: 5rem 0 0 5rem;
    color: #777;
    font-weight: 700;
    border: 0 !important;
}

/*테이블과 페이징 사이 추가 합계표시 그룹*/
.list-bottom-summary {
    padding: 0.5rem 1rem;
}

.selected-row {
    background: #eff6ff;
}
