/**
 * KSquare Reviews - Frontend Styles
 * Figma-matched styling for Customer Reviews section
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
	--ksq-star-color-hero: rgba(255, 160, 51, 1);
	--ksq-star-color: #219653;
	--ksq-star-empty: #DCDCE6;
	--ksq-text-primary: #111111;
	--ksq-text-secondary: #444444;
	--ksq-text-tertiary: #666666;
	--ksq-border: #DDDDDD;
	--ksq-bg-light: #FAFAFA;
	--ksq-verified-color: #666666;
	--ksq-primary: #FF5100;
	--ksq-avatar-bg: #FDF0E9;
	--ksq-avatar-color: #6F2700;
}

/* ==========================================================================
   Star Rating - Clean Minimal SVG Stars
   ========================================================================== */

.ksq-stars {
	display: flex;
	align-items: center;
	gap: 2px;
}

/* Hero style: Orange SVG stars (above title) */
.ksq-pdp-rating__stars {
	width: 100px;
	height: 20px;
}

.ksq-pdp-rating__star {
	width: 18px;
	height: 18px;
	color: #DCDCE6;
}

.ksq-pdp-rating__star.filled {
	color: #FFA033;
}

/* Review style: Trustpilot colored boxes with white star inside */
.ksq-star-box {
	width: 24px;
	height: 24px;
	background: #DCDCE6;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ksq-star-box__icon {
	width: 16.8px;
	height: 16.8px;
	color: #fff;
}

/* Trustpilot Rating Colors - Based on rating level */
/* Bad: 1-1.5 stars - Red */
.ksq-stars--bad .ksq-star-box.filled {
	background: #E84646;
}

/* Poor: 2-2.5 stars - Orange */
.ksq-stars--poor .ksq-star-box.filled {
	background: #FF8C00;
}

/* Average: 3-3.5 stars - Yellow */
.ksq-stars--average .ksq-star-box.filled {
	background: #FFCE00;
}

/* Great: 4 stars - Light Green */
.ksq-stars--great .ksq-star-box.filled {
	background: #73CF11;
}

/* Excellent: 4.5-5 stars - Green */
.ksq-stars--excellent .ksq-star-box.filled {
	background: #00B67A;
}

/* ==========================================================================
   PDP Rating (Above Title)
   ========================================================================== */

.ksq-pdp-rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.ksq-pdp-rating--link {
	text-decoration: none;
	color: inherit;
}

.ksq-pdp-rating--link:hover .ksq-pdp-rating__link {
	color: var(--ksq-primary);
}

.ksq-pdp-rating__stars {
	display: flex;
	gap: 2px;
	align-items: center;
}

.ksq-pdp-rating__text {
	color: #444;
	font-family: "Roboto Flex", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	font-weight: 400;
}

.ksq-pdp-rating__link {
	color: #444;
	font-family: "Roboto Flex", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	font-weight: 400;
	text-decoration: none;
}

.ksq-pdp-rating__link:hover {
	color: var(--ksq-primary);
}

/* ==========================================================================
   PDP Review Slider
   ========================================================================== */

.ksq-pdp-reviews-slider {
	position: relative;
	background: var(--ksq-bg-light);
	border-radius: 12px;
	padding: 20px;
	margin-top: 16px;
}

.ksq-pdp-reviews-slider__track {
	position: relative;
	min-height: 140px;
	overflow: hidden;
}

.ksq-pdp-review-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ksq-pdp-review-slide.active {
	position: relative;
	opacity: 1;
	visibility: visible;
}

.ksq-pdp-review-slide__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.ksq-pdp-review-slide__verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	color: var(--ksq-verified-color);
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
}

.ksq-pdp-review-slide__date {
	font-size: 14px;
	color: var(--ksq-text-secondary);
	font-family: "Roboto Flex", sans-serif;
}

