.hrc-branded-title {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.hrc-lgnsw-brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 0.42rem;
	line-height: 1;
	vertical-align: middle;
}

.hrc-lgnsw-brand__logo {
	display: block;
	width: auto;
	object-fit: contain;
}

.hrc-lgnsw-brand__divider {
	align-self: stretch;
	width: 1px;
	background: #cfcfd3;
}

.hrc-lgnsw-brand__label {
	color: #10081d;
	font-weight: 700;
	letter-spacing: -0.02em;
	text-align: left;
}

.hrc-lgnsw-brand--compact .hrc-lgnsw-brand__logo {
	height: 1.65rem;
	max-width: 3.35rem;
}

.hrc-lgnsw-brand--compact .hrc-lgnsw-brand__divider {
	height: 2rem;
}

.hrc-lgnsw-brand--compact .hrc-lgnsw-brand__label {
	font-size: 0.72rem;
	line-height: 0.92;
}

.hrc-lgnsw-brand--detail .hrc-lgnsw-brand__logo {
	height: 2.75rem;
	max-width: 5.6rem;
}

.hrc-lgnsw-brand--detail .hrc-lgnsw-brand__divider {
	height: 3.4rem;
}

.hrc-lgnsw-brand--detail .hrc-lgnsw-brand__label {
	font-size: 1.2rem;
	line-height: 0.98;
}

/*
 * Keep the compact partner logo inside the template-name column. DataTables
 * renders separate header/body tables when horizontal scrolling is enabled,
 * so both copies need the same desktop constraints.
 */
@media (min-width: 1025px) {
	#templates-table tbody td.template-category {
		vertical-align: top;
	}

	[id="templates-table_wrapper"] .dt-scroll-head th:first-child,
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:first-child {
		width: 32%;
		min-width: 320px;
	}

	[id="templates-table_wrapper"] .dt-scroll-head th:nth-child(2),
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:nth-child(2) {
		width: 88px;
		min-width: 88px;
		white-space: nowrap;
	}

	[id="templates-table_wrapper"] .dt-scroll-head th:nth-child(3),
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:nth-child(3) {
		width: 96px;
		min-width: 96px;
		white-space: nowrap;
	}

	[id="templates-table_wrapper"] .dt-scroll-head th:nth-child(4),
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:nth-child(4),
	[id="templates-table_wrapper"] .dt-scroll-head th:nth-child(5),
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:nth-child(5) {
		width: 104px;
		min-width: 104px;
		white-space: nowrap;
	}

	[id="templates-table_wrapper"] .dt-scroll-head .template-category,
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table .template-category {
		width: 140px;
		min-width: 120px;
	}

	[id="templates-table_wrapper"] .dt-scroll-head th:nth-last-child(3),
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table .template-document {
		width: 100px;
		min-width: 100px;
		white-space: nowrap;
	}

	[id="templates-table_wrapper"] .dt-scroll-head th:nth-last-child(2),
	[id="templates-table_wrapper"] .dt-scroll-body #templates-table .td-action-wrap {
		width: 120px;
		min-width: 112px;
		white-space: nowrap;
		position: sticky !important;
		right: 0 !important;
		left: auto !important;
		z-index: 3;
		background: var(--white);
		box-shadow: -1px 0 0 var(--border-color);
	}

	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:first-child .hrc-branded-title {
		display: inline-flex;
		flex-wrap: nowrap;
		max-width: 100%;
		min-width: 0;
	}

	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:first-child .hrc-branded-title > a {
		flex: 1 1 0;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	[id="templates-table_wrapper"] .dt-scroll-body #templates-table td:first-child .hrc-lgnsw-brand--compact {
		flex: 0 0 8rem;
	}

	.dark-mode [id="templates-table_wrapper"] .dt-scroll-head th:nth-last-child(2),
	.dark-mode [id="templates-table_wrapper"] .dt-scroll-body #templates-table .td-action-wrap {
		background: var(--dark-bg-secondary, #1f2937);
		box-shadow: -1px 0 0 var(--dark-border, #374151);
	}
}

@media (min-width: 1025px) and (max-width: 1199px) {
	.dt-table-wrap {
		overflow-x: auto;
	}

	[id="templates-table_wrapper"] .dt-scroll {
		min-width: 1120px;
	}
}

@media (max-width: 767.98px) {
	.hrc-lgnsw-brand--compact {
		gap: 0.34rem;
	}

	.hrc-lgnsw-brand--compact .hrc-lgnsw-brand__logo {
		height: 1.35rem;
		max-width: 2.75rem;
	}

	.hrc-lgnsw-brand--compact .hrc-lgnsw-brand__divider {
		height: 1.7rem;
	}

	.hrc-lgnsw-brand--compact .hrc-lgnsw-brand__label {
		font-size: 0.62rem;
	}

	.hrc-lgnsw-brand--detail .hrc-lgnsw-brand__logo {
		height: 2.1rem;
		max-width: 4.3rem;
	}

	.hrc-lgnsw-brand--detail .hrc-lgnsw-brand__divider {
		height: 2.7rem;
	}

	.hrc-lgnsw-brand--detail .hrc-lgnsw-brand__label {
		font-size: 1rem;
	}
}
