/* =========================================================================
   Devbunch DataTable for Elementor
   Base / structural styles. Colours, typography, padding, radius, shadows
   are driven by Elementor controls, so this file only handles layout,
   interaction states and responsive behaviour.
   ========================================================================= */

.dbt-datatable-wrap {
	--dbt-stack-bp: 767px;
	width: 100%;
	box-sizing: border-box;
}

.dbt-datatable-wrap *,
.dbt-datatable-wrap *::before,
.dbt-datatable-wrap *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------- Toolbar / search ---- */
.dbt-toolbar {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 14px;
}

.dbt-search {
	position: relative;
	display: inline-flex;
	align-items: center;
	max-width: 100%;
}

.dbt-search svg {
	position: absolute;
	left: 12px;
	color: #9aa7bd;
	pointer-events: none;
}

.dbt-search input {
	appearance: none;
	min-width: 240px;
	max-width: 100%;
	padding: 10px 14px 10px 36px;
	font-size: 14px;
	line-height: 1.4;
	outline: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.dbt-search input:focus {
	border-color: #1F6FEB;
	box-shadow: 0 0 0 3px rgba(31,111,235,.15);
}

/* -------------------------------------------------- Table shell -------- */
.dbt-table-scroll {
	width: 100%;
}

.dbt-resp-scroll .dbt-table-scroll,
.dbt-datatable-wrap:not(.dbt-is-stacked) .dbt-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.dbt-table-inner {
	background: #fff;
}

.dbt-table {
	border-collapse: collapse;
	width: 100%;
	margin: 0;
}

.dbt-resp-scroll .dbt-table {
	min-width: 640px;
}

/* -------------------------------------------------- Header ------------- */
.dbt-table thead th {
	background-color: #1F6FEB;
	color: #fff;
	font-weight: 600;
	text-align: left;
	white-space: nowrap;
	position: relative;
	user-select: none;
	vertical-align: middle;
}

.dbt-table thead th .dbt-th-label {
	vertical-align: middle;
}

/* Sort indicator */
.dbt-sort-ic {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 8px;
	vertical-align: middle;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	border-bottom: 5px solid currentColor;
	opacity: .35;
	transition: opacity .15s ease, transform .15s ease;
}

.dbt-datatable-wrap[data-sort="1"] .dbt-table thead th {
	cursor: pointer;
}

.dbt-datatable-wrap[data-sort="1"] .dbt-table thead th:hover .dbt-sort-ic {
	opacity: .7;
}

.dbt-table thead th.dbt-sort-asc .dbt-sort-ic {
	border-bottom: 0;
	opacity: 1;
}
.dbt-table thead th.dbt-sort-desc .dbt-sort-ic {
	border-top: 0;
	opacity: 1;
}

/* -------------------------------------------------- Body --------------- */
.dbt-table tbody tr {
	background-color: #fff;
	transition: background-color .15s ease;
}

.dbt-table tbody tr:nth-child(even) {
	background-color: #F5F9FF;
}

.dbt-table tbody td {
	color: #33415C;
	vertical-align: middle;
}

.dbt-table tbody tr:hover {
	background-color: #EAF3FF;
}

.dbt-table tbody tr[hidden] {
	display: none;
}

/* -------------------------------------------------- Badges ------------- */
.dbt-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1;
	white-space: nowrap;
	background-color: #EEF2F7;
	color: #425063;
	border-radius: 40px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	transition: transform .16s ease, box-shadow .16s ease,
		background-color .16s ease, color .16s ease;
}

.dbt-badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	flex: 0 0 auto;
	opacity: .85;
}

/* Badge hover / active effects (prefix classes from the control) */
.dbt-bhover-lift .dbt-badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(15,30,60,.16);
	cursor: default;
}
.dbt-bhover-grow .dbt-badge:hover {
	transform: scale(1.08);
	cursor: default;
}
.dbt-bhover-glow .dbt-badge:hover {
	box-shadow: 0 0 0 4px rgba(31,111,235,.16);
	cursor: default;
}

/* -------------------------------------------------- Footer / pager ----- */
.dbt-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	flex-wrap: wrap;
}

.dbt-empty {
	color: #7a8699;
	font-size: 14px;
	padding: 10px 2px;
}
.dbt-empty[hidden] { display: none; }

.dbt-pager {
	display: flex;
	gap: 6px;
	margin-left: auto;
	flex-wrap: wrap;
}

.dbt-pager button {
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid #DCE6F5;
	background: #fff;
	color: #33415C;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.dbt-pager button:hover:not(:disabled) {
	border-color: #1F6FEB;
	color: #1F6FEB;
}
.dbt-pager button.is-active {
	background-color: #1F6FEB;
	border-color: #1F6FEB;
	color: #fff;
}
.dbt-pager button:disabled {
	opacity: .45;
	cursor: not-allowed;
}
.dbt-pager .dbt-gap {
	display: inline-flex;
	align-items: center;
	padding: 0 4px;
	color: #9aa7bd;
}

/* -------------------------------------------------- Responsive: stack -- */
/* JS adds .dbt-is-stacked when viewport < --dbt-stack-bp for stack mode.  */
.dbt-datatable-wrap.dbt-is-stacked .dbt-table thead {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.dbt-datatable-wrap.dbt-is-stacked .dbt-table,
.dbt-datatable-wrap.dbt-is-stacked .dbt-table tbody,
.dbt-datatable-wrap.dbt-is-stacked .dbt-table tr,
.dbt-datatable-wrap.dbt-is-stacked .dbt-table td {
	display: block;
	width: 100%;
}

.dbt-datatable-wrap.dbt-is-stacked .dbt-table tbody tr {
	margin-bottom: 14px;
	border: 1px solid #E6EDF7;
	border-radius: 10px;
	overflow: hidden;
}

.dbt-datatable-wrap.dbt-is-stacked .dbt-table tbody td {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	text-align: right !important;
	border-bottom: 1px solid #EDF2FA;
}

.dbt-datatable-wrap.dbt-is-stacked .dbt-table tbody td:last-child {
	border-bottom: 0;
}

.dbt-datatable-wrap.dbt-is-stacked .dbt-table tbody td::before {
	content: attr(data-label);
	font-weight: 600;
	color: #6b7688;
	text-align: left;
	flex: 0 0 auto;
	margin-right: auto;
}

.dbt-datatable-wrap.dbt-is-stacked .dbt-table-inner {
	border: 0 !important;
	box-shadow: none !important;
}
