.blaek-table-widget {
	width: 100%;
	font-family: inherit;
	background-color: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* === CONTROLS WRAPPER === */
.blaek-table-controls-wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
	position: relative;
	z-index: 10;
}

/* === FILTERS ROW === */
.blaek-table-filters-container {
	display: flex;
	gap: 0;
	align-items: stretch;
	border: 1px solid #d0d5dd;
	border-radius: 4px;
	overflow: visible;
	box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.10);
}

.blaek-table-filter {
	position: relative;
	flex: 1;
	border-right: 1px solid #d0d5dd;
}

.blaek-table-filter:last-child {
	border-right: none;
}

.blaek-filter-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	background-color: #fff;
	border: none;
	padding: 14px 18px;
	cursor: pointer;
	font-size: 15px;
	color: #14365D;
	font-weight: 500;
	transition: background-color 0.25s ease, color 0.25s ease;
	border-radius: 0;
	white-space: nowrap;
	overflow: hidden;
	min-width: 0;
}

.blaek-filter-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
	flex: 1;
	text-align: left;
}

.blaek-table-filter:first-child .blaek-filter-toggle {
	border-radius: 4px 0 0 4px;
}

.blaek-table-filter:last-child .blaek-filter-toggle {
	border-radius: 0 4px 4px 0;
}

.blaek-table-filter:only-child .blaek-filter-toggle {
	border-radius: 4px;
}

/* Hover — uses !important so Elementor selectors also use !important and win */
.blaek-filter-toggle:hover {
	background-color: #f0f4f8;
}

/* Active state: dark navy blue */
.blaek-filter-toggle.has-selections {
	background-color: #14365D;
	color: #fff;
}

.blaek-filter-toggle.has-selections:hover {
	opacity: 0.9;
}

/* Icons */
.blaek-filter-icon {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.blaek-filter-icon-arrow {
	color: #14365D;
}

.blaek-filter-toggle.has-selections .blaek-filter-icon-arrow {
	display: none !important;
}

.blaek-filter-toggle.has-selections .blaek-filter-icon-close {
	display: inline-flex !important;
	color: #fff;
}

/* === DROPDOWN === */
.blaek-filter-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	min-width: 200px;
	z-index: 999;
	display: none;
	padding: 8px 0;
}

.blaek-filter-dropdown.show {
	display: block;
}

.blaek-filter-dropdown-inner {
	max-height: 250px;
	overflow-y: auto;
}

.blaek-filter-option {
	display: flex;
	align-items: center;
	padding: 10px 18px;
	cursor: pointer;
	transition: background-color 0.15s;
	gap: 10px;
}

.blaek-filter-option:hover {
	background-color: #f5f7fa;
}

.blaek-filter-input {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #14365D;
	flex-shrink: 0;
	margin: 0;
}

.blaek-filter-option-label {
	font-size: 15px;
	color: #222;
	user-select: none;
}

/* === SEARCH === */
.blaek-table-search {
	display: flex;
	align-items: center;
	align-self: flex-end;
	background-color: #fff;
	border: 1px solid #d0d5dd;
	border-radius: 4px;
	padding: 0 14px;
	height: 44px;
	min-width: 200px;
	max-width: 300px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.blaek-table-search:focus-within {
	border-color: #14365D;
}

.blaek-table-search-input {
	border: none !important;
	background: transparent !important;
	width: 100%;
	font-size: 15px;
	color: #333;
	padding: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	height: 100%;
}

.blaek-search-icon {
	color: #14365D;
	display: flex;
	align-items: center;
	margin-left: 8px;
	order: 2;
	flex-shrink: 0;
	font-size: 18px;
}

.blaek-search-icon i,
.blaek-search-icon svg {
	font-size: inherit;
	width: 1em;
	height: 1em;
}

/* === TABLE === */
.blaek-table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
}

.blaek-table-widget table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	margin: 0;
}

.blaek-table-widget th,
.blaek-table-widget td {
	padding: 14px 16px;
	font-size: 15px;
	line-height: 1.5;
	vertical-align: middle;
	white-space: normal;
	word-wrap: break-word;
	min-width: 230px;
}

/* Header style */
.blaek-table-widget th {
	color: #14365D;
	font-weight: 600;
	border-bottom: 2px solid #14365D;
}

/* Row borders */
.blaek-table-widget tbody tr {
	border-bottom: 1px solid #e5e7eb;
}

.blaek-table-widget tbody tr:last-child {
	border-bottom: none;
}

.blaek-table-widget tbody td {
	color: #333;
}

.blaek-table-widget tbody tr:hover td {
	background: rgba(20, 70, 110, 0.06);
}

/* === SORTING === */
.blaek-table-widget[data-sorting="true"] th {
	cursor: pointer;
	user-select: none;
}

.blaek-th-inner {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Sort icon wrapper */
.blaek-sort-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #14365D;
	opacity: 0.5;
	transition: opacity 0.2s, color 0.2s;
	font-size: 14px;
}

.blaek-sort-icon i,
.blaek-sort-icon svg {
	font-size: inherit;
	width: 1em;
	height: 1em;
}

.blaek-sort-default,
.blaek-sort-asc,
.blaek-sort-desc {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

th:hover .blaek-sort-icon {
	opacity: 0.8;
}

th.sort-asc .blaek-sort-icon,
th.sort-desc .blaek-sort-icon {
	opacity: 1;
}

/* === PAGINATION === */
.blaek-table-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.blaek-page-info {
	font-size: 15px;
	color: #6b7280;
	user-select: none;
}

.blaek-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background-color: transparent;
	border: none;
	border-radius: 4px;
	color: #1f2937;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	font-size: 14px;
	font-weight: 500;
}

.blaek-page-btn svg,
.blaek-page-btn i {
	width: 1.2em;
	height: 1.2em;
	font-size: 1.2em;
	display: block;
}

.blaek-page-btn:hover:not(:disabled) {
	background-color: transparent;
	color: #0F7DC8; /* Default accent, will be overridden by Elementor selectors if changed */
}

.blaek-page-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Filter icon sizing */
.blaek-filter-icon i,
.blaek-filter-icon svg {
	font-size: inherit;
	width: 1em;
	height: 1em;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {
	.blaek-table-filters-container {
		flex-direction: column;
		border: none;
		gap: 0;
	}

	.blaek-table-filter {
		border: 0;
		width: 100% !important;
	}

	.blaek-filter-toggle {
		border-radius: 4px !important;
	}

	.blaek-table-search {
		align-self: stretch;
		max-width: 100%;
	}
}