/* ===== Tables Data Sheet (tables-data-sheet.php) ===== */
#sidetalk-dashboard-content .content-body .content-row .sidetalk-dashboard-data-list-wrap .table-wrapper.excel-style table thead tr th:first-child {
	width: 50px !important;
}

/* Data Sheet: focused cell full view */
#excelTable td.show-full {
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: clip !important;
	max-width: none !important;
	z-index: 10;
	position: relative;
	background: #fff;
}

/* Data Sheet: Guide Text and Shortcuts */
.sidetalk-dashboard-guide-text {
	margin-bottom: 20px;
	background: #f8fafc;
	padding: 16px 20px;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
}

.sidetalk-dashboard-guide-text p {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: #475569;
	line-height: 1.5;
}

.sidetalk-dashboard-guide-text .shortcut-guide {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
	align-items: flex-start;
}

.sidetalk-dashboard-guide-text .shortcut-guide strong {
	color: #1e293b;
	font-size: 13px;
	white-space: nowrap;
	padding-top: 6px; /* 뱃지 높이와 맞추기 위함 */
	letter-spacing: -0.01em;
}

.sidetalk-dashboard-guide-text .shortcut-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sidetalk-dashboard-guide-text .shortcut-list span {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 12px;
	color: #475569;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
	font-weight: 500;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
}

.sidetalk-dashboard-guide-text .shortcut-list span:hover {
	border-color: #00b0ed;
	color: #00b0ed;
	transform: translateY(-1px);
	box-shadow: 0 4px 6px -1px rgba(0, 176, 237, 0.1);
}

.sidetalk-dashboard-guide-text .notice-text {
	margin: 0;
	font-size: 13px;
	color: #94a3b8;
	font-style: italic;
}

/* Data Sheet: base table styles (Universal) */
.table-wrapper.excel-style {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
}

#excelTable {
	width: 100%;
	table-layout: auto !important; /* 고정 레이아웃 해제: 내용에 따라 너비 확보 */
	border-collapse: separate;
	border-spacing: 0;
}

#excelTable th,
#excelTable td {
	padding: 14px 18px; /* 찝히기 좋게 패딩 증가 */
	text-align: left;
	border-right: 1px solid #eee;
	border-bottom: 1px solid #eee;
	font-size: 14px;
	min-width: 140px; /* 모든 컬럼에 최소 너비 보장 */
	max-width: 400px;
	position: relative;
}

#excelTable th.col-checkbox,
#excelTable td.col-checkbox,
#excelTable th:first-child,
#excelTable td:first-child {
	min-width: 50px !important;
	width: 50px !important;
	max-width: 50px !important;
	text-align: center;
	padding: 14px 8px;
}

#excelTable td {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 활성화된(클릭된) 셀은 전체 내용 표시 */
#excelTable td.show-full {
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: clip !important;
	z-index: 10;
	background: #fff;
}

#excelTable thead th {
	background: #f9fafb;
	font-weight: 600;
	color: #374151;
	white-space: normal; /* 헤더 줄바꿈 허용 */
	vertical-align: middle;
}

#excelTable thead th .th-text {
	display: block;
	line-height: 1.4;
	word-break: keep-all;
	word-wrap: break-word;
}

/* Data Sheet: sticky header (Universal) */
#excelTable thead th {
	position: sticky;
	top: 0;
	z-index: 20;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Data Sheet: sticky first column (틀 고정 - Universal) */
#excelTable thead th:first-child,
#excelTable tbody td:first-child {
	position: sticky;
	left: 0;
	z-index: 30;
	background: #f9fafb;
	border-right: 2px solid #e5e7eb;
}

#excelTable tbody td:first-child {
	background: #fff;
}

#excelTable thead th:first-child {
	z-index: 40;
}

/* Data Sheet Tabs */
#tables-edit-tabs {
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 2px;
	margin-bottom: 15px;
}

#tables-edit-tabs a.sidetalk-navigation-btn {
	text-decoration: none;
	color: inherit;
	display: flex;
}

@media (max-width: 768px) {
	#tables-edit-tabs {
		flex-wrap: wrap;
	}

	#tables-edit-tabs .sidetalk-navigation-btn {
		flex: 1 1 100%;
	}

	.sidetalk-button-container {
		flex-wrap: wrap;
		gap: 10px;
	}

	/* Data Sheet: search form vertical */
	#sidetalk-dashboard-content .header-row form {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	#excelTable th,
	#excelTable td {
		padding: 10px 12px;
		font-size: 13px;
		min-width: 110px;
	}

	.sidetalk-button-wrapper {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.sidetalk-button-wrapper {
		grid-template-columns: 1fr;
	}
}
