/**
 * Testimonials Manager - Frontend Styles
 * 
 * @package TestimonialsManager
 * @version 1.0.0
 */

/* Reviews Container */
.reviews-list {
	display: grid;
	gap: 1.5rem;
	margin: 2rem 0;
}

.reviews-list.grid {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Review Card */
.review-card {
	background: #ffffff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.review-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* Review Header */
.review-header {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.review-stars {
	font-size: 1.2rem;
	letter-spacing: 2px;
	color: #ffc107;
	line-height: 1;
}

.review-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: #2c3e50;
	line-height: 1.4;
}

/* Review Body */
.review-body {
	color: #555;
	font-size: 0.95rem;
	line-height: 1.6;
	margin-bottom: 1rem;
}

.review-body p {
	margin: 0.5rem 0;
}

.review-body p:first-child {
	margin-top: 0;
}

.review-body p:last-child {
	margin-bottom: 0;
}

/* Review Meta */
.review-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	color: #777;
	font-size: 0.875rem;
	padding-top: 1rem;
	border-top: 1px solid #f0f0f0;
}

.review-author {
	font-style: italic;
	color: #555;
}

.review-location {
	color: #777;
}

.review-date {
	color: #999;
}

.review-source {
	color: #3498db;
	text-decoration: none;
	transition: color 0.2s ease;
}

.review-source:hover {
	color: #2980b9;
	text-decoration: underline;
}

/* Owner Response */
.review-owner-response {
	margin-top: 1rem;
	padding: 1rem;
	background: #f8f9fa;
	border-left: 3px solid #3498db;
	border-radius: 4px;
	font-size: 0.9rem;
}

.review-owner-response strong {
	display: block;
	margin-bottom: 0.5rem;
	color: #2c3e50;
	font-size: 0.875rem;
}

.review-owner-response p {
	margin: 0.25rem 0;
	color: #555;
}

/* No Reviews Message */
.tm-no-reviews {
	text-align: center;
	padding: 2rem;
	color: #999;
	font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
	.reviews-list {
		gap: 1rem;
	}

	.review-card {
		padding: 1.25rem;
	}

	.review-stars {
		font-size: 1.1rem;
	}

	.review-title {
		font-size: 1rem;
	}

	.review-body {
		font-size: 0.9rem;
	}

	.review-meta {
		font-size: 0.8125rem;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}
}

@media (max-width: 480px) {
	.reviews-list.grid {
		grid-template-columns: 1fr;
	}

	.review-card {
		padding: 1rem;
	}
}

/* Print Styles */
@media print {
	.review-card {
		break-inside: avoid;
		box-shadow: none;
		border: 1px solid #ddd;
	}

	.review-source {
		color: #000;
		text-decoration: underline;
	}
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
	.review-card {
		transition: none;
	}

	.review-card:hover {
		transform: none;
	}
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.review-card {
		border: 2px solid #000;
	}

	.review-stars {
		color: #000;
	}

	.review-meta {
		border-top: 2px solid #000;
	}
}

/* Slider Layout */
.reviews-list.slider {
	position: relative !important;
	padding: 0 60px !important;
	margin: 2rem 0 !important;
	display: block !important;
	grid-template-columns: none !important;
	gap: 0 !important;
}

.tm-slider-track {
	position: relative !important;
	width: 100% !important;
	min-height: 200px !important;
	display: block !important;
}

.reviews-list.slider .review-card {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.5s ease, visibility 0.5s ease !important;
	pointer-events: none !important;
	display: block !important;
	margin: 0 !important;
	float: none !important;
	flex: none !important;
}

.reviews-list.slider .review-card.active {
	position: relative !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	z-index: 1 !important;
}

/* Slider Navigation Buttons */
.tm-slider-prev,
.tm-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 45px;
	height: 45px;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
	color: #333;
	cursor: pointer;
	z-index: 100;
	transition: all 0.3s ease;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
}

.tm-slider-prev:hover,
.tm-slider-next:hover {
	background: #fff;
	border-color: #3498db;
	color: #3498db;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tm-slider-prev:active,
.tm-slider-next:active {
	transform: translateY(-50%) scale(0.95);
}

.tm-slider-prev {
	left: 0;
}

.tm-slider-next {
	right: 0;
}

/* Slider Dots */
.tm-slider-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 1.5rem;
	padding-top: 1rem;
	position: relative;
	z-index: 1;
}

.tm-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #ddd;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 0;
}

.tm-slider-dot:hover {
	background: #bbb;
	transform: scale(1.2);
}

.tm-slider-dot.active {
	background: #3498db;
	width: 24px;
	border-radius: 5px;
}

