/* ===========================================================
   Husaini Lab Tests — Frontend Styles
   Ported from demo.html design tokens. Scoped under .hlt-wrap
   so it never collides with the active theme's styles.
   =========================================================== */

.hlt-wrap {
	--hlt-red-600: #C8102E;
	--hlt-red-700: #A30D24;
	--hlt-red-50: #FFF1F3;
	--hlt-red-100: #FFE1E6;
	--hlt-ink-900: #0E1116;
	--hlt-ink-700: #2A2F37;
	--hlt-ink-500: #5B6470;
	--hlt-ink-300: #A8B0BA;
	--hlt-ink-200: #CFD4DB;
	--hlt-line: #E5E8EC;
	--hlt-surface: #F7F8FA;
	--hlt-bg: #FFFFFF;
	--hlt-success: #0F8A4F;
	--hlt-success-50: #E7F6EE;
	--hlt-info: #1456CB;
	--hlt-shadow-1: 0 1px 2px rgba(14, 17, 22, .04);
	--hlt-shadow-2: 0 4px 12px rgba(14, 17, 22, .06);
	--hlt-shadow-3: 0 16px 40px rgba(14, 17, 22, .10);

	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	font-feature-settings: 'cv11', 'ss01', 'ss03';
	-webkit-font-smoothing: antialiased;
	color: var(--hlt-ink-900);
	background: var(--hlt-bg);
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	box-sizing: border-box;
}

.hlt-wrap *,
.hlt-wrap *::before,
.hlt-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Buttons ---------- */
.hlt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: inherit;
	font-weight: 600;
	font-size: 14px;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	transition: all .15s;
	white-space: nowrap;
	line-height: 1;
	text-decoration: none;
}

.hlt-btn-primary {
	background: var(--hlt-red-600);
	color: #fff;
	padding: 14px 22px;
	height: 48px;
	box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 1px 2px rgba(200, 16, 46, .3);
}

.hlt-btn-primary:hover {
	background: var(--hlt-red-700);
	color: #fff;
}

.hlt-btn-ghost {
	background: transparent;
	color: var(--hlt-red-600);
	padding: 12px 16px;
	height: 40px;
}

.hlt-btn-ghost:hover {
	background: var(--hlt-red-50);
}

.hlt-btn-sm {
	height: 36px;
	padding: 10px 14px;
	font-size: 13px;
}

/* ---------- Chips ---------- */
.hlt-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	background: var(--hlt-surface);
	color: var(--hlt-ink-700);
	font-size: 13px;
	font-weight: 500;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	user-select: none;
}

.hlt-chip.active {
	background: var(--hlt-red-600);
	color: #fff;
}

.hlt-chip-count {
	background: rgba(0, 0, 0, .06);
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

.hlt-chip.active .hlt-chip-count {
	background: rgba(255, 255, 255, .2);
}

.hlt-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
	display: inline-block;
}

.hlt-ic {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	stroke-width: 2;
	stroke: currentColor;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hlt-ic-sm {
	width: 14px;
	height: 14px;
}

/* ---------- Hero / Search ---------- */
.hlt-hero {
	padding: 56px 32px 40px;
	background: linear-gradient(180deg, #FFF8F9 0%, #FFFFFF 100%);
	position: relative;
	overflow: hidden;
}

.hlt-hero-inner {
	max-width: 1120px;
	margin: 0 auto;
	text-align: center;
	position: relative;
}

.hlt-hero-search {
	max-width: 680px;
	margin: 0 auto;
	position: relative;
}

.hlt-hero-search-input {
	height: 64px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid var(--hlt-line);
	box-shadow: var(--hlt-shadow-2);
	display: flex;
	align-items: center;
	padding: 0 8px 0 24px;
}

.hlt-hero-search-input .hlt-ic {
	width: 22px;
	height: 22px;
	color: var(--hlt-ink-500);
	margin-right: 14px;
}

.hlt-hero-search-input input {
	flex: 1;
	border: none;
	outline: none;
	font-family: inherit;
	font-size: 16px;
	color: var(--hlt-ink-900);
	background: transparent;
	min-width: 0;
}

/* ---------- Sticky bar (A-Z + categories) ---------- */
.hlt-sticky-bar {
	position: sticky;
	top: 0;
	background: #fff;
	border-bottom: 1px solid var(--hlt-line);
	z-index: 10;
}

.hlt-alphabet {
	padding: 14px 32px;
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.hlt-alphabet-letter {
	min-width: 32px;
	height: 32px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--hlt-ink-700);
	cursor: pointer;
	background: transparent;
	flex-shrink: 0;
	user-select: none;
}

.hlt-alphabet-letter:hover:not(.disabled) {
	background: var(--hlt-surface);
}

.hlt-alphabet-letter.active {
	background: var(--hlt-red-600);
	color: #fff;
}

.hlt-alphabet-letter.disabled {
	color: var(--hlt-ink-300);
	cursor: not-allowed;
}

.hlt-alphabet-divider {
	width: 1px;
	height: 24px;
	background: var(--hlt-line);
	margin: 0 6px;
	flex-shrink: 0;
}

.hlt-alphabet-meta {
	margin-left: auto;
	font-size: 13px;
	color: var(--hlt-ink-500);
	white-space: nowrap;
	padding-left: 16px;
}

.hlt-alphabet-meta strong {
	color: var(--hlt-ink-900);
	font-weight: 600;
}

.hlt-category-row {
	padding: 16px 32px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid var(--hlt-line);
	overflow-x: auto;
}

.hlt-sort-dropdown {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 14px;
	height: 36px;
	border: 1px solid var(--hlt-line);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	color: var(--hlt-ink-700);
	white-space: nowrap;
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	user-select: none;
}

.hlt-sort-dropdown:hover {
	background: var(--hlt-surface);
}

.hlt-sort-menu {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	background: #fff;
	border: 1px solid var(--hlt-line);
	border-radius: 12px;
	box-shadow: var(--hlt-shadow-3);
	min-width: 200px;
	padding: 6px;
	z-index: 20;
}

.hlt-sort-dropdown.open .hlt-sort-menu {
	display: block;
}

.hlt-sort-option {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	color: var(--hlt-ink-700);
	cursor: pointer;
	white-space: nowrap;
}

.hlt-sort-option:hover {
	background: var(--hlt-surface);
}

.hlt-sort-option.active {
	background: var(--hlt-red-50);
	color: var(--hlt-red-600);
}

/* ---------- Table ---------- */
.hlt-test-table {
	padding: 0 32px 32px;
}

.hlt-test-table-head {
	display: grid;
	grid-template-columns: 1.6fr 1fr 0.9fr 1fr 0.9fr 1.2fr;
	padding: 16px 24px;
	font-size: 12px;
	font-weight: 600;
	color: var(--hlt-ink-500);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--hlt-line);
	margin-top: 24px;
}

.hlt-test-row {
	display: grid;
	grid-template-columns: 1.6fr 1fr 0.9fr 1fr 0.9fr 1.2fr;
	padding: 20px 24px;
	border-bottom: 1px solid var(--hlt-line);
	align-items: center;
	transition: background .1s;
}

.hlt-test-row:hover {
	background: var(--hlt-surface);
}

.hlt-test-row:hover .hlt-row-actions {
	opacity: 1;
	transform: translateX(0);
}

.hlt-test-name {
	font-size: 15px;
	font-weight: 600;
	color: var(--hlt-ink-900);
}

.hlt-test-name small {
	display: block;
	font-size: 12px;
	color: var(--hlt-ink-500);
	font-weight: 400;
	margin-top: 3px;
}

.hlt-test-cat {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--hlt-ink-700);
}

