/*
 * Route — center badge (W1a proposal)
 * «تقدمها» + the center name + the center logo, on course cards and the course detail page.
 * RTL-first: the live site is html[dir=rtl][lang=ar]. Uses the theme's own
 * --mainColor token (emitted inline in wp_head by remah-academy) with a fallback,
 * so the badge follows the site colour without hard-coding it.
 * Scoped entirely under .route-center-badge — it cannot affect existing markup.
 */

.route-center-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #4b5563;
	direction: rtl;
	text-align: right;
}

.route-center-badge__img {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: contain;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	padding: 2px;
	box-sizing: content-box;
}

.route-center-badge__text {
	min-width: 0; /* lets a long center name ellipsize instead of stretching the card */
}

.route-center-badge__name {
	font-weight: 700;
	color: var(--mainColor, #023c5b);
	overflow-wrap: anywhere;
}

/* Course cards (.single-courses .courses-content) — compact, one line if possible. */
.route-center-badge--card {
	font-size: 13px;
	margin-top: 8px;
}

.route-center-badge--card .route-center-badge__text {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Course detail page (next to .courses-details-admin) — a little more presence. */
.route-center-badge--detail {
	margin: 12px 0 0;
	padding: 8px 12px;
	font-size: 15px;
	background: rgba(2, 60, 91, 0.04);
	border-radius: 10px;
	border: 1px solid rgba(2, 60, 91, 0.08);
}

.route-center-badge--detail .route-center-badge__img {
	width: 36px;
	height: 36px;
}

@media (max-width: 575px) {
	.route-center-badge--detail {
		font-size: 14px;
	}
}

/* Keep the badge readable if the theme ever renders it inside a dark block. */
.route-center-badge--on-dark,
.route-center-badge--on-dark .route-center-badge__name {
	color: #fff;
}
