@charset "utf-8";

/* ========================================= */
/* 1. Grid Table Core CSS (Table Tag Version) */
/* ========================================= */

.gt-wrapper { width: 100%; font-family: 'Pretendard', sans-serif; box-sizing: border-box; }
.gt-wrapper * { box-sizing: border-box; }

/* Scroll Container */
.gt-container {
    width: 100%;
    border: 1px solid #ccc;
    background: #fff;
    position: relative;
    overflow-x: auto; /* 기본 가로 스크롤 허용 */
}

/* Actual Table */
.gt-table {
	border-top: 2px solid #1a619f;
    width: 100%;
    border-collapse: separate; /* Sticky Header를 위해 separate 필요 */
    border-spacing: 0;
    table-layout: fixed; /* 컬럼 너비 고정 */
}

/* Header Cells (th) */
.gt-table thead th {
    background: #e6edf4;
    position: sticky;
    top: 0;
    z-index: 100;
    font-weight: bold;
    height: 50px;
    padding: 0 10px; /* 좌우 패딩 */
    border-bottom: 1px solid #d2d6de;
    border-right: 1px solid #d2d6de; /* ★ 우측 보더 살림 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    text-align: center; /* 텍스트는 기본 가운데 정렬 */
    vertical-align: middle;
}
.gt-table.small thead th {
    padding: 5px;
    height: 37px;
	font-size: 12px;
}

/* Body Cells (td) */
.gt-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #d2d6de;
    border-right: 1px solid #d2d6de; /* ★ 우측 보더 살림 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    height: 40px;
}
.gt-table.small tbody td {
    padding: 5px;
    height: 37px;
	font-size: 12px;
}

.gt-table tbody tr.gt-no-records { 
	font-style: italic;
    height: 100px;
}

/* ★ [삭제됨] 우측 끝 보더 제거 코드 삭제 */
/* .gt-table thead th:last-child, .gt-table tbody td:last-child { border-right: none; } */

/* Rows Hover & Selection */
.gt-table tbody tr:hover td { background: #f8f9fa; cursor: pointer; }
.gt-table tbody tr.selected td { background: #e7f5ff !important; }

/* Empty Data Row */
.gt-no-records td {
    text-align: center;
    padding: 50px 0;
    color: #888;
    background: #fff;
}
.gt-no-records:hover td { background: #fff !important; cursor: default; }

/* Checkbox/Radio Cell Styling */
.gt-checkbox-cell {
    text-align: center !important;
    padding: 0 !important;
    width: 40px;
}
.gt-checkbox-cell input {
    cursor: pointer;
    width: 16px; 
    height: 16px;
    vertical-align: middle;
    margin: 0;
    accent-color: #007bff;
}

/* ★ Sort Icons (Header Content) 수정됨 */
.gt-header-content {
    display: flex;
    align-items: center;
    justify-content: center; /* 텍스트는 가운데 정렬 유지 */
    position: relative;      /* 아이콘 절대 위치 기준점 */
    width: 100%;
    height: 100%;
    padding-right: 15px;     /* 아이콘 공간 확보 */
}

.gt-sort-icon { 
    position: absolute;      /* 우측 고정 */
    right: 0;                /* 맨 오른쪽 */
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px; 
    color: #666; 
}
.gt-sort-icon:hover { cursor: pointer; }
.gt-table thead th:not(.asc):not(.desc) .gt-sort-icon::after { content: "↕"; opacity: 0.3; }
.gt-table thead th.asc .gt-sort-icon::after { content: "▲"; color: #333; }
.gt-table thead th.desc .gt-sort-icon::after { content: "▼"; color: #333; }

/* Column Resizer */
.gt-resizer {
    position: absolute;
    top: 0;
    right: -2px; /* 보더 위에 걸치도록 위치 조정 */
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 101;
    background: transparent;
}
.gt-resizer:hover { background: rgba(0,0,0,0.1); }

/* Draggable Visuals */
.gt-table thead th.dragging { opacity: 0.5; background: #e9ecef; }
.gt-table thead th.drag-over { border-left: 2px solid #007bff; }

/* Pagination & Toolbar */
.gt-pagination { display: flex; justify-content: center; gap: 5px; margin-top: 15px; }
.gt-page-btn { border: 1px solid #ccc; background: #fff; padding: 6px 12px; cursor: pointer; border-radius: 4px; }
.gt-page-btn.active { background: #007bff; color: #fff; border-color: #007bff; }
.gt-page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.gt-toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 8px; font-size: 13px; color: #555; }
.gt-toolbar label { margin-right: 6px; font-weight: 500; }
.gt-toolbar select.gt-rows-select { padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; cursor: pointer; background-color: #fff; }
/* 기본 행 스타일 */
.grid-row {
    transition: background-color 0.2s;
}

/* 'selectable' 클래스가 있을 때만 호버 효과 및 커서 변경 */
.grid-row.selectable:hover {
    background-color: #f0f8ff; /* 원하는 호버 색상 */
    cursor: pointer;
}

/* 비활성화(None) 모드일 때 */
.grid-row.mode-none {
    cursor: default;
}

/* Demo Page Styles */
/*body { padding: 20px; background-color: #f9f9f9; font-family: sans-serif; }*/
/*h3 { margin-bottom: 15px; color: #333; }*/
/*.controls-container { background: #fff; padding: 15px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }*/
/*.control-group { display: flex; align-items: center; gap: 8px; }*/
/*.control-divider { width: 1px; height: 30px; background: #eee; }*/
/*.control-group label { font-weight: bold; font-size: 14px; color: #555; }*/
/*button { padding: 8px 12px; cursor: pointer; border: 1px solid #ccc; background: #fff; border-radius: 4px; font-size: 13px; transition: all 0.2s; }*/
/*button:hover { background: #f1f1f1; }*/
/*button.primary { background: #007bff; color: white; border-color: #007bff; }*/
/*button.primary:hover { background: #0056b3; }*/
/*button.accent { background: #6c757d; color: white; border-color: #6c757d; }*/
/*button.active { background-color: #212529 !important; color: white !important; border-color: #212529 !important; font-weight: bold; }*/
/*.output-console { margin-top: 20px; padding: 15px; background-color: #2d2d2d; color: #50fa7b; border-radius: 6px; font-family: 'Consolas', monospace; font-size: 13px; white-space: pre-wrap; min-height: 100px; max-height: 300px; overflow-y: auto; }*/
/*select { padding: 4px 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; cursor: pointer; background-color: #fff; }*/
