/* ===== 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;
	overflow: visible;
	text-overflow: clip;
}

/* Data Sheet: sticky column base */
#excelTable thead th,
#excelTable tbody td {
	background: var(--st-bg-primary);
}

/* Data Sheet Tabs */
#tables-edit-tabs a.sidetalk-navigation-btn {
	text-decoration: none;
	color: inherit;
	display: flex;
}

#tables-edit-tabs a.sidetalk-navigation-btn .navigation-text {
	text-decoration: none;
}

#tables-edit-tabs {
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 2px;
	margin-bottom: 10px;
}

@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;
	}

	.sidetalk-button-wrapper {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}


	/* Data Sheet: search form vertical */
	#sidetalk-dashboard-content .header-row form {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	#sidetalk-dashboard-content .search-input-wrap {
		width: 100%;
	}

	/* Data Sheet: button grid */
	.sidetalk-button-container {
		flex-direction: column;
		align-items: stretch;
	}

	.sidetalk-button-wrapper {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.sidetalk-button-group {
		display: grid;
		gap: 10px;
	}

	.sidetalk-page-size-container {
		display: flex;
		gap: 8px;
		align-items: center;
	}

	.sidetalk-page-size-input {
		flex: 1;
		min-width: 0;
	}

	/* Data Sheet: table scroll */
	.table-wrapper.excel-style {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	#excelTable {
		min-width: 720px;
		table-layout: fixed;
	}

	#excelTable th,
	#excelTable td {
		padding: 8px;
		font-size: 13px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* Data Sheet: header 2-line clamp */
	#excelTable thead th {
		white-space: normal;
	}

	#excelTable thead th .th-text {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
		max-height: 2.8em;
		line-height: 1.3;
	}

	#excelTable thead th .sort-icon {
		margin-left: 4px;
		font-weight: 600;
	}

	/* Data Sheet: sticky header */
	#excelTable thead th {
		position: sticky;
		top: 0;
		z-index: 2;
		box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
	}

	/* Data Sheet: sticky first column */
	#excelTable thead th:first-child,
	#excelTable tbody td:first-child {
		position: sticky;
		left: 0;
		z-index: 3;
	}

	#excelTable thead th:first-child {
		z-index: 4;
	}

	/* Data Sheet: checkbox touch area */
	#excelTable th:first-child input[type="checkbox"],
	#excelTable td:first-child input[type="checkbox"] {
		transform: scale(1.2);
	}

	.total-entries-text {
		display: block;
		margin-top: 8px;
	}

	.sidetalk-button-wrapper {
		grid-template-columns: 1fr;
	}

	#excelTable {
		min-width: 640px;
	}
}
