/* Google Reviews Styles */

/* Mobile-first styles */
.google-reviews {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	position: relative;
	z-index: 1;
	margin-bottom: 40px;
}

/* Individual review box */
.google-reviews-single {
	background: white;
	padding: 15px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	margin-bottom: 30px;
}

/* Container styling */
.google-reviews-container {
	z-index: 1;
	position: relative;
}

.google-reviews-header {
	display: flex;
	align-items: center;
	margin-bottom: 1rem;
}

.google-reviews-author h3 {
	margin: 0 0 3px 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.1;
}

.google-reviews-header p {
	margin-bottom: 0;
	font-size: 0.9rem;
}

.google-reviews-header p.google-reviews-tiny {
	font-size: 0.8rem;
	color: #9d9a9a;
}

.google-reviews-profile-pic {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	margin-right: 12px;
}

.google-reviews-google-logo {
	width: 30px;
	height: 30px;
	margin-left: auto;
}

/* Rating stars */
.google-reviews-rating {
	color: #ff9b01;
	font-size: 1.6rem;
	margin: 0 0 16px;
	line-height: 1;
}

.google-reviews-text {
	font-size: 0.9rem;
	margin-bottom: 1rem;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Same colour as the translation toggle in every state, so a theme's link
   palette can't split the two apart. Sites repoint both with the variable. */
.google-reviews-see-more,
.google-reviews-see-more:link,
.google-reviews-see-more:visited,
.google-reviews-see-more:hover,
.google-reviews-see-more:focus,
.google-reviews-see-more:active {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	color: var(--ps-reviews-link-color, #1a73e8) !important;
}

/* Underline the label only - an underline on the flex link can paint through
   the icon. Applied on hover/focus so the resting state stays clean. */
.google-reviews-see-more .google-reviews-see-more-label {
	text-decoration: none;
}

.google-reviews-see-more:hover .google-reviews-see-more-label,
.google-reviews-see-more:focus-visible .google-reviews-see-more-label {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.google-reviews-see-more:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* stroke="currentColor" on the SVG, so the icon tracks the link colour */
.google-reviews-see-more-icon {
	width: 0.85em;
	height: 0.85em;
	flex-shrink: 0;
	color: inherit;
	transition: transform 0.15s ease;
}

/* Nudge the arrow out of its box - reinforces "opens elsewhere" */
.google-reviews-see-more:hover .google-reviews-see-more-icon,
.google-reviews-see-more:focus-visible .google-reviews-see-more-icon {
	transform: translate(1px, -1px);
}

@media (prefers-reduced-motion: reduce) {
	.google-reviews-see-more-icon {
		transition: none;
	}
}

/* Translation notice - sits outside .google-reviews-text so the
   -webkit-line-clamp box above doesn't swallow it. Laid out as a flex
   block (not inline-flex) so "View on Google" always starts a new line.
   Reads as plain text; only the toggle inside it is clickable. */
.google-reviews-translate {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	width: fit-content;
	max-width: 100%;
	text-align: left;
	margin: 0 0 8px;
	font-size: 0.8rem;
	line-height: 1.4;
	color: #5f6368;
}

.google-reviews-translate-note::after {
	content: "\00b7";
	margin-left: 6px;
}

/* Strip the button back to text. The !important guards keep a theme's global
   button rules - especially a hover background - off the toggle. */
.google-reviews-translate-toggle,
.google-reviews-translate-toggle:hover,
.google-reviews-translate-toggle:focus,
.google-reviews-translate-toggle:focus-visible,
.google-reviews-translate-toggle:active {
	display: inline;
	background: none !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: none;
	/* A button can't inherit the theme's link colour, so name it here; sites can
	   repoint both this and "View on Google" with --ps-reviews-link-color. */
	color: var(--ps-reviews-link-color, #1a73e8) !important;
	cursor: pointer;
}

.google-reviews-translate-action {
	text-decoration: underline;
}

.google-reviews-translate-toggle:hover .google-reviews-translate-action,
.google-reviews-translate-toggle:focus-visible .google-reviews-translate-action {
	text-decoration: none;
}

.google-reviews-translate-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.google-reviews-translate.is-showing-original .google-reviews-translate-note {
	display: none;
}

/* Themes that reset display on spans would otherwise leak both variants at once */
.google-reviews-container [hidden],
.google-reviews-slider-container [hidden] {
	display: none !important;
}

.google-reviews-cta {
	text-align: center;
	margin: 0 0 80px;
}

.google-reviews-cta h2 {
	margin-bottom: 0;
}

/* Desktop styles */
@media (min-width: 1025px) {
	.google-reviews {
		grid-template-columns: repeat(var(--columns, 2), 1fr);
		gap: 35px;
	}

	.google-reviews-single {
		margin-bottom: 0;
		padding: 25px;
	}
}

/* --------------------------------------------------------------------------
   Elementor compatibility
   Elementor's frontend.min.css ships `.elementor img { border-radius: 0 }`,
   which outranks `.google-reviews-profile-pic` and squares the avatars.
   Matching its specificity restores the circles.
   -------------------------------------------------------------------------- */
.google-reviews-header img.google-reviews-profile-pic {
	border-radius: 50%;
}