/* Slider Responsive */
@media (max-width: 768px) {
	.reviews-list.slider {
		padding: 0 40px;
	}

	.tm-slider-prev,
	.tm-slider-next {
		width: 35px;
		height: 35px;
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.reviews-list.slider {
		padding: 0 30px;
	}

	.tm-slider-prev,
	.tm-slider-next {
		width: 30px;
		height: 30px;
		font-size: 18px;
	}

	.tm-slider-dots {
		gap: 6px;
		margin-top: 1rem;
	}

	.tm-slider-dot {
		width: 8px;
		height: 8px;
	}

	.tm-slider-dot.active {
		width: 20px;
	}
}

/* Slider Accessibility */
@media (prefers-reduced-motion: reduce) {
	.tm-slider-track {
		transition: none;
	}

	.reviews-list.slider .review-card {
		transition: none;
	}
}

/* Featured Review Styles */
.tm-featured-review {
	margin: 2rem 0;
	padding: 0;
}

.tm-featured-quote {
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-left: 4px solid #3498db;
	border-radius: 8px;
	padding: 2rem;
	margin: 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tm-featured-quote .review-stars {
	font-size: 1.5rem;
	margin-bottom: 1rem;
	display: block;
}

.tm-featured-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: #2c3e50;
	margin: 0 0 1rem 0;
	line-height: 1.3;
}

.tm-featured-content {
	font-size: 1.1rem;
	line-height: 1.8;
	color: #444;
	margin-bottom: 1.5rem;
}

.tm-featured-content p {
	margin: 0.75rem 0;
}

.tm-featured-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e6e6e6;
}

.tm-featured-author {
	font-style: italic;
	font-weight: 600;
	color: #555;
	font-size: 1rem;
}

.tm-featured-location {
	font-weight: normal;
	color: #777;
}

.tm-featured-source {
	color: #3498db;
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.2s ease;
}

.tm-featured-source:hover {
	color: #2980b9;
	text-decoration: underline;
}

@media (max-width: 768px) {
	.tm-featured-quote {
		padding: 1.5rem;
	}

	.tm-featured-title {
		font-size: 1.2rem;
	}

	.tm-featured-content {
		font-size: 1rem;
	}

	.tm-featured-footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
}

/* Review Stats Badge */
.tm-stats-badge {
	display: inline-block;
	font-weight: 600;
	color: #2c3e50;
}

.tm-stats-full {
	font-size: 1rem;
	padding: 0.5rem 1rem;
	background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
	border: 1px solid #ffc107;
	border-radius: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tm-stats-short {
	font-size: 0.95rem;
	padding: 0.25rem 0.75rem;
	background: #f8f9fa;
	border-radius: 15px;
}

.tm-stats-number {
	font-size: 1.2rem;
	color: #ffc107;
}

/* Auto-Insert Heading */
.tm-auto-insert-heading {
	font-size: 1.8rem;
	font-weight: 700;
	color: #2c3e50;
	margin: 2rem 0 1.5rem 0;
	text-align: center;
	position: relative;
	padding-bottom: 1rem;
}

.tm-auto-insert-heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background: linear-gradient(90deg, #3498db 0%, #2ecc71 100%);
	border-radius: 2px;
}

@media (max-width: 768px) {
	.tm-auto-insert-heading {
		font-size: 1.5rem;
	}
}

/* ========================================
   PROFESSIONAL LAYOUTS (Competitor-Inspired)
   ======================================== */

/* Cards Layout (Trustindex Style) */
.reviews-list.cards {
	display: flex;
	gap: 1.5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 1rem 0;
	margin: 2rem 0;
}

.reviews-list.cards .review-card {
	flex: 0 0 350px;
	scroll-snap-align: start;
	background: #f8f9fa;
	border: none;
	border-radius: 12px;
	padding: 1.75rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
}

.reviews-list.cards .review-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	transform: translateY(-4px);
}

/* Profile Photo */
.review-profile {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.review-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.2rem;
	flex-shrink: 0;
}

.review-avatar img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.review-author-info {
	flex: 1;
}

.review-author-name {
	font-weight: 700;
	color: #2c3e50;
	font-size: 1rem;
	margin: 0 0 0.25rem 0;
}

.review-time-ago {
	color: #999;
	font-size: 0.875rem;
}

/* Cards Layout - Stars at top */
.reviews-list.cards .review-stars {
	font-size: 1.1rem;
	margin-bottom: 0.75rem;
}

/* Cards Layout - Body */
.reviews-list.cards .review-body {
	flex: 1;
	font-size: 0.95rem;
	line-height: 1.6;
	color: #555;
	margin-bottom: 0;
}

/* Cards Layout - Hide default meta */
.reviews-list.cards .review-meta {
	display: none;
}

/* Modern Grid Layout (Yelp Style) */
.reviews-list.modern-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
}

/* Overall Rating Header */
.tm-reviews-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tm-overall-rating {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.tm-rating-number {
	font-size: 2.5rem;
	font-weight: 700;
	color: #2c3e50;
	line-height: 1;
}

.tm-rating-stars {
	font-size: 1.5rem;
	color: #ffc107;
	letter-spacing: 2px;
}

.tm-rating-count {
	color: #777;
	font-size: 0.95rem;
	margin-top: 0.25rem;
}

.tm-write-review-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	background: #3498db;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.3s ease;
}

