/* ==========================================================================
   Quote Blocks — Ratings Carousel Frontend Styles
   ========================================================================== */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
.qb-ratings-carousel {
	--qb-star-fill:   #FFD700;
	--qb-star-border: #cc7a00;
	--qb-star-empty:  #d1d5db;
	--qb-grad-start:  #5FB9EB;
	--qb-grad-end:    #9077F7;
	--qb-card-radius: 10px;
	--qb-card-border: 1.5px solid transparent;
	--qb-avatar-size: 44px;
	--qb-transition:  0.45s cubic-bezier(0.4, 0, 0.2, 1);

	width: 100%;
	max-width: 860px;
	margin: 0 auto;
	padding: 12px 0 48px;
	position: relative;
	box-sizing: border-box;
}

/* ── Track ────────────────────────────────────────────────────────────────── */
.qb-carousel-track {
	position: relative;
	width: 100%;
}

/* ── Slide ────────────────────────────────────────────────────────────────── */
.qb-slide {
	display: none;
	width: 100%;
}

.qb-slide--active {
	display: block;
}

/* Fade animation */
.qb-slide--entering {
	display: block;
	animation: qbFadeIn 0.4s ease forwards;
}

.qb-slide--leaving {
	display: block;
	animation: qbFadeOut 0.4s ease forwards;
}

@keyframes qbFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0);   }
}

