/* Interactive Tables for Elementor — base styles */

.ntbl-wrapper {
	width: 100%;
	--ntbl-sticky-offset: 0px;
	--ntbl-sort-color: currentColor;
}

.ntbl-editor-placeholder {
	padding: 24px;
	text-align: center;
	background: #f5f6f8;
	border: 1px dashed #ccc;
	color: #888;
	border-radius: 4px;
}

/* Toolbar */
.ntbl-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.ntbl-search-input {
	padding: 8px 12px;
	border: 1px solid #dddddd;
	border-radius: 4px;
	font-size: 14px;
	min-width: 240px;
	max-width: 100%;
	outline: none;
	transition: border-color 0.15s ease;
}

/* Scroll container */
.ntbl-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
}

/* Table */
.ntbl-table {
	border-collapse: collapse;
	max-width: 100%;
}

.ntbl-th,
.ntbl-td {
	padding: 12px 16px;
	text-align: left;
	border: 1px solid #e2e2e2;
	vertical-align: middle;
}

.ntbl-th[data-align="center"],
.ntbl-td[data-align="center"] {
	text-align: center;
}

.ntbl-th[data-align="right"],
.ntbl-td[data-align="right"] {
	text-align: right;
}

.ntbl-table thead th {
	background: #f5f6f8;
	font-weight: 600;
	position: relative;
}

/* Sticky header */
.ntbl-sticky-header .ntbl-table thead th {
	position: sticky;
	top: var( --ntbl-sticky-offset, 0px );
	z-index: 2;
}

/* Row striping / hover */
.ntbl-table.ntbl-striped tbody tr:nth-child(even) {
	background: rgba( 0, 0, 0, 0.02 );
}

.ntbl-table.ntbl-hover tbody tr {
	transition: background-color 0.12s ease;
}

/* Sortable header + indicator */
.ntbl-sortable {
	cursor: pointer;
	user-select: none;
	padding-right: 28px !important;
}

.ntbl-sortable:focus-visible {
	outline: 2px solid var( --ntbl-sort-color, #333 );
	outline-offset: -2px;
}

.ntbl-sortable::after {
	content: '';
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY( -50% );
	border: 4px solid transparent;
	border-top-color: var( --ntbl-sort-color, currentColor );
	opacity: 0.35;
}

.ntbl-sortable.ntbl-sort-asc::after {
	border-top-color: transparent;
	border-bottom-color: var( --ntbl-sort-color, currentColor );
	opacity: 1;
}

.ntbl-sortable.ntbl-sort-desc::after {
	border-top-color: var( --ntbl-sort-color, currentColor );
	opacity: 1;
}

/* Empty state */
.ntbl-empty-row td {
	text-align: center;
	padding: 24px;
	color: #888888;
}

/* Pagination */
.ntbl-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 16px;
}

.ntbl-page-btn {
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid #dddddd;
	background: #ffffff;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
}

.ntbl-page-btn.is-active {
	background: #333333;
	color: #ffffff;
	border-color: #333333;
}

.ntbl-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Responsive stacking (card layout) */
.ntbl-stack-enabled.is-stacked .ntbl-table,
.ntbl-stack-enabled.is-stacked .ntbl-table thead,
.ntbl-stack-enabled.is-stacked .ntbl-table tbody,
.ntbl-stack-enabled.is-stacked .ntbl-table th,
.ntbl-stack-enabled.is-stacked .ntbl-table td,
.ntbl-stack-enabled.is-stacked .ntbl-table tr {
	display: block;
	width: 100% !important;
}

.ntbl-stack-enabled.is-stacked .ntbl-table thead tr {
	position: absolute;
	top: -9999px;
	left: -9999px;
}

.ntbl-stack-enabled.is-stacked .ntbl-table tbody tr {
	margin-bottom: 12px;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	overflow: hidden;
	height: auto !important;
}

.ntbl-stack-enabled.is-stacked .ntbl-table tbody tr:last-child {
	margin-bottom: 0;
}

.ntbl-stack-enabled.is-stacked .ntbl-table td {
	border: none;
	border-bottom: 1px solid #eeeeee;
	position: relative;
	padding-left: 45% !important;
	text-align: left !important;
	min-height: 20px;
}

.ntbl-stack-enabled.is-stacked .ntbl-table td:last-child {
	border-bottom: none;
}

.ntbl-stack-enabled.is-stacked .ntbl-table td::before {
	content: attr(data-label);
	position: absolute;
	left: 16px;
	top: 12px;
	width: 40%;
	padding-right: 10px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ntbl-stack-enabled.is-stacked .ntbl-empty-row td {
	padding-left: 16px !important;
}

.ntbl-stack-enabled.is-stacked .ntbl-empty-row td::before {
	content: '';
}