.tm-write-review-btn:hover {
	background: #2980b9;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Modern Grid - Review Cards */
.reviews-list.modern-grid .review-card {
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.reviews-list.modern-grid .review-profile {
	margin-bottom: 0;
}

.reviews-list.modern-grid .review-platform-icon {
	width: 20px;
	height: 20px;
	margin-left: auto;
}

/* Platform Icons */
.review-platform {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #777;
}

.review-platform-icon {
	width: 18px;
	height: 18px;
	border-radius: 3px;
}

.review-platform-icon.google {
	background: #4285f4;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.75rem;
}

.review-platform-icon.yelp {
	background: #d32323;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.75rem;
}

/* Read More / Load More */
.tm-read-more {
	color: #3498db;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.875rem;
	border: none;
	background: none;
	padding: 0;
	text-decoration: underline;
	transition: color 0.2s ease;
}

.tm-read-more:hover {
	color: #2980b9;
}

.tm-load-more {
	display: block;
	margin: 2rem auto 0;
	padding: 0.875rem 2rem;
	background: #fff;
	border: 2px solid #e6e6e6;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	color: #2c3e50;
	cursor: pointer;
	transition: all 0.3s ease;
}

.tm-load-more:hover {
	border-color: #3498db;
	color: #3498db;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Compact Layout */
.reviews-list.compact {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 2rem 0;
}

.reviews-list.compact .review-card {
	padding: 1rem 1.25rem;
	border-radius: 6px;
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.reviews-list.compact .review-avatar {
	width: 40px;
	height: 40px;
	font-size: 1rem;
}

.reviews-list.compact .review-content {
	flex: 1;
}

.reviews-list.compact .review-header {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.reviews-list.compact .review-stars {
	font-size: 1rem;
}

.reviews-list.compact .review-body {
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
}

.reviews-list.compact .review-meta {
	padding-top: 0;
	border-top: none;
	font-size: 0.8125rem;
}

/* Masonry Layout */
.reviews-list.masonry {
	column-count: 3;
	column-gap: 1.5rem;
	margin: 2rem 0;
}

.reviews-list.masonry .review-card {
	break-inside: avoid;
	margin-bottom: 1.5rem;
	display: inline-block;
	width: 100%;
}

/* Testimonial Quote Style */
.review-card.quote-style {
	position: relative;
	padding: 2rem 1.5rem 1.5rem 1.5rem;
}

.review-card.quote-style::before {
	content: '"';
	position: absolute;
	top: -10px;
	left: 15px;
	font-size: 5rem;
	line-height: 1;
	color: #e6e6e6;
	font-family: Georgia, serif;
	font-weight: 700;
}

/* Powered By Badge */
.tm-powered-by {
	text-align: center;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #e6e6e6;
	font-size: 0.8125rem;
	color: #999;
}

.tm-powered-by a {
	color: #3498db;
	text-decoration: none;
	font-weight: 600;
}

.tm-powered-by a:hover {
	text-decoration: underline;
}

/* Responsive Adjustments for New Layouts */
@media (max-width: 1024px) {
	.reviews-list.masonry {
		column-count: 2;
	}
}

@media (max-width: 768px) {
	.reviews-list.cards {
		gap: 1rem;
	}
	
	.reviews-list.cards .review-card {
		flex: 0 0 300px;
		padding: 1.5rem;
	}
	
	.reviews-list.modern-grid {
		grid-template-columns: 1fr;
	}
	
	.tm-reviews-header {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}
	
	.tm-overall-rating {
		flex-direction: column;
		gap: 0.5rem;
	}
	
	.reviews-list.masonry {
		column-count: 1;
	}
}

@media (max-width: 480px) {
	.reviews-list.cards .review-card {
		flex: 0 0 280px;
		padding: 1.25rem;
	}
	
	.review-avatar {
		width: 40px;
		height: 40px;
		font-size: 1rem;
	}
	
	.tm-rating-number {
		font-size: 2rem;
	}
	
	.tm-rating-stars {
		font-size: 1.2rem;
	}
}

/* Scrollbar Styling for Cards Layout */
.reviews-list.cards::-webkit-scrollbar {
	height: 8px;
}

.reviews-list.cards::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.reviews-list.cards::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

.reviews-list.cards::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Animation for Cards on Scroll */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.review-card {
	animation: slideIn 0.5s ease-out;
}

/* Stagger animation for grid layouts */
.reviews-list.grid .review-card:nth-child(1) { animation-delay: 0.1s; }
.reviews-list.grid .review-card:nth-child(2) { animation-delay: 0.2s; }
.reviews-list.grid .review-card:nth-child(3) { animation-delay: 0.3s; }
.reviews-list.grid .review-card:nth-child(4) { animation-delay: 0.4s; }
.reviews-list.grid .review-card:nth-child(5) { animation-delay: 0.5s; }
.reviews-list.grid .review-card:nth-child(6) { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
	.review-card {
		animation: none;
	}
}