@keyframes qbFadeOut {
	from { opacity: 1; transform: translateY(0);   }
	to   { opacity: 0; transform: translateY(-8px);}
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.qb-card {
	background:    linear-gradient(white, white) padding-box,
	               linear-gradient(95.19deg, #5FB9EB 0%, #9077F7 100%) border-box;
	border:        1.5px solid transparent;
	border-radius: var(--qb-card-radius);
	padding:       36px 40px 32px;
	box-shadow:    0 4px 24px rgba(0, 0, 0, 0.06);
	box-sizing:    border-box;
	position:      relative;
}

/* ── Verified on G2 badge ───────────────────────────────────────────────────── */
.qb-card__badge {
	position:        absolute;
	top:             32px;
	right:           40px;
	display:         inline-flex;
	align-items:     center;
	gap:             8px;
	padding:         9px 16px;
	background:      #EEF0FB;
	border-radius:   10px;
	color:           #2E2A66;
	font-size:       1rem;
	font-weight:     600;
	line-height:     1;
	white-space:     nowrap;
}

.qb-card__badge-icon {
	flex-shrink: 0;
	color:       #4A21EF;
}

.qb-card__badge-label {
	margin:        0 !important;
	margin-bottom: 0 !important;
	color:         inherit;
}

/* ── Stars ────────────────────────────────────────────────────────────────── */
.qb-card__stars {
	display: flex;
	gap: 4px;
	margin-bottom: 20px;
}

.qb-star-wrap {
	display:         inline-flex;
	align-items:     center;
	justify-content: center;
	width:           26px;
	height:          26px;
	background:      var(--qb-star-border);
	clip-path:       polygon(50% 0%, 66% 28%, 98% 35%, 76% 59%, 79% 91%, 50% 78%, 21% 91%, 24% 59%, 2% 35%, 34% 28%);
}

.qb-star-wrap.empty {
	background: var(--qb-star-empty) !important;
}

.qb-star {
	display:   inline-block;
	width:     82%;
	height:    82%;
	background: var(--qb-star-fill);
	clip-path: polygon(50% 0%, 66% 28%, 98% 35%, 76% 59%, 79% 91%, 50% 78%, 21% 91%, 24% 59%, 2% 35%, 34% 28%);
}

.qb-star.half {
	background: linear-gradient(to right,
		var(--qb-star-fill)    0%,
		var(--qb-star-fill)   50%,
		var(--qb-star-empty)  50%,
		var(--qb-star-empty) 100%
	);
}

.qb-star.empty {
	background: var(--qb-star-empty) !important;
}

/* ── Quote icon ───────────────────────────────────────────────────────────── */
.qb-card__quote-icon {
	margin-bottom: 16px;
	line-height:   1;
}

.qb-card__quote-icon svg {
	display: block;
}

/* ── Quote text ───────────────────────────────────────────────────────────── */
.qb-card__quote {
	margin:      0 0 24px;
	padding:     0;
	border:      none;
	font-size:   1rem;
	line-height: 1.7;
	color:       #1a1a2e;
	font-style:  normal;
}

.qb-card__quote p {
	margin: 0;
	font-size:22px !important;
	line-height:130% !important;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */
.qb-card__divider {
	border:        none;
	border-top:    1px solid #e5e7eb;
	margin:        0 0 24px;
}

/* ── Author ───────────────────────────────────────────────────────────────── */
.qb-card__author {
	display:     flex;
	align-items: center;
	gap:         14px;
}

.qb-card__avatar {
	flex-shrink:     0;
	width:           var(--qb-avatar-size);
	height:          var(--qb-avatar-size);
	border-radius:   50%;
	background:      #4F46E5;
	color:           #ffffff;
	font-size:       0.875rem;
	font-weight:     700;
	letter-spacing:  0.04em;
	display:         flex;
	align-items:     center;
	justify-content: center;
	text-transform:  uppercase;
	overflow:        hidden;
}

.qb-card__avatar--image {
	background: transparent;
	padding:    0;
}

.qb-card__avatar--image img {
	width:      100%;
	height:     100%;
	object-fit: cover;
	display:    block;
	border-radius: 50%;
}

.qb-card__author-info {
	display:        flex;
	flex-direction: column;
	gap:            2px;
	padding-top: 10px;
}

.qb-card__author-name {
	margin:      0 !important;
	font-size:   0.9375rem;
	font-weight: 700;
	color:       #111827;
	line-height: 1.3;
}

.qb-card__author-role {
	margin:      0;
	font-size:   0.8125rem;
	color:       #6b7280;
	line-height: 1.4;
}

/* ── Controls ─────────────────────────────────────────────────────────────── */
.qb-carousel-controls {
	display:         flex;
	align-items:     center;
	justify-content: center;
	gap:             16px;
	margin-top:      28px;
}

/* Prev / Next buttons */
.qb-carousel-prev,
.qb-carousel-next {
	display:         flex;
	align-items:     center;
	justify-content: center;
	width:           36px;
	height:          36px;
	border:          none;
	background:      transparent;
	color:           #9ca3af;
	cursor:          pointer;
	border-radius:   50%;
	transition:      color 0.2s ease, background 0.2s ease;
	padding:         0;
}

.qb-carousel-prev:hover,
.qb-carousel-next:hover {
	color:      #6b7280;
	background: #f3f4f6;
}

.qb-carousel-prev:focus-visible,
.qb-carousel-next:focus-visible {
	outline:        2px solid var(--qb-grad-end);
	outline-offset: 2px;
}

/* Dots */
.qb-carousel-dots {
	display: flex;
	gap:     8px;
}

.qb-dot {
	width:         10px;
	height:        10px;
	border-radius: 50%;
	border:        none;
	padding:       0;
	background:    #d1d5db;
	cursor:        pointer;
	transition:    background var(--qb-transition),
	               transform 0.2s ease,
	               width 0.2s ease;
}

.qb-dot--active {
	background: var(--qb-grad-end);
	transform:  scale(1.2);
}

.qb-dot:focus-visible {
	outline:        2px solid var(--qb-grad-end);
	outline-offset: 2px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.qb-card {
		padding: 28px 24px 24px;
	}

	.qb-card__quote {
		font-size: 0.9375rem;
	}

	/* Let the badge flow above the stars instead of overlapping them */
	.qb-card__badge {
		position:      static;
		margin-bottom: 18px;
	}
}
