.custom-table-wrapper {
	--slambo-table-accent: #2563eb;
	--slambo-table-accent-strong: #1e40af;
	--slambo-table-accent-soft: #dbeafe;
	--slambo-table-border: #cbd5e1;
	--slambo-table-panel: #ffffff;
	--slambo-table-text: #1f2937;
	position: relative;
	width: 100%;
	margin: 1.25rem 0;
	overflow-x: auto;
	overflow-y: hidden;
	color: var(--slambo-table-text);
	border: 1px solid var(--slambo-table-border);
	border-radius: 0.75rem;
	background: var(--slambo-table-panel);
	box-shadow: 0 4px 12px rgb(15 23 42 / 8%);
	scrollbar-color: var(--slambo-table-accent) #f1f5f9;
	scrollbar-width: thin;
	scrollbar-gutter: stable;
	box-sizing: border-box;
}

.custom-table-wrapper:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--slambo-table-accent) 42%, transparent);
	outline-offset: 3px;
}

.custom-table-wrapper::-webkit-scrollbar {
	height: 8px;
}

.custom-table-wrapper::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 4px;
}

.custom-table-wrapper::-webkit-scrollbar-thumb {
	border-radius: 4px;
	background: var(--slambo-table-accent);
}

.custom-table-wrapper::-webkit-scrollbar-thumb:hover {
	background: var(--slambo-table-accent-strong);
}

.entry-content .custom-table {
	width: 100%;
	margin: 0;
	color: var(--slambo-table-text);
	font-size: 13px;
	line-height: 1.45;
	border: 0;
	border-collapse: collapse;
	background: var(--slambo-table-panel);
	table-layout: auto;
}

.entry-content .custom-table caption {
	color: var(--slambo-table-text);
}

.entry-content .custom-table th,
.entry-content .custom-table td {
	padding: 0.75rem;
	font-size: inherit;
	line-height: inherit;
	text-align: left;
	vertical-align: top;
	border: 0;
	border-right: 1px solid var(--slambo-table-border);
	border-bottom: 1px solid var(--slambo-table-border);
	background: var(--slambo-table-panel);
	box-shadow: none;
	transition: none;
}

.entry-content .custom-table th:last-child,
.entry-content .custom-table td:last-child {
	border-right: 0;
}

.entry-content .custom-table tbody tr:last-child > * {
	border-bottom: 0;
}

.entry-content .custom-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	color: #ffffff;
	font-weight: 700;
	background: linear-gradient(135deg, var(--slambo-table-accent-strong), #3b82f6);
}

.entry-content .custom-table thead th:first-child,
.entry-content .custom-table tbody th[scope="row"],
.entry-content .custom-table tbody td:first-child {
	color: var(--slambo-table-accent-strong);
	font-weight: 700;
	background: var(--slambo-table-accent-soft);
}

.entry-content .custom-table tbody tr:hover > * {
	color: var(--slambo-table-accent-strong);
	background: var(--slambo-table-accent-soft);
	box-shadow: inset 0 -1px #93c5fd;
	transform: none;
}

.entry-content .custom-table tbody tr:hover > :first-child {
	color: #0c4a6e;
	background: #e0f2fe;
}

.custom-table thead.replaced-by-clone {
	visibility: hidden;
}

.slambo-table__sticky {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 20;
	display: block;
	overflow: hidden;
	color: var(--slambo-table-text, #1f2937);
	border: 1px solid var(--slambo-table-border, #cbd5e1);
	border-radius: 0 0 0.625rem 0.625rem;
	background: var(--slambo-table-panel, #ffffff);
	box-shadow: 0 8px 24px rgb(15 23 42 / 16%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	box-sizing: border-box;
	transition: opacity 120ms ease-out;
}

.slambo-table__sticky.is-visible {
	visibility: visible;
}

.slambo-table__sticky .custom-table {
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
	background: var(--slambo-table-panel, #ffffff);
	will-change: transform;
}

.slambo-table__sticky .custom-table th {
	position: static;
	padding: 0.75rem;
	color: #ffffff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.45;
	text-align: left;
	vertical-align: top;
	border: 0;
	border-right: 1px solid var(--slambo-table-border, #cbd5e1);
	border-bottom: 1px solid var(--slambo-table-border, #cbd5e1);
	background: linear-gradient(135deg, var(--slambo-table-accent-strong, #1e40af), #3b82f6);
	box-sizing: border-box;
}

.slambo-table__sticky .custom-table th:first-child {
	color: var(--slambo-table-accent-strong, #1e40af);
	background: var(--slambo-table-accent-soft, #dbeafe);
}

.slambo-table__cue {
	position: sticky;
	right: 0.75rem;
	bottom: 0.75rem;
	z-index: 3;
	display: flex;
	float: right;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin-top: -3.25rem;
	margin-right: 0.75rem;
	margin-bottom: 0.75rem;
	color: var(--slambo-table-accent);
	border: 1px solid color-mix(in srgb, var(--slambo-table-accent) 28%, transparent);
	border-radius: 999px;
	background: rgb(255 255 255 / 94%);
	box-shadow: 0 3px 12px rgb(15 23 42 / 14%);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 180ms ease;
}

.slambo-table__cue.is-visible {
	opacity: 1;
	visibility: visible;
}

.slambo-table__cue svg {
	width: 1.25rem;
	height: 1.25rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 160ms ease;
}

.slambo-table__cue[data-direction="left"] svg {
	transform: rotate(180deg);
}

[data-theme="dark"] .custom-table-wrapper {
	--slambo-table-accent: #10b981;
	--slambo-table-accent-strong: #065f46;
	--slambo-table-accent-soft: #163f37;
	--slambo-table-border: #334155;
	--slambo-table-panel: #111827;
	--slambo-table-text: #f1f5f9;
	box-shadow: 0 6px 18px rgb(0 0 0 / 24%);
	scrollbar-color: var(--slambo-table-accent) #374151;
}

[data-theme="dark"] .custom-table-wrapper::-webkit-scrollbar-track {
	background: #374151;
}

[data-theme="dark"] .entry-content .custom-table thead th,
[data-theme="dark"] .slambo-table__sticky .custom-table th {
	color: #f8fafc;
	background: #1f2937;
}

[data-theme="dark"] .entry-content .custom-table thead th:first-child,
[data-theme="dark"] .entry-content .custom-table tbody th[scope="row"],
[data-theme="dark"] .entry-content .custom-table tbody td:first-child,
[data-theme="dark"] .slambo-table__sticky .custom-table th:first-child {
	color: #d1fae5;
	background: #065f46;
}

[data-theme="dark"] .entry-content .custom-table tbody tr:hover > * {
	color: #f8fafc;
	background: #0f172a;
	box-shadow: inset 0 -1px #10b981;
}

[data-theme="dark"] .entry-content .custom-table tbody tr:hover > :first-child {
	color: #ecfdf5;
	background: #047857;
}

[data-theme="dark"] .slambo-table__cue {
	color: #10b981;
	border-color: #334155;
	background: rgb(31 41 55 / 94%);
}

@media (max-width: 767px) {
	.entry-content .custom-table th,
	.entry-content .custom-table td,
	.slambo-table__sticky .custom-table th {
		min-width: 120px;
		padding: 0.75rem;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.slambo-table__sticky,
	.slambo-table__cue,
	.slambo-table__cue svg {
		transition: none;
	}
}

@media print {
	.custom-table-wrapper {
		overflow: visible;
		box-shadow: none;
	}

	.slambo-table__sticky,
	.slambo-table__cue {
		display: none;
	}
}