.hlt-test-meta {
	font-size: 13px;
	color: var(--hlt-ink-700);
}

.hlt-test-price {
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	color: var(--hlt-ink-900);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.hlt-test-price small {
	display: block;
	font-size: 11px;
	color: var(--hlt-ink-500);
	font-weight: 500;
	margin-top: 2px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.hlt-test-price-strike {
	font-size: 13px;
	font-weight: 500;
	color: var(--hlt-ink-300);
	text-decoration: line-through;
	margin-left: 6px;
	letter-spacing: 0;
}

.hlt-row-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	opacity: .6;
	transition: all .15s;
}

/* ---------- Empty state / Loading / Load more ---------- */
.hlt-empty-state {
	padding: 64px 24px;
	text-align: center;
	color: var(--hlt-ink-500);
	font-size: 14px;
}

.hlt-load-more-wrap {
	display: flex;
	justify-content: center;
	padding: 28px 0 4px;
}

.hlt-loading {
	display: flex;
	justify-content: center;
	padding: 32px 0;
}

.hlt-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid var(--hlt-red-100);
	border-top-color: var(--hlt-red-600);
	border-radius: 50%;
	animation: hlt-spin .7s linear infinite;
}

@keyframes hlt-spin {
	to { transform: rotate(360deg); }
}

.hlt-test-rows.hlt-fading {
	opacity: 0.4;
	transition: opacity .15s;
}

/* ===========================================================
   Responsive: tablet
   =========================================================== */
@media (max-width: 1024px) {
	.hlt-hero,
	.hlt-alphabet,
	.hlt-category-row,
	.hlt-test-table {
		padding-left: 20px;
		padding-right: 20px;
	}
}

/* ===========================================================
   Responsive: mobile — table becomes stacked cards
   =========================================================== */
@media (max-width: 720px) {

	.hlt-hero {
		padding: 36px 16px 28px;
	}

	.hlt-hero-search-input {
		height: 56px;
		padding: 0 6px 0 16px;
		border-radius: 14px;
	}

	.hlt-hero-search-input input {
		font-size: 14px;
	}

	.hlt-hero-search-input .hlt-btn-primary {
		padding: 0 16px;
		height: 44px;
		font-size: 13px;
	}

	.hlt-alphabet,
	.hlt-category-row,
	.hlt-test-table {
		padding-left: 16px;
		padding-right: 16px;
	}

	.hlt-alphabet-meta {
		display: none; /* counter moves below on mobile, see .hlt-mobile-counter */
	}

	.hlt-category-row {
		flex-wrap: nowrap;
	}

	.hlt-sort-dropdown {
		margin-left: 0;
	}

	/* Table head hidden on mobile; rows become cards */
	.hlt-test-table-head {
		display: none;
	}

	.hlt-test-row {
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 16px;
		border-radius: 12px;
		border: 1px solid var(--hlt-line);
		margin-bottom: 12px;
		box-shadow: var(--hlt-shadow-1);
	}

	.hlt-test-row:last-child {
		margin-bottom: 0;
	}

	.hlt-test-cat,
	.hlt-test-meta,
	.hlt-test-price {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 13px;
	}

	.hlt-test-cat span,
	.hlt-test-meta span {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.hlt-test-cat::before,
	.hlt-test-meta::before {
		content: attr(data-label);
		font-size: 11px;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: .04em;
		color: var(--hlt-ink-300);
	}

	.hlt-test-price {
		font-size: 16px;
	}

	.hlt-test-price small {
		margin-top: 0;
	}

	.hlt-row-actions {
		opacity: 1;
		transform: none;
		justify-content: stretch;
		margin-top: 4px;
	}

	.hlt-row-actions .hlt-btn {
		flex: 1;
	}

	.hlt-test-table {
		padding-bottom: 24px;
	}
}
