/*
 * Review source badge — Google / SuperDoc / Здравето (left on our site).
 * Markup: zdraveto_testimonial_source_badge() in inc/testimonial-sources.php.
 *
 * Plain CSS on purpose (no build toolchain in the agent's environment — same
 * call as assets/css/blocks/*.css). Colours/size follow .testimonial-card__date,
 * the other muted meta line in the card header.
 */

.testimonial-source {
	/* Containing block for the absolutely positioned .screen-reader-text inside.
	   Without it the span resolves against the section, escapes the carousel's
	   overflow clip and widens the whole document (horizontal scroll on mobile). */
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.1875rem 0.5rem 0.1875rem 0.375rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
	border-radius: 999px;
	background: var(--wp--preset--color--white);
	font-size: 0.75rem;
	line-height: 1rem;
	font-weight: 400;
	color: color-mix(in srgb, var(--wp--preset--color--primary) 75%, transparent);
	white-space: nowrap;
	vertical-align: middle;
}

.testimonial-source svg {
	width: 0.875rem;
	height: 0.875rem;
	flex: 0 0 auto;
	display: block;
}

/* SuperDoc: the official superdoc.bg wordmark replaces icon + label. */
.testimonial-source__wordmark {
	height: 0.875rem;
	width: auto;
	flex: 0 0 auto;
	display: block;
}

.testimonial-source--superdoc {
	padding-left: 0.5rem;
}

/* In the review card: pushed to the far end of the stars row. */
.testimonial-card__rating .testimonial-source {
	margin-left: auto;
}

/* The default quote carousel (homepage band): sits after the author name. */
.testimonial-author .testimonial-source {
	margin-left: 0.5rem;
}

/* Homepage Google band: "G 4,7 / 5 от 1 638 отзива в Google  Всички отзиви →" */
.google-reviews-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin: 0.75rem 0 1.5rem;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: color-mix(in srgb, var(--wp--preset--color--primary) 75%, transparent);
}

.google-reviews-summary strong {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

.google-reviews-summary a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Shared testimonials block (#1520): „[G] 4,7 / 5 1 640 мнения“ and
   „[superdoc.bg] 4,9 / 5 17 739 мнения“, one under the other.
   Markup: [zd_reviews_summary] in inc/testimonial-sources.php. */
/* Grid, so the scores and counts of both lines sit in columns although the
   two badges differ in width. */
.reviews-summary {
	display: grid;
	/* Last column may wrap: the survey line ("14 084 отговора · 97% препоръчват")
	   is wider than a phone. */
	grid-template-columns: max-content max-content minmax(0, 1fr);
	min-width: 0;
	max-width: 100%;
	align-items: center;
	gap: 0.5rem;
	/* Air before the avatar row below (client, 2026-11-23). */
	margin-bottom: 1.5rem;
}

.reviews-summary__line {
	display: contents;
}

.reviews-summary .testimonial-source {
	justify-self: start;
}

/* Doctor page: post-visit survey card under the SuperDoc rating
   (zdraveto_survey_doctor_card_html in inc/survey/survey-reviews.php).
   Reuses the .rating card styles from _doctor-single-post.scss. */
.doctor-short-bio-row .right-part {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Two cards (SuperDoc + survey) stacked are ~600px tall, while a short bio is
   ~120px — a large white hole on the left (client, 2026-11-23, Атанасова).
   On a wide desktop lay them side by side: the row drops to one card's height. */
@media (min-width: 1200px) {
	.doctor-short-bio-row .right-part:has(> .rating + .rating) {
		flex-direction: row;
	}
}

/* Tablet / small laptop (768–1199): the cards don't fit beside the bio, so the
   bio takes the full width and the two cards share a row under it. */
@media (min-width: 768px) and (max-width: 1199px) {
	.doctor-short-bio-row:has(.right-part > .rating + .rating) {
		flex-wrap: wrap;
		row-gap: 2rem;
	}

	.doctor-short-bio-row:has(.right-part > .rating + .rating) .left-part {
		flex-basis: 100%;
		max-width: none;
	}

	.doctor-short-bio-row .right-part:has(> .rating + .rating) {
		flex-direction: row;
		width: 100%;
	}

	.doctor-short-bio-row .right-part:has(> .rating + .rating) > .rating {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}
}

.rating--survey__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.rating--survey__head .points:empty {
	display: none;
}

.rating--survey .feedback-scores .separator.survey-bar {
	background: color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
	overflow: hidden;
}

.rating--survey .survey-bar span {
	display: block;
	height: 100%;
	background: var(--wp--preset--color--secondary);
	border-radius: inherit;
}
