/**
 * Category header bar — dot + title + (optional) divider line + (optional) CTA link button.
 *
 * Shared between:
 *  - Single post page (renders the post's primary category, with link button to the archive)
 *  - Category archive page (renders the current category, no link button or divider)
 *
 * Figma node 516:3598 — flex row, gap 15px, items-end.
 *
 * @package Hamechadesh
 */

.hm-single-cat-header {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	margin-bottom: 30px;
	margin-top: 30px;
}

/* Colored dot (rightmost in RTL = first in DOM) */
.hm-single-cat-header__dot {
	flex-shrink: 0;
	align-self: center;
}

/* Category title — Pompei Black 32px */
.hm-single-cat-header__title {
	font-family: var(--hm-font-primary);
	font-size: 32px;
	font-weight: 900;
	line-height: 1;
	color: var(--hm-color-primary);
	white-space: nowrap;
	flex-shrink: 0;
}

/* Divider line — stretches between title and button */
.hm-single-cat-header__line {
	flex: 1;
	min-width: 0;
	border-bottom: 0.6px solid var(--hm-color-primary);
	opacity: 0.25;
	margin-bottom: 4px;
}

/* Category page link button — accent pill */
.hm-single-cat-header__link-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	padding: 5px 25px;
	background-color: var(--hm-single-cat-accent);
	border-radius: 6px;
	font-family: var(--hm-font-primary);
	font-weight: 300;
	font-size: 16px;
	line-height: 22px;
	color: #ffffff;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity var(--hm-transition-fast);
}

.hm-single-cat-header__link-btn:hover {
	opacity: 0.85;
	color: #ffffff;
}

/* Desktop: show text, hide icon */
.hm-single-cat-header__link-btn-icon {
	display: none;
}

/* Archive variant — no link button, so the line should stretch to the end. */
.hm-single-cat-header--archive .hm-single-cat-header__line {
	margin-inline-end: 0;
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */

@media (max-width: 767px) {
	/* Mobile: flush to viewport top + 10px side padding. */
	.hm-single-cat-header {
		margin-top: 0;
		padding: 0 10px !important;
	}

	/* Mobile: hide text, show double-chevron icon */
	.hm-single-cat-header__link-btn {
		padding: 5px 10px;
	}

	.hm-single-cat-header__link-btn-text {
		display: none;
	}

	.hm-single-cat-header__link-btn-icon {
		display: block;
	}
}
