/**
 * Bondelaget RJR — courses archive filter (pills variant).
 * Strukturelle styles. Spire-paletten hardkodet for konsistens på tvers av Astra-vars.
 */

.bondelaget-cf {
	background: #fff;
	border: 1px solid #e0e6e2;
	border-radius: 8px;
	padding: 1.5em 1.75em;
	margin: 0 0 2em;
	box-shadow: 0 1px 2px rgba(33, 87, 50, 0.04);
}

.bondelaget-cf-row {
	display: flex;
	align-items: flex-start;
	gap: 1.25em;
	padding: 0.85em 0;
}
.bondelaget-cf-row + .bondelaget-cf-row {
	border-top: 1px solid #e0e6e2;
}
.bondelaget-cf-row:first-child { padding-top: 0; }
.bondelaget-cf-row:last-of-type { padding-bottom: 0; }

.bondelaget-cf-row__label {
	flex: 0 0 130px;
	padding-top: 0.45em;
	font-family: 'Open Sans', system-ui, sans-serif;
	font-weight: 700;
	font-size: 0.7em;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: #7a8278;
	display: flex;
	align-items: center;
	gap: 0.45em;
	line-height: 1.2;
}
.bondelaget-cf-row__label svg {
	width: 13px;
	height: 13px;
	color: #00AD6F;
	flex-shrink: 0;
}

.bondelaget-cf-row__body {
	flex: 1 1 auto;
	min-width: 0;
}

@media (max-width: 720px) {
	.bondelaget-cf-row {
		flex-direction: column;
		gap: 0.55em;
	}
	.bondelaget-cf-row__label {
		flex: 0 0 auto;
		padding-top: 0;
	}
}

/* Search input */
.bondelaget-cf-search {
	width: 100%;
	border: 1.5px solid #e0e6e2;
	border-radius: 6px;
	padding: 0.65em 0.95em;
	font: inherit;
	font-size: 0.95em;
	color: #1a1f1c;
	background: #fafaf7;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.bondelaget-cf-search::placeholder { color: #7a8278; }
.bondelaget-cf-search:hover {
	border-color: #c9d3cc;
	background: #fff;
}
.bondelaget-cf-search:focus {
	outline: none;
	border-color: #00AD6F;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(0, 173, 111, 0.12);
}

/* Pills */
.bondelaget-cf-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
}

.bondelaget-cf-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.45em 0.95em;
	border: 1.5px solid #e0e6e2;
	border-radius: 999px;
	background: #fff;
	color: #4a5249;
	font-family: inherit;
	font-size: 0.85em;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s, font-weight 0.15s;
	user-select: none;
	white-space: nowrap;
}
.bondelaget-cf-pill:hover {
	background: #fff;
	border-color: #215732;
	color: #215732;
}
.bondelaget-cf-pill[data-active="true"] {
	background: #215732;
	border-color: #215732;
	color: #fff;
	font-weight: 600;
}
.bondelaget-cf-pill[data-active="true"]:hover {
	background: #1a4628;
	border-color: #1a4628;
	color: #fff;
}
.bondelaget-cf-pill[data-active="true"] .bondelaget-cf-pill__check {
	opacity: 1;
}
.bondelaget-cf-pill__check {
	width: 14px;
	height: 14px;
	opacity: 0;
	transition: opacity 0.15s;
	flex-shrink: 0;
}

/* "Alle"-pill — distinct from regular pills, never fills with green */
.bondelaget-cf-pill--all {
	font-weight: 600;
	color: #215732;
	border-color: #c9d3cc;
	background: #fff;
}
.bondelaget-cf-pill--all:hover {
	background: #fff;
	color: #215732;
	border-color: #215732;
}
.bondelaget-cf-pill--all[data-active="true"],
.bondelaget-cf-pill--all[data-active="true"]:hover {
	background: #fff;
	color: #215732;
	border-color: #215732;
	font-weight: 700;
	box-shadow: inset 0 0 0 2px rgba(33, 87, 50, 0.15);
}

/* Footer */
.bondelaget-cf-footer {
	margin-top: 1.25em;
	padding-top: 1em;
	border-top: 1px solid #e0e6e2;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	flex-wrap: wrap;
}

.bondelaget-cf-summary {
	font-size: 0.88em;
	color: #7a8278;
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}
.bondelaget-cf-summary::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #00AD6F;
	display: inline-block;
}
.bondelaget-cf-summary strong {
	color: #215732;
	font-weight: 700;
}

.bondelaget-cf-clear {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.5em 0.85em;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	font: inherit;
	font-size: 0.82em;
	font-weight: 600;
	color: #7a8278;
	cursor: pointer;
	transition: opacity 0.15s, background 0.15s, color 0.15s;
	white-space: nowrap;
}
.bondelaget-cf-clear svg {
	width: 13px;
	height: 13px;
}
.bondelaget-cf-clear:hover {
	background: #e8f7f0;
	color: #215732;
}
.bondelaget-cf-clear[data-active="false"] {
	opacity: 0;
	pointer-events: none;
}
.bondelaget-cf-clear[data-active="true"] {
	opacity: 1;
	color: #215732;
}

/* Hidden cards */
.scorm-course-card.bondelaget-cf-hidden {
	display: none;
}

/* ──────────────────────────────────────────────
   Course card — replace Level/Duration with taxonomy chips
   ────────────────────────────────────────────── */
.scorm-course-card .scorm-course-level,
.scorm-course-card .scorm-course-duration {
	display: none;
}

.bondelaget-card-tax {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin: 0.4em 0 0.6em;
}

.bondelaget-card-tax__chip {
	display: inline-flex;
	align-items: center;
	padding: 0.2em 0.65em;
	border-radius: 999px;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.4;
	white-space: nowrap;
}

.bondelaget-card-tax__chip--type {
	background: #215732;
	color: #fff;
}

.bondelaget-card-tax__chip--cat {
	background: rgba(0, 173, 111, 0.12);
	color: #008c5a;
	border: 1px solid rgba(0, 173, 111, 0.25);
}

/* Empty-state — vises hvis ingen treff */
.bondelaget-cf-empty {
	padding: 3em 2em;
	text-align: center;
	border: 1px dashed #c9d3cc;
	border-radius: 8px;
	color: #4a5249;
	margin-top: 1.5em;
	display: none;
}
.bondelaget-cf-empty[data-visible="true"] { display: block; }
.bondelaget-cf-empty__title {
	font-family: Merriweather, Georgia, serif;
	font-size: 1.1em;
	color: #215732;
	margin-bottom: 0.4em;
}