.ksq-pdp-review-slide__title {
	font-size: 18px;
	font-weight: 600;
	color: #222222;
	margin-bottom: 8px;
	font-family: "Roboto Flex", sans-serif;
}

.ksq-pdp-review-slide__text {
	font-size: 18px;
	line-height: 26px;
	color: #222222;
	margin-bottom: 12px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 600;
}

.ksq-pdp-review-slide__author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ksq-pdp-review-slide__avatar {
	width: 60px;
	height: 60px;
	aspect-ratio: 1/1;
	border-radius: 50%;
	object-fit: cover;
}

.ksq-pdp-review-slide__avatar.ksq-avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ksq-avatar-bg);
	color: var(--ksq-avatar-color);
	font-weight: 700;
	font-size: 16px;
	font-family: "Roboto Flex", sans-serif;
}

.ksq-pdp-review-slide__name {
	font-size: 16px;
	font-weight: 600;
	color: var(--ksq-text-primary);
	font-family: "Roboto Flex", sans-serif;
}

.ksq-pdp-review-slide__location {
	font-size: 14px;
	color: var(--ksq-text-tertiary);
	font-family: "Roboto Flex", sans-serif;
}

/* Slider Navigation */
.ksq-pdp-reviews-slider__prev,
.ksq-pdp-reviews-slider__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	background: #fff;
	border: 1px solid var(--ksq-border);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1A1A1A;
	transition: all 0.2s ease;
	z-index: 2;
}

.ksq-pdp-reviews-slider__prev {
	left: -16px;
}

.ksq-pdp-reviews-slider__next {
	right: -16px;
}

.ksq-pdp-reviews-slider__prev:hover,
.ksq-pdp-reviews-slider__next:hover {
	background: var(--ksq-primary);
	border-color: var(--ksq-primary);
	color: #fff;
}

/* ==========================================================================
   Reviews Section - Figma Design
   ========================================================================== */

.ksq-reviews-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 60px;
	padding-bottom: 0;
	gap: 50px;
	max-width: 1000px;
	margin: 0 auto;
}

.ksq-reviews-section__title {
	width: 100%;
	font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	font-style: normal;
	font-weight: 400;
	font-size: 44px;
	line-height: 60px;
	text-align: center;
	color: #000000;
	margin: 0;
}

/* Header Layout - Figma: Group 1437258843 (1000px × 162px) */
.ksq-reviews-section__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: 100%;
	max-width: 1000px;
	min-height: 162px;
	position: relative;
	gap: 20px;
	padding: 0 20px;
	box-sizing: border-box;
}

@media (max-width: 900px) {
	.ksq-reviews-section__header {
		flex-direction: column;
		align-items: center;
		height: auto;
		gap: 30px;
	}
}

/* Left: Trustpilot Badge - Figma: Frame 1437258830 (233px × 93px, left: 0px, top: 35px) */
.ksq-reviews-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0;
	gap: 16px;
	width: 233px;
	flex-shrink: 0;
	margin-top: 35px;
}

.ksq-reviews-badge__label {
	width: 233px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 21px;
	text-align: center;
	color: var(--ksq-text-primary);
}

.ksq-reviews-badge__trustpilot {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 12px;
	width: 233px;
	height: 24px;
}

.ksq-trustpilot-icon {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 4px;
	width: 85px;
	height: 20px;
}

.ksq-trustpilot-icon svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.ksq-trustpilot-icon span {
	font-family: 'Roboto', sans-serif;
	font-weight: 500;
	font-size: 14px;
	line-height: 16px;
	color: #000000;
}

/* Trustpilot Stars Row - Figma: Frame 1437258827 (136px × 24px) */
.ksq-reviews-badge__trustpilot .ksq-stars {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 4px;
	width: 136px;
	height: 24px;
}

.ksq-reviews-badge__trustpilot .ksq-star-box {
	width: 24px;
	height: 24px;
}

.ksq-reviews-badge__trustpilot .ksq-star-box svg {
	width: 16.8px;
	height: 16.8px;
}

