@import url('theme-root.css');

.line-divider { border-top: 2px solid #dee2e6; margin: 1rem 0; }

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table td,
.table th {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: var(--table-th-color);
    color: #ffffff;
}

.table tbody th {
  background-color: var(--table-th-color) !important;
  color: #ffffff !important;
}

.table tbody + tbody {
    border-top: 2px solid #dee2e6;
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered td,
.table-bordered th {
    border: 1px solid #dee2e6;
}

/* 둥근 모서리 테이블 스타일 */
.table-rounded {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
}

.table-hover tbody tr:hover {
    color: #212529;
    background-color: rgba(0, 0, 0, 0.075);
}

.table input.form-control {
    width: 100%; /* 셀 크기에 맞춤 */
    box-sizing: border-box; /* 패딩과 보더를 포함하여 너비 계산 */
    height: 37px; /* 원하는 높이로 조정 */
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 14px; /* 필요에 따라 폰트 크기도 조정 */
}

/* 필요한 경우 테이블 셀의 패딩도 조정 */
.table td {
    padding-top: 5px;
    padding-bottom: 5px;
    vertical-align: middle;
}

/* 텍스트 정렬 클래스 */
.table td.text-left {
    text-align: left !important;
}

.table td.text-center {
    text-align: center !important;
}

.table td.text-right {
    text-align: right !important;
}

/* 수직 정렬 클래스 (td 의 기본 정렬 방식보다 우선 순위를 높이기 위해 !important 를 사용하여 우선 순위를 높게 설정) */
.table td.v-align-top {
    vertical-align: top !important;
}

.table td.v-align-middle {
    vertical-align: middle !important;
}

.table td.v-align-bottom {
    vertical-align: bottom !important;
}

/* 테이블 내의 select 요소에 대한 스타일 */
.table select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 30px 8px 10px;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
    color: var(--text-color, #333);
    background-color: var(--select-bg-color, #ffffff);
    border: 1px solid var(--select-border-color, #ced4da);
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.table select:focus {
    border-color: var(--select-focus-border-color, #80bdff);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.table select:hover {
    border-color: var(--select-hover-border-color, #b8b8b8);
}

/* 테이블 내의 select 요소에 대한 화살표 아이콘 스타일링 */
.table .select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.table .select-wrapper::after {
    content: '▼';
    font-size: 12px;
    color: var(--select-arrow-color, #666);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* 테이블 내의 선택된 옵션 스타일 */
.table select option:checked {
    background-color: var(--select-option-checked-bg, #e6f2ff);
    color: var(--select-option-checked-color, #333);
}


/* 테이블 스크롤바 스타일 */  /* max-height: 400px; => 원하는 최대 높이로 조정 가능(--table-scroll-max-height) */
/* 테이블 스크롤 가능하게 만들기 */
/*
.table-scrollable {
    overflow-x: auto;
    max-height: 400px;
    display: block;
    border-radius: 5px;
}

.table-scrollable .table {
    margin-bottom: 0;
    white-space: nowrap;
}
*/

/* 테이블 스크롤바 스타일 */
.table-scrollable {
    overflow-x: auto;
    max-height: var(--table-scroll-max-height, 400px);
    display: block;
    border-radius: 5px;
    scrollbar-width: thin;
    /* scrollbar-color: var(--scrollbar-thumb-color, #888) var(--scrollbar-track-color, #f1f1f1); */
    scrollbar-color: #555 #f1f1f1;
}

.table-scrollable .table {
    margin-bottom: 0;
    white-space: nowrap;
}


