/* Shopee Style Template CSS */
.wcpr-shopee-review-item {
	background: #fdfdfd;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.wcpr-shopee-review-header {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.wcpr-shopee-avatar {
	flex-shrink: 0;
}

.shopee-avatar__placeholder {    
    background-color: #f5f5f5;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    width: 40px;
	height: 40px;
}

.shopee-avatar__placeholder .icon-headshot {
    stroke: #c6c6c6;
    font-size: 1.5rem;
    font-weight: 400;
    left: 50%;
    line-height: 2rem;
    position: absolute;
    top: 50%;
    transform: translate(-50%,-50%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wcpr-shopee-review-content {
	flex: 1;
}

.wcpr-shopee-review-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.wcpr-shopee-author {
	color: #b0291c;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
}

.wcpr-shopee-author:hover {
	text-decoration: underline;
}

.wcpr-shopee-rating {
	display: flex;
	gap: 2px;
}

.wcpr-shopee-star {
	width: 15px;
	height: 15px;
}

.wcpr-shopee-star-filled {
	fill: #b0291c;
}

.wcpr-shopee-star-empty {
	fill: none;
	stroke: #ddd;
	stroke-width: 1;
}

.wcpr-shopee-date {
	color: #999;
	font-size: 12px;
}

.wcpr-shopee-review-text {
	color: #333;
	line-height: 1.5;
	margin-bottom: 15px;
}

/* Media Grid */
.wcpr-shopee-media-section {
	margin-bottom: 15px;
}

.wcpr-shopee-media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
	gap: 6px;
	max-width: 350px;
}

.wcpr-shopee-media-item {
	position: relative;
	cursor: pointer;
	border-radius: 4px;
	overflow: hidden;
	aspect-ratio: 1;
}

.wcpr-shopee-media-thumbnail {
	width: 100%;
	height: 100%;
	position: relative;
}

.wcpr-shopee-media-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.wcpr-shopee-media-item:hover .wcpr-shopee-media-image {
	transform: scale(1.05);
}

.wcpr-shopee-video-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcpr-shopee-play-icon {
	width: 16px;
	height: 16px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Lightbox */
.wcpr-shopee-lightbox {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
}

.wcpr-shopee-lightbox-content {
	position: relative;
	margin: auto;
	padding: 20px;
	width: 90%;
	max-width: 800px;
	height: 90%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.wcpr-shopee-lightbox-close {
	color: #aaa;
	float: right;
	font-size: 35px;
	font-weight: bold;
	position: absolute;
	top: 15px;
	right: 25px;
	cursor: pointer;
	z-index: 1000;
}

.wcpr-shopee-lightbox-close:hover,
.wcpr-shopee-lightbox-close:focus {
	color: #fff;
	text-decoration: none;
}

.wcpr-shopee-lightbox-media {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcpr-shopee-lightbox-prev,
.wcpr-shopee-lightbox-next {
	cursor: pointer;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: bold;
	font-size: 24px;
	transition: all 0.3s ease;
	border-radius: 50%;
	user-select: none;
	background-color: rgba(0, 0, 0, 0.6);
	z-index: 1001;
}

.wcpr-shopee-lightbox-prev {
	left: 20px;
}

.wcpr-shopee-lightbox-next {
	right: 20px;
}

.wcpr-shopee-lightbox-prev:hover,
.wcpr-shopee-lightbox-next:hover {
	background-color: rgba(0, 0, 0, 0.8);
	transform: translateY(-50%) scale(1.1);
}

.wcpr-shopee-lightbox-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
	width: 100%;
	position: relative;
}

.wcpr-shopee-lightbox-container img,
.wcpr-shopee-lightbox-container video {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.wcpr-shopee-lightbox-caption {
	color: #fff;
	text-align: center;
	padding: 10px;
	margin-top: 20px;
	font-size: 14px;
}

/* Overall Rating Section - Redesigned */
.wcpr-shopee-overall-rating {
	background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 100%);
	border: 1px solid #ffe4b3;
	border-radius: 16px;
	padding: 24px;
	margin: 20px 0;
	box-shadow: 0 4px 20px rgba(255, 228, 179, 0.3);
}

/* Shopee rating summary row with inline filters */
.wcpr-shopee-rating-summary {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.wcpr-shopee-rating-left { flex: 0 0 auto; }
.wcpr-shopee-authentic-badge { flex: 0 0 auto; }
.wcpr-shopee-rating-filters {
	flex: 1 1 auto;
	display: flex;
	width: 50%;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.wcpr-shopee-filter-button {
	appearance: none;
	border: 1px solid rgba(0,0,0,.12);
	background: #fff;
	color: #222;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
	transition: all .15s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.wcpr-shopee-filter-button:hover {
	border-color: #b0291c;
	color: #fff;
}
.wcpr-shopee-filter-button.wcpr-active {
	background: #b0291c;
	border-color: #b0291c;
	color: #fff;
}
/* Count badge */
.wcpr-shopee-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 20px;
	padding: 0 8px;
	border-radius: 999px;
	background: rgba(0,0,0,.06);
	color: #333;
	font-weight: 600;
	font-size: 12px;
}
.wcpr-shopee-filter-button:hover .wcpr-shopee-filter-count,
.wcpr-shopee-filter-button.wcpr-active .wcpr-shopee-filter-count {
	background: rgba(255,255,255,.25);
	color: #fff;
}

.wcpr-shopee-reviews-container.wcpr-loading {
	position: relative;
}
.wcpr-shopee-reviews-container.wcpr-loading:after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.6);
	backdrop-filter: blur(1px);
}

.wcpr-shopee-rating-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.wcpr-shopee-rating-score {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.wcpr-shopee-rating-number {
	font-size: 48px;
	font-weight: 700;
	color: #b0291c;
	line-height: 1;
}

.wcpr-shopee-rating-out-of {
	font-size: 16px;
	color: #666;
	font-weight: 500;
}

.wcpr-shopee-rating-stars {
	display: flex;
	gap: 2px;
}

.wcpr-shopee-star {
	width: 18px;
	height: 18px;
}

.wcpr-shopee-star-filled {
	fill: #b0291c;
}

.wcpr-shopee-star-empty {
	fill: #ddd;
}

.wcpr-shopee-review-count {
	font-size: 14px;
	color: #666;
	font-weight: 500;
}

/* Authentic Badge - New Design */
.wcpr-shopee-authentic-badge {
	display: flex;
	align-items: center;
	gap: 16px;
	background: linear-gradient(135deg, #b0291c 0%, #d93829 100%);
	border-radius: 12px;
	padding: 16px 20px;
	box-shadow: 0 4px 15px rgba(238, 77, 45, 0.3);
	position: relative;
	overflow: hidden;
}

.wcpr-shopee-authentic-badge::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
	transform: translateX(-100%);
	transition: transform 0.6s ease;
}

.wcpr-shopee-authentic-badge:hover::before {
	transform: translateX(100%);
}

.wcpr-authentic-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	backdrop-filter: blur(4px);
}

.wcpr-checkmark-icon {
	width: 20px;
	height: 20px;
	color: white;
}

.wcpr-authentic-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wcpr-authentic-main {
	color: white;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
}

.wcpr-authentic-sub {
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 768px) {
	.wcpr-shopee-rating-summary {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 24px;
	}
	
	.wcpr-shopee-rating-left {
		align-items: center;
	}
	
	.wcpr-shopee-authentic-badge {
		width: 100%;
		justify-content: center;
	}
}

/* Remove the like section as requested */
.wcpr-shopee-like-section {
	display: none !important;
}

/* Ensure proper positioning */
.wcpr-shopee-reviews-container {
	position: relative;
	z-index: 1;
}

/* Fix pagination positioning */
.wcpr-pagination {
	position: relative;
	z-index: 5;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
	.wcpr-shopee-review-item {
		padding: 15px;
		margin-bottom: 15px;
	}
	
	.wcpr-shopee-review-header {
		gap: 10px;
	}
	
	.wcpr-shopee-avatar-placeholder {
		width: 35px;
		height: 35px;
	}
	
	.wcpr-shopee-media-grid {
		grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
		gap: 4px;
		max-width: 280px;
	}
	
	.wcpr-shopee-lightbox-prev,
	.wcpr-shopee-lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
	
	.wcpr-shopee-lightbox-prev {
		left: 10px;
	}
	
	.wcpr-shopee-lightbox-next {
		right: 10px;
	}
}

@media (max-width: 480px) {
	.wcpr-shopee-review-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
	}
	
	.wcpr-shopee-media-grid {
		grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
		gap: 4px;
		max-width: 250px;
	}
}

.wcpr-shopee-media-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.wcpr-shopee-video-thumbnail {
	width: 100%;
	height: 100%;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.wcpr-shopee-video-thumbnail::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
}

/* Enhanced Media Handling Styles */
.wcpr-shopee-media-item {
	position: relative;
	overflow: hidden;
}

.wcpr-shopee-image-fallback {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #f5f5f5;
	border: 1px dashed #ddd;
	border-radius: 4px;
	color: #999;
	font-size: 12px;
	text-align: center;
	padding: 10px;
}

.wcpr-shopee-image-error-icon {
	width: 24px;
	height: 24px;
	margin-bottom: 5px;
	color: #ccc;
}

.wcpr-shopee-media-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
	transition: opacity 0.3s ease;
}

.wcpr-shopee-media-item img[style*="display: none"] {
	opacity: 0;
}

/* Enhanced Video Thumbnail */
.wcpr-shopee-video-thumbnail {
	position: relative;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.2s ease;
}

.wcpr-shopee-video-thumbnail:hover {
	transform: scale(1.05);
}

.wcpr-shopee-play-icon {
	width: 32px;
	height: 32px;
	color: white;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Media Grid Improvements */
.wcpr-shopee-media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.wcpr-shopee-media-item {
	aspect-ratio: 1;
	min-height: 80px;
}

/* Lightbox Enhancements */
.wcpr-shopee-lightbox-image {
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

.wcpr-shopee-lightbox-video {
	max-width: 100%;
	max-height: 80vh;
}

/* Loading States */
.wcpr-shopee-media-item.loading {
	opacity: 0.7;
}

.wcpr-shopee-media-item.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #b0291c;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	transform: translate(-50%, -50%);
}

@keyframes spin {
	0% { transform: translate(-50%, -50%) rotate(0deg); }
	100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Info Icon Tooltip Styles */
.wcpr-info-icon-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
}

.wcpr-info-icon {
    transition: transform 0.2s ease;
}

.wcpr-info-icon-wrapper:hover .wcpr-info-icon {
    transform: scale(1.1);
}

/* Custom CSS Tooltip (Option 1) */
.wcpr-tooltip {
    visibility: hidden;
    width: 280px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.wcpr-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.wcpr-info-icon-wrapper:hover .wcpr-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Enhanced Hover Effect */
.wcpr-info-icon-wrapper:hover {
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wcpr-tooltip {
        width: 240px;
        margin-left: -120px;
        font-size: 11px;
    }
	.wcpr-shopee-rating-filters {
		width: 100%;
	}
}