.ksq-reviews-badge__count {
	width: 233px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 300;
	font-size: 14px;
	line-height: 16px;
	text-align: center;
	color: #000000;
}

.ksq-underline {
	text-decoration: underline;
}

/* Center: Rating Breakdown - Figma: Group 1437258461 (321px × 162px, centered) */
.ksq-reviews-breakdown {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 321px;
	max-width: 321px;
	flex-shrink: 0;
	flex-grow: 0;
}

.ksq-reviews-breakdown__title {
	width: 134px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 19px;
	color: var(--ksq-text-secondary);
	text-align: center;
	margin: 0 0 17px;
}

.ksq-breakdown-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	width: 321px;
	max-width: 321px;
	height: 14px;
	margin-bottom: 14px;
}

.ksq-breakdown-row:last-child {
	margin-bottom: 0;
}

.ksq-breakdown-row__star {
	width: 7px;
	min-width: 7px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 500;
	font-size: 12px;
	line-height: 14px;
	color: var(--ksq-text-secondary);
	text-align: center;
	flex-shrink: 0;
	flex-grow: 0;
}

.ksq-breakdown-row__bar {
	width: 250px;
	min-width: 250px;
	max-width: 250px;
	height: 12px;
	background: #EEEEEE;
	mix-blend-mode: multiply;
	border-radius: 20px;
	overflow: hidden;
	flex-shrink: 0;
	flex-grow: 0;
}

.ksq-breakdown-row__fill {
	height: 100%;
	border-radius: 20px;
	transition: width 0.3s ease;
}

.ksq-breakdown-row__count {
	width: 35px;
	min-width: 35px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 12px;
	line-height: 14px;
	text-align: right;
	color: var(--ksq-text-tertiary);
	flex-shrink: 0;
	flex-grow: 0;
}

/* Right: Write a Review Button - Figma: Group 1437258463 (220px × 51px, left: 780px, top: 56px) */
.ksq-reviews-cta {
	display: flex;
	align-items: flex-start;
	margin-top: 56px;
	flex-shrink: 0;
}

/* Buttons */
.ksq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 50px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 21px;
	border-radius: 12px;
	text-decoration: none;
	transition: all 0.2s ease;
	cursor: pointer;
	border: none;
}

.ksq-btn--primary {
	background: var(--ksq-primary);
	color: #FFFFFF;
	width: 220px;
	height: 51px;
	padding: 0;
}

.ksq-btn--primary:hover {
	background: #E04800;
	color: #FFFFFF;
}

.ksq-btn--outline {
	background: transparent;
	color: var(--ksq-primary);
	border: 2px solid var(--ksq-primary);
	min-width: 193px;
	height: 51px;
}

.ksq-btn--outline:hover {
	background: var(--ksq-primary);
	color: #FFFFFF;
}

.ksq-btn--full {
	width: 100%;
}

/* ==========================================================================
   Reviews List
   ========================================================================== */

.ksq-reviews-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	width: 100%;
}

/* Add divider line after the last review card */
.ksq-reviews-list::after {
	content: '';
	display: block;
	width: 100%;
	height: 1px;
	background-color: var(--ksq-border);
	margin-top: 30px;
}

.ksq-review-card {
	width: 100%;
	position: relative;
}

/* Synthetic Review - Test Badge */
.ksq-review-card--synthetic {
	background: #fff9f5;
	border: 1px dashed #ffc107;
	border-radius: 8px;
	padding: 15px;
	margin-top: 15px;
}

