/* ===== 조회조건 패널 (js/common/component — YearMonthPicker · SiteSelectTable · PartnerSelect · DaySelectTable) ===== */
/* 컴포넌트가 그리는 마크업 전용이다. common.css 의 .header-inner · .row_1 · .date_wrap.row · .row_2/.row_3 · .table_wrap ·
   #table-site/#table-day 규칙을 옮겨 왔다. 컴포넌트로 옮기지 않은 목록 화면은 아직 common.css 의 옛 규칙을 쓴다.
   표 쪽 규칙은 .condition-field 로 한 번 더 범위를 건다. common.css 의 .tbmList .dataTables_scrollBody 규칙
   (스크롤바 폭 0, overflow-y auto)이 같은 요소에 걸려 있어 그보다 우선순위가 높아야 한다. */

/* 제목 (← .header-inner) */
.condition-field-label {
    width: 120px;
    margin-bottom: 5px;
}
.condition-field-label span {
    font-size: 15px;
    letter-spacing: -1px;
    font-family: 'noto sans KR';
}
.condition-field-label span i {
    margin-right: 5px;
    font-size: 13px;
}

/* 조회연월 (← .row_1 > .date_wrap.row) — 제목과 입력칸을 줄바꿈으로 쌓는다 */
.condition-year-month {
    display: flex;
    flex-wrap: wrap;
}
.condition-year-month .mp-monthpicker {
    width: 100%;
    transition: 0.3s;
    margin-bottom: 10px !important;
}

/* 협력업체 (← .row_1) */
.condition-partner .condition-field-body {
    display: flex;
    flex-direction: column;
}

/* 현장·일자 표 (← .row_2/.row_3 .table_wrap) */
.condition-table {
    border-radius: 0;
    border-right: 1px solid var(--color-border-stronger);
    border-left: 1px solid var(--color-border-stronger);
    border-bottom: 1px solid var(--color-border-stronger);
    overflow-y: auto;
}
.condition-table::-webkit-scrollbar {
    width: 4px;
}
/* 칸 선 — 웹 표 공통 디자인(TBM 목록 기준). 이 표는 table-bordered 가 아니라서 칸마다 선을 긋는다.
   DataTables 스크롤 표(머리·본문 표가 나뉨)의 선 규칙을 이기도록 !important 를 쓴다(예전 .tbmList 규칙과 같다) */
.condition-field .condition-table tr,
.condition-field .condition-table th,
.condition-field .condition-table td {
    border-top: 1px solid var(--color-border-default) !important;
    border-right: 1px solid var(--color-border-default) !important;
    border-bottom: 1px solid var(--color-border-default) !important;
}
.condition-field .condition-table th,
.condition-field .condition-table td {
    background-color: transparent;
}
/* 바깥 선은 표 상자(.condition-table) 테두리가 긋는다. 칸의 오른쪽 끝·아래 끝 선까지 그으면 상자 테두리와 겹쳐 굵어 보인다 */
.condition-field .condition-table tr,
.condition-field .condition-table th:last-child,
.condition-field .condition-table td:last-child {
    border-right: 0 !important;
}
.condition-field .condition-table table.dataTable,
.condition-field .condition-table tbody tr:last-child,
.condition-field .condition-table tbody tr:last-child td {
    border-bottom: 0 !important;
}
/* scrollY 표는 머리·본문이 다른 표로 나뉜다. 위 칸 선 규칙이 본문 표의 숨은 폭 측정 머리 행(높이 0)에도 위아래 선을 그어
   첫 행이 머리와 2px 떨어지고, 본문 첫 행 위 선이 머리 아래 선과 겹친다 */
.condition-field .condition-table .dataTables_scrollBody thead tr,
.condition-field .condition-table .dataTables_scrollBody thead th {
    border-top: 0 !important;
    border-bottom: 0 !important;
}
.condition-field .condition-table .dataTables_scrollBody tbody tr:first-child,
.condition-field .condition-table .dataTables_scrollBody tbody tr:first-child td {
    border-top: 0 !important;
}

/* (← #table-site_wrapper / #table-day_wrapper > .row:nth-child(2) .col-sm-12) */
.condition-field .condition-table .dataTables_wrapper > .row:nth-child(2) .col-sm-12 {
    max-height: 230px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-bg-white);
}
.condition-field .condition-table .dataTables_wrapper > .row:nth-child(2) .col-sm-12::-webkit-scrollbar {
    width: 4px !important;
    background-color: rgba(153, 153, 153, 0.32) !important;
    z-index: 999;
}
.condition-field .condition-table .dataTables_wrapper > .row:nth-child(2) .col-sm-12::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-strong);
}
.condition-field .condition-table .dataTables_wrapper > .row:nth-child(2) .col-sm-12::-webkit-scrollbar-track {
    background-color: rgba(153, 153, 153, 0.32) !important;
}
.condition-site .condition-table .dataTables_wrapper > .row:nth-child(2) .col-sm-12:hover::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-stronger);
}
.condition-day .condition-table .dataTables_wrapper > .row:nth-child(2) .col-sm-12:hover::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-strongest);
}

/* (← .tbmList .row_2.table_wrap .col-sm-12 .dataTables_scroll, #table-day_wrapper .dataTables_scroll) */
.condition-field .condition-table .dataTables_scroll {
    width: 100% !important;
}

/* (← .tbmList .row_2/.row_3 .table_wrap .dataTables_scrollBody) — DataTables 의 scrollY 인라인 max-height 를 덮는다 */
.condition-field .condition-table .dataTables_scrollBody {
    overflow-y: scroll !important;
    max-height: 200px !important;
}
/* 머리 표 폭을 본문 표(스크롤바 3px 를 뺀 폭)에 맞춘다. theme.css 가 머리 상자를 width: inherit(바깥 폭 전부)·padding 0 으로
   고정해 머리가 스크롤바 폭만큼 넓었다. 본문은 overflow-y: scroll 이라 스크롤바가 늘 있으므로 머리도 늘 3px 를 비운다 */
.condition-field .condition-table .dataTables_scrollHeadInner {
    box-sizing: border-box !important;
    width: 100% !important;
    padding-right: 3px !important;
}
.condition-field .condition-table .dataTables_scrollBody::-webkit-scrollbar {
    width: 3px !important;
    background-color: rgba(153, 153, 153, 0.32);
    z-index: 999;
}
.condition-site .condition-table .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-strong);
}
.condition-day .condition-table .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background-color: var(--color-bg-stronger);
}

/* 펼친 목록 (SelectableTableLayout.expanded ← .evalList.tbmList .row_2.table_wrap) — 높이 제한 없이 모든 행을 보인다 */
.condition-field .condition-table.condition-table-expanded .dataTables_scroll {
    width: 100% !important;
    overflow: visible !important;
}
.condition-field .condition-table.condition-table-expanded .dataTables_scrollBody {
    max-height: fit-content !important;
    overflow-y: visible !important;
}
.condition-field .condition-table.condition-table-expanded .dataTables_wrapper > .row:nth-child(2) .col-sm-12 {
    max-height: none !important;
}
