.epv-excel-table-wrapper {
	margin: 20px 0;
	/* Mapped from misc/mantineTheme.ts lightColors */
	--epv-primary: #312e81;
	--epv-primary-hover: #2b286f;
	--epv-primary-active: #24225f;
	--epv-hover: #f3f4f6;
	--epv-active: #e7e7f6;
	--epv-surface: #ffffff;
	--epv-border: #e2e8f0;
	--epv-border-strong: #cbd5e1;
	--epv-text: #0f172a;
	--epv-text-muted: #475569;
	--epv-text-subtle: #64748b;
	--epv-text-inverted: #ffffff;
	--epv-row-hover: #f1f5f9;
}
.epv-excel-table-wrapper h3 { margin-bottom: 15px; }

.epv-excel-actions {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	row-gap: 10px;
	column-gap: 22px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.epv-excel-toggle {
	padding: 0.25rem 0.75rem;
	border: 1px solid var(--epv-primary);
	border-radius: 0.25rem;
	background: var(--epv-active);
	color: var(--epv-primary);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.epv-excel-toggle:hover,
.epv-excel-toggle:focus-visible {
	background: var(--epv-hover);
	border-color: var(--epv-primary);
	color: var(--epv-primary);
	box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.2);
	outline: none;
}

.epv-excel-toggle:focus {
	outline: none;
	box-shadow: none;
}

.epv-excel-download {
	white-space: nowrap;
}

.epv-excel-actions .epv-excel-download.btn {
	background-color: var(--epv-primary);
	border-color: var(--epv-primary);
	color: var(--epv-text-inverted);
	font-weight: 600;
	transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.epv-excel-actions .epv-excel-download.btn:hover,
.epv-excel-actions .epv-excel-download.btn:focus-visible {
	background-color: var(--epv-primary-hover);
	border-color: var(--epv-primary-hover);
	color: var(--epv-text-inverted);
	box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.2);
	outline: none;
}

.epv-excel-actions .epv-excel-download.btn:focus {
	outline: none;
	box-shadow: none;
}

.epv-excel-actions .epv-excel-download.btn:active {
	background-color: var(--epv-primary-active);
	border-color: var(--epv-primary-active);
	color: var(--epv-text-inverted);
}

.epv-excel-collapsible {
	margin-top: 12px;
}

.epv-excel-tech-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 10px;
}

.epv-tech-filter-btn {
	border: 1px solid var(--epv-border-strong);
	background: var(--epv-surface);
	color: var(--epv-text);
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.8em;
	line-height: 1.2;
	cursor: pointer;
	transition: all 0.2s ease;
}

.epv-tech-filter-btn:hover,
.epv-tech-filter-btn:focus-visible {
	background: var(--epv-hover);
	border-color: var(--epv-primary);
	color: var(--epv-primary);
	box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.2);
	outline: none;
}

.epv-tech-filter-btn:focus {
	outline: none;
	box-shadow: none;
}

.epv-tech-filter-btn.active {
	background: var(--epv-primary);
	color: var(--epv-text-inverted);
	border-color: var(--epv-primary);
}

.epv-tech-filter-missing {
	font-size: 0.85em;
	color: var(--epv-text-subtle);
	font-style: italic;
}

.epv-fallback-search {
	width: min(360px, 100%);
	padding: 6px 10px;
	border: 1px solid var(--epv-border);
	border-radius: 6px;
	font-size: 0.85em;
	color: var(--epv-text);
	background: var(--epv-surface);
	margin-bottom: 8px;
}

.epv-excel-xscroll {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	margin-bottom: 6px;
	-webkit-overflow-scrolling: touch;
}

.epv-excel-xscroll-inner {
	height: 1px;
}

.epv-excel-table-scroll {
	width: 100%;
	max-height: min(70vh, 640px);
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-gutter: stable both-edges;
	-webkit-overflow-scrolling: touch;
}

.epv-excel-table-wrapper .dataTables_scrollBody {
	overflow-x: hidden !important;
}

table.epv-excel-table {
	width: max-content !important;
	min-width: 100%;
	border-collapse: collapse;
	font-size: 0.85em;
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	border-top: 2px solid #000;
	border-bottom: 2px solid #000;
}

table.epv-excel-table thead th {
	background: none;
	color: #000;
	padding: 8px 6px;
	text-align: left;
	font-weight: 700;
	white-space: nowrap;
	border: none;
	border-bottom: 1px solid #000;
	cursor: default;
}

.epv-excel-hint {
	font-size: 0.8em;
	color: var(--epv-text-subtle);
	margin-top: -10px;
	margin-bottom: 10px;
}

table.epv-excel-table tbody td {
	padding: 5px 6px;
	border: none;
	text-align: left;
}

table.epv-excel-table tbody tr { border-bottom: none; }
table.epv-excel-table tbody tr:hover { background-color: var(--epv-row-hover); }

table.epv-excel-table tbody td a {
	color: #000;
	text-decoration: underline;
}

table.epv-excel-table tbody td a:hover { color: #555; }