.ksq-review-card__test-badge {
	position: absolute;
	top: -10px;
	right: 15px;
	background: #ffc107;
	color: #664d00;
	font-family: "Roboto Flex", sans-serif;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.ksq-review-card--synthetic .ksq-review-card__divider {
	display: none;
}

.ksq-review-card__divider {
	width: 100%;
	height: 0;
	border-top: 1px solid var(--ksq-border);
	margin-top: 30px;
	margin-bottom: 30px;
}

/* First review card doesn't need top margin on divider */
.ksq-review-card:first-child .ksq-review-card__divider {
	margin-top: 0;
}

.ksq-review-card__content {
	display: flex;
	gap: 0;
	width: 100%;
	max-width: 1000px;
}

/* Avatar & Name Column - Figma: Frame 1437256217 (115px × 50px, left: 0) */
.ksq-review-card__author {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 12px;
	width: 115px;
	min-width: 115px;
	height: 50px;
	flex-shrink: 0;
	margin-right: 105px; /* Gap to content: 220px - 115px = 105px */
}

.ksq-review-card__avatar {
	width: 50px;
	height: 50px;
	border-radius: 50px;
	background: var(--ksq-avatar-bg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 700;
	font-size: 16px;
	line-height: 19px;
	color: var(--ksq-avatar-color);
	flex-shrink: 0;
}

.ksq-review-card__avatar--image {
	background: none;
	object-fit: cover;
}

.ksq-review-card__name {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 19px;
	color: var(--ksq-text-primary);
	white-space: nowrap;
}

/* Review Body Column - Figma: Frame 1437258824 (780px × 213px, left: 220px) */
.ksq-review-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 0;
	gap: 20px;
	width: 780px;
	max-width: 780px;
	flex-shrink: 0;
}

/* Review Card Header - Figma: Group 1437258837 (780px × 24px) */
.ksq-review-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 780px;
	height: 24px;
}

/* Stars + Verified Container - Figma: Frame 1437258823 (223px × 24px) */
.ksq-review-card__rating {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 20px;
}

/* Verified Badge - Figma: Frame 1437258822 (67px × 16px) */
.ksq-review-card__verified {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 4px;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 16px;
	color: var(--ksq-text-secondary);
}

.ksq-verified-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
}

/* Date - Figma: positioned at right */
.ksq-review-card__date {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 16px;
	text-align: right;
	color: var(--ksq-text-secondary);
	white-space: nowrap;
	flex-shrink: 0;
}

/* Review Text Container */
.ksq-review-card__text {
	width: 780px;
	align-self: stretch;
}

/* Review Title - Figma: color #222, font-weight 600 */
.ksq-review-card__text strong {
	display: block;
	margin-bottom: 4px;
	font-family: "Roboto Flex", sans-serif;
	font-size: 18px;
	font-style: normal;
	font-weight: 600;
	line-height: 26px;
	color: #222222;
}

/* Review Text Content - Figma: color #444, font-weight 400 */
.ksq-review-card__text {
	font-family: "Roboto Flex", sans-serif;
	font-size: 18px;
	font-style: normal;
	font-weight: 400;
	line-height: 26px;
	color: #444444;
}

/* Review Card Footer - Location + Product */
.ksq-review-card__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-top: 4px;
}

/* Location - Figma: Frame 1437259084 (174px × 19px) */
.ksq-review-card__location {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 0;
	gap: 8px;
}

.ksq-review-card__location img {
	display: block;
	width: 28px;
	height: 16px;
	border-radius: 2px;
	flex-shrink: 0;
}

.ksq-review-card__location span {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 19px;
	color: var(--ksq-text-secondary);
}

