.custom-table-responsive table {
	border-collapse: collapse;
}

.custom-table-responsive th,
.custom-table-responsive td {
	position: relative;
	padding: 0.75rem;
	text-align: center;
	vertical-align: middle;
	min-width: 1rem;
}

/* Overrides the text block's own alignment classes so every cell is centered */
body .custom-table-responsive .custom-table-cell-content [data-sdc-field="text"],
body .custom-table-responsive .custom-table-cell-content [data-sdc-field="text"] * {
	text-align: center;
}

.custom-table-responsive .custom-table-cell-empty {
	min-width: 100px;
}

.custom-table-responsive thead th {
	background-color: #0a5087;
	font-weight: 700;
}

/* Cells covered by a merged header cell stay in the DOM so cell order is preserved on save */
.custom-table-responsive thead th[hidden] {
	display: none !important;
}

.custom-table-responsive thead th,
.custom-table-responsive thead th p,
.custom-table-responsive thead th h1,
.custom-table-responsive thead th h2,
.custom-table-responsive thead th h3,
.custom-table-responsive thead th h4,
.custom-table-responsive thead th h5,
.custom-table-responsive thead th h6,
.custom-table-responsive thead th span,
.custom-table-responsive thead th div {
	color: white !important;
}

.custom-table-responsive p {
	margin: 0;
}

.custom-table-responsive td .text-wrapper,
.custom-table-responsive th .text-wrapper {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.custom-table-row-controls {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	gap: 6px;
	opacity: 0;
	pointer-events: none;
}

.custom-table-responsive tr:hover .custom-table-row-controls {
	opacity: 1;
	pointer-events: auto;
}

.custom-table-merge-controls {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 2;
	display: flex;
	gap: 4px;
	opacity: 0;
	pointer-events: none;
}

.custom-table-responsive thead th:hover > .custom-table-merge-controls {
	opacity: 1;
	pointer-events: auto;
}

.custom-table-row-controls button,
.custom-table-merge-controls button {
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.08);
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	border-radius: 3px;
}

.custom-table-row-controls button {
	padding: 2px 6px;
	width: 28px;
	height: 28px;
}

.custom-table-merge-controls button {
	color: #0a5087 !important;
	padding: 0;
	width: 24px;
	height: 24px;
}

.custom-table-merge-controls button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.custom-table-row-controls button.custom-table-row-remove,
.custom-table-merge-controls button.custom-table-unmerge {
	background: rgba(250, 230, 230, 0.95);
}
