.adet-widget {
	width: 100%;
}

.adet-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 12px;
}

.adet-search-input {
	width: min(100%, 320px);
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	font: inherit;
}

.adet-table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.adet-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	background: #fff;
}

.adet-table caption {
	caption-side: top;
	margin-bottom: 10px;
	font-weight: 600;
	text-align: inherit;
}

.adet-table th,
.adet-table td {
	vertical-align: middle;
	border: 1px solid #e5e7eb;
	word-break: normal;
}

.adet-table thead th {
	font-weight: 700;
}

.adet-sort-button {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	justify-content: inherit;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
}

.adet-sort-indicator::before {
	content: "↕";
	display: inline-block;
	font-size: 0.8em;
	opacity: 0.75;
}

.adet-sort-button[data-direction="asc"] .adet-sort-indicator::before {
	content: "↑";
}

.adet-sort-button[data-direction="desc"] .adet-sort-indicator::before {
	content: "↓";
}

.adet-row-number,
.adet-row-number-head {
	width: 1%;
	white-space: nowrap;
	text-align: center;
}

.adet-table tr[hidden] {
	display: none !important;
}

.adet-empty,
.adet-empty-state {
	padding: 14px;
	border: 1px dashed #d1d5db;
	border-radius: 6px;
	background: #f9fafb;
	color: #374151;
	text-align: center;
}

.adet-empty {
	margin-top: 12px;
}

.adet-pagination {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	margin-top: 12px;
}

.adet-pagination button {
	min-height: 36px;
	padding: 7px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #111827;
	font: inherit;
	cursor: pointer;
}

.adet-pagination button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.adet-page-info {
	min-width: 54px;
	text-align: center;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 767px) {
	.adet-responsive-stacked .adet-table-scroll {
		overflow: visible;
	}

	.adet-responsive-stacked .adet-table,
	.adet-responsive-stacked .adet-table tbody,
	.adet-responsive-stacked .adet-table tr,
	.adet-responsive-stacked .adet-table td {
		display: block;
		width: 100% !important;
	}

	.adet-responsive-stacked .adet-table thead {
		display: none;
	}

	.adet-responsive-stacked .adet-table tr {
		margin-bottom: 12px;
		border: 1px solid #e5e7eb;
		border-radius: 8px;
		overflow: hidden;
	}

	.adet-responsive-stacked .adet-table td {
		display: flex;
		gap: 16px;
		align-items: flex-start;
		justify-content: space-between;
		border-width: 0 0 1px 0;
		text-align: right !important;
	}

	.adet-responsive-stacked .adet-table td:last-child {
		border-bottom: 0;
	}

	.adet-responsive-stacked .adet-table td::before {
		content: attr(data-label);
		flex: 0 0 42%;
		font-weight: 700;
		text-align: left;
	}

	.adet-toolbar,
	.adet-pagination {
		justify-content: stretch;
	}

	.adet-search-input {
		width: 100%;
	}

	.adet-pagination {
		flex-wrap: wrap;
	}
}