/* Product Link */
.ksq-review-card__product {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	background: #f8f8f8;
	border: 1px solid #eee;
	border-radius: 8px;
	text-decoration: none;
	color: var(--ksq-text-secondary);
	font-family: "Roboto Flex", sans-serif;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.ksq-review-card__product:hover {
	background: #fff;
	border-color: var(--ksq-primary);
	color: var(--ksq-primary);
}

.ksq-review-card__product-image {
	width: 36px;
	height: 36px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.ksq-review-card__product-name {
	max-width: 200px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ksq-review-card__product-arrow {
	flex-shrink: 0;
	opacity: 0.5;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ksq-review-card__product:hover .ksq-review-card__product-arrow {
	opacity: 1;
	transform: translateX(2px);
}

/* Show More Button - 40px from divider line (gap: 50px - 10px = 40px) */
.ksq-reviews-showmore {
	width: 100%;
	display: flex;
	justify-content: center;
	margin-top: -10px;
}

/* ==========================================================================
   Review Form Modal
   ========================================================================== */

.ksq-review-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ksq-review-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}

.ksq-review-modal__container {
	position: relative;
	background: #FFFFFF;
	border-radius: 16px;
	max-width: 500px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 40px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.ksq-review-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666666;
	transition: color 0.2s ease;
}

.ksq-review-modal__close:hover {
	color: #000000;
}

.ksq-review-modal__title {
	font-family: 'DM Serif Display', Georgia, serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 36px;
	color: #000000;
	margin: 0 0 30px;
	text-align: center;
}

/* Form Styles */
.ksq-review-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ksq-form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ksq-form-group label {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 500;
	font-size: 14px;
	line-height: 16px;
	color: var(--ksq-text-secondary);
}

.ksq-form-group label .required {
	color: #E53935;
}

.ksq-form-group label .optional {
	color: #999999;
	font-weight: 400;
}

.ksq-form-group input[type="text"],
.ksq-form-group input[type="email"],
.ksq-form-group textarea {
	width: 100%;
	padding: 14px 16px;
	font-family: "Roboto Flex", sans-serif;
	font-size: 16px;
	line-height: 19px;
	color: var(--ksq-text-primary);
	background: #FFFFFF;
	border: 1px solid var(--ksq-border);
	border-radius: 8px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ksq-form-group input:focus,
.ksq-form-group textarea:focus {
	outline: none;
	border-color: var(--ksq-primary);
	box-shadow: 0 0 0 3px rgba(255, 81, 0, 0.1);
}

.ksq-form-group textarea {
	resize: vertical;
	min-height: 100px;
}

/* Star Rating Input */
.ksq-star-rating-input {
	display: flex;
	gap: 8px;
}

.ksq-star-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: transform 0.1s ease;
}

.ksq-star-btn:hover {
	transform: scale(1.1);
}

.ksq-star-btn .ksq-star-box {
	width: 36px;
	height: 36px;
	background: #EEEEEE;
	transition: background-color 0.2s ease;
}

.ksq-star-btn .ksq-star-box svg {
	width: 24px;
	height: 24px;
}

.ksq-star-btn.active .ksq-star-box,
.ksq-star-btn:hover .ksq-star-box {
	background: var(--ksq-star-color);
}

/* Form Actions */
.ksq-form-actions {
	margin-top: 10px;
}

/* Form Messages */
.ksq-form-message {
	padding: 16px;
	border-radius: 8px;
	font-family: "Roboto Flex", sans-serif;
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}

.ksq-form-message.success {
	background: #E8F5E9;
	color: #2E7D32;
	border: 1px solid #A5D6A7;
}

.ksq-form-message.error {
	background: #FFEBEE;
	color: #C62828;
	border: 1px solid #EF9A9A;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.ksq-btn[data-loading="true"] {
	pointer-events: none;
	opacity: 0.7;
}

.ksq-btn[data-loading="true"]::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 10px;
	border: 2px solid transparent;
	border-top-color: currentColor;
	border-radius: 50%;
	animation: ksq-spin 0.8s linear infinite;
}

@keyframes ksq-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.ksq-reviews-section {
		padding: 40px 20px 0 20px;
		gap: 30px;
	}
	
	.ksq-reviews-section__title {
		font-size: 32px;
		line-height: 44px;
	}
	
	.ksq-reviews-section__header {
		flex-direction: column;
		align-items: center;
		height: auto;
	}
	
	.ksq-reviews-badge {
		width: 100%;
		margin-top: 0;
	}
	
	.ksq-reviews-badge__label,
	.ksq-reviews-badge__trustpilot,
	.ksq-reviews-badge__count {
		width: 100%;
	}
	
	.ksq-reviews-badge__trustpilot {
		justify-content: center;
	}
	
	.ksq-reviews-breakdown {
		width: 100%;
		max-width: 321px;
	}
	
	.ksq-breakdown-row {
		width: 100%;
	}
	
	.ksq-breakdown-row__bar {
		flex: 1;
		width: auto;
	}
	
	.ksq-reviews-cta {
		width: 100%;
		margin-top: 0;
		justify-content: center;
	}
	
	.ksq-btn--primary,
	.ksq-btn--outline {
		width: 100%;
	}
	
	.ksq-review-card__content {
		flex-direction: column;
		gap: 16px;
	}
	
	.ksq-review-card__author {
		width: auto;
		min-width: auto;
		margin-right: 0;
	}
	
	.ksq-review-card__body {
		width: 100%;
		max-width: 100%;
	}
	
	.ksq-review-card__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		width: 100%;
		height: auto;
	}
	
	.ksq-review-card__date {
		text-align: left;
		width: auto;
	}
	
	.ksq-review-card__text {
		width: 100%;
	}
	
	.ksq-review-card__location {
		margin-top: 0;
	}
	
	.ksq-review-modal__container {
		padding: 24px;
	}
	
	.ksq-review-modal__title {
		font-size: 24px;
	}
	
	.ksq-pdp-reviews-slider__prev {
		left: 4px;
	}
	
	.ksq-pdp-reviews-slider__next {
		right: 4px;
	}
}

