/* Frontend + editor styles for omg/trustindex-carousel.
 *
 * Authored star-rating header above a carousel of live Google review cards.
 * The carousel reuses omg/carousel's scroll engine and arrow chrome; the slide
 * sizing here overrides that block's single-focus widths for a multi-card row. */

.omg-trustindex-carousel {
	box-sizing: border-box;
	padding: var( --wp--preset--spacing--space-100, 100px )
		var( --wp--preset--spacing--space-20, 20px );
	background: #f6faff;
}

.omg-trustindex-carousel__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var( --wp--preset--spacing--space-32, 32px );
	max-width: 700px;
	margin: 0 auto var( --wp--preset--spacing--space-48, 48px );
	text-align: center;
}

.omg-trustindex-carousel__header > * {
	margin: 0;
}

/* The carousel sits at the section's full content width. */

.omg-trustindex-carousel__carousel {
	margin-inline: auto;
}

/* Override omg/carousel's single-focus slide width: show up to three cards. The
 * doubled wrapper class outweighs that block's `.is-scroll-manual` rules. */

.omg-trustindex-carousel__carousel.is-scroll-manual .omg-carousel__track {
	align-items: stretch;
	padding-inline: 0;
}

.omg-trustindex-carousel__carousel.is-scroll-manual .omg-carousel-slide {
	flex: 0 0 86%;
}

@media (min-width: 600px) {

	.omg-trustindex-carousel__carousel.is-scroll-manual .omg-carousel-slide {
		flex-basis: calc( ( 100% - var( --omg-carousel-gap ) ) / 2 );
	}
}

@media (min-width: 834px) {

	.omg-trustindex-carousel__carousel.is-scroll-manual .omg-carousel-slide {
		flex-basis: calc( ( 100% - 2 * var( --omg-carousel-gap ) ) / 3 );
	}
}

/* Card. */

.omg-feedback-card {
	display: flex;
	flex-direction: column;
	gap: var( --wp--preset--spacing--space-32, 32px );
	box-sizing: border-box;
	padding: var( --wp--preset--spacing--space-32, 32px );
	border-radius: 24px;
	background: var( --wp--preset--color--white, #fff );
}

.omg-feedback-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var( --wp--preset--spacing--space-16, 16px );
}

.omg-feedback-card__profile {
	display: flex;
	align-items: center;
	gap: var( --wp--preset--spacing--space-16, 16px );
	min-width: 0;
}

.omg-feedback-card__avatar {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 9999px;
	object-fit: cover;
}

.omg-feedback-card__avatar.is-placeholder {
	background: var( --wp--preset--color--primary, #3354ff );
}

.omg-feedback-card__label {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.5;
}

.omg-feedback-card__name {
	overflow: hidden;
	color: #0f1125;
	font-family: var( --wp--preset--font-family--inter );
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.32px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.omg-feedback-card__date {
	color: rgba( 0, 28, 68, 0.7 );
	font-family: var( --wp--preset--font-family--inter );
	font-size: 15px;
}

.omg-feedback-card__logo {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
}

.omg-feedback-card__body {
	display: flex;
	flex-direction: column;
	gap: var( --wp--preset--spacing--space-20, 20px );
}

.omg-feedback-card__text {
	margin: 0;
	color: #0f1125;
	font-family: var( --wp--preset--font-family--inter );
	font-size: 15px;
	line-height: 1.6;
}

/* JS clamps the copy to four lines and only then reveals the toggle. */

.omg-feedback-card.is-clamped .omg-feedback-card__text {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.omg-feedback-card__more {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var( --wp--preset--color--dark-blue, #001c44 );
	font-family: var( --wp--preset--font-family--inter );
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.omg-feedback-card__more[hidden] {
	display: none;
}

.omg-feedback-card__more-icon {
	display: inline-flex;
	transition: transform 0.2s ease;
}

.omg-feedback-card__more-icon svg {
	display: block;
	width: 12px;
	height: 8px;
}

.omg-feedback-card.is-expanded .omg-feedback-card__more-icon {
	transform: rotate( 180deg );
}