@media (max-width: 480px) {
	.ksq-reviews-section__title {
		font-size: 28px;
		line-height: 38px;
	}
	
	.ksq-star-rating-input {
		justify-content: center;
	}
	
	.ksq-review-card__location img {
		width: 24px;
		height: 14px;
	}
	
	.ksq-review-card__location span {
		font-size: 14px;
	}
}

/* ==========================================================================
   Source Badges & Logos
   ========================================================================== */

.ksq-source-logo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ksq-source-logo svg {
	display: block;
}

.ksq-source-logo__text {
	font-family: "Roboto Flex", sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: var(--ksq-text-secondary);
}

.ksq-source-logo--google {
	color: #4285F4;
}

.ksq-source-logo--etsy {
	color: #F56400;
}

/* Source badge in review card */
.ksq-review-card__source {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 8px;
	background: #f5f5f5;
	border-radius: 4px;
}

.ksq-review-card__source--google {
	background: rgba(66, 133, 244, 0.1);
}

.ksq-review-card__source--etsy {
	background: rgba(245, 100, 0, 0.1);
}

/* Review card meta area */
.ksq-review-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* ==========================================================================
   Combined Stats Header (Company Reviews Page)
   ========================================================================== */

.ksq-combined-stats {
	background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
	border-radius: 16px;
	padding: 40px;
	margin-bottom: 40px;
}

.ksq-combined-stats__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-bottom: 30px;
}

.ksq-combined-stats__title {
	font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	font-weight: 400;
	font-size: 36px;
	line-height: 48px;
	color: #000;
	margin: 0;
	text-align: center;
}

.ksq-combined-stats__summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.ksq-combined-stats__rating {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ksq-combined-stats__score {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 700;
	font-size: 48px;
	line-height: 1;
	color: var(--ksq-text-primary);
}

.ksq-combined-stats__count {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 16px;
	color: var(--ksq-text-secondary);
}

.ksq-combined-stats__count strong {
	font-weight: 600;
	color: var(--ksq-text-primary);
}

/* Source breakdown cards */
.ksq-combined-stats__sources {
	display: flex;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid var(--ksq-border);
}

.ksq-combined-stats__source {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	padding: 16px 20px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	min-width: 160px;
}

.ksq-combined-stats__source--google {
	border-left: 4px solid #4285F4;
}

.ksq-combined-stats__source--etsy {
	border-left: 4px solid #F56400;
}

.ksq-combined-stats__source--website,
.ksq-combined-stats__source--guest,
.ksq-combined-stats__source--manual {
	border-left: 4px solid var(--ksq-primary);
}

.ksq-combined-stats__source-logo {
	flex-shrink: 0;
}

.ksq-combined-stats__source-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ksq-combined-stats__source-name {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: var(--ksq-text-primary);
}

.ksq-combined-stats__source-count {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 12px;
	color: var(--ksq-text-secondary);
}

.ksq-combined-stats__source-rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
	font-family: "Roboto Flex", sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: var(--ksq-text-primary);
}

/* Rating breakdown in combined stats */
.ksq-combined-stats__breakdown {
	max-width: 400px;
	margin: 0 auto;
}

.ksq-combined-stats__bar-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.ksq-combined-stats__bar-row:last-child {
	margin-bottom: 0;
}

.ksq-combined-stats__bar-star {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: var(--ksq-text-secondary);
	min-width: 40px;
}

.ksq-combined-stats__bar {
	flex: 1;
	height: 10px;
	background: #eee;
	border-radius: 10px;
	overflow: hidden;
}

.ksq-combined-stats__bar-fill {
	height: 100%;
	border-radius: 10px;
	transition: width 0.3s ease;
}

.ksq-combined-stats__bar-count {
	font-family: "Roboto Flex", sans-serif;
	font-weight: 400;
	font-size: 13px;
	color: var(--ksq-text-tertiary);
	min-width: 45px;
	text-align: right;
}

/* ==========================================================================
   Company Reviews Page
   ========================================================================== */

.ksq-company-reviews {
	max-width: 1000px;
	margin: 0 auto;
	padding: 40px 20px;
}

/* Filter Buttons */
.ksq-company-reviews__filters {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 40px;
}

.ksq-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: #fff;
	border: 1px solid var(--ksq-border);
	border-radius: 50px;
	font-family: "Roboto Flex", sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: var(--ksq-text-secondary);
	cursor: pointer;
	transition: all 0.2s ease;
}

.ksq-filter-btn:hover {
	border-color: var(--ksq-primary);
	color: var(--ksq-primary);
}

.ksq-filter-btn.active {
	background: var(--ksq-primary);
	border-color: var(--ksq-primary);
	color: #fff;
}

.ksq-filter-btn.active .ksq-source-logo svg path {
	fill: #fff;
}

.ksq-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
}

.ksq-filter-btn.active .ksq-filter-count {
	background: rgba(255, 255, 255, 0.25);
}

/* Company reviews list */
.ksq-company-reviews__list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.ksq-company-reviews__empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--ksq-text-tertiary);
	font-family: "Roboto Flex", sans-serif;
	font-size: 16px;
}

/* Load more button */
.ksq-company-reviews__loadmore {
	display: flex;
	justify-content: center;
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid var(--ksq-border);
}

/* ==========================================================================
   Company Reviews Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.ksq-combined-stats {
		padding: 24px;
		margin-bottom: 24px;
	}
	
	.ksq-combined-stats__title {
		font-size: 28px;
		line-height: 36px;
	}
	
	.ksq-combined-stats__score {
		font-size: 36px;
	}
	
	.ksq-combined-stats__sources {
		flex-direction: column;
		align-items: stretch;
	}
	
	.ksq-combined-stats__source {
		min-width: 0;
	}
	
	.ksq-company-reviews {
		padding: 24px 16px;
	}
	
	.ksq-company-reviews__filters {
		gap: 8px;
	}
	
	.ksq-filter-btn {
		padding: 10px 16px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.ksq-combined-stats__breakdown {
		max-width: 100%;
	}
	
	.ksq-filter-btn {
		flex: 1;
		justify-content: center;
		min-width: calc(50% - 8px);
	}
}