/**
 * WC Premium Reviews - Frontend Styles
 */

/* ---------------------------------------------------------------------------
 * CSS Custom Properties
 * --------------------------------------------------------------------------- */
:root {
	--wcpr-star-color: #f59e0b;
	--wcpr-bg-color: #fff;
	--wcpr-tag-bg: #f0fdf4;
	--wcpr-tag-color: #166534;
	--wcpr-border-radius: 8px;
	--wcpr-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* ---------------------------------------------------------------------------
 * Reviews Wrapper - inherits font from theme
 * --------------------------------------------------------------------------- */
.wcpr-reviews-wrap {
	line-height: 1.6;
}

/* ---------------------------------------------------------------------------
 * Review Card
 * --------------------------------------------------------------------------- */
.wcpr-review-card {
	background: var(--wcpr-bg-color);
	border-radius: var(--wcpr-border-radius);
	box-shadow: var(--wcpr-shadow);
	padding: 20px;
	margin-bottom: 16px;
}

/* ---------------------------------------------------------------------------
 * Stars
 * --------------------------------------------------------------------------- */
.wcpr-stars {
	color: var(--wcpr-star-color);
	letter-spacing: 2px;
	font-size: 16px;
}

/* ---------------------------------------------------------------------------
 * Criteria Breakdown (in review card)
 * --------------------------------------------------------------------------- */
.wcpr-criteria-breakdown {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin: 6px 0 4px;
}

.wcpr-criteria-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8em;
}

.wcpr-criteria-label {
	min-width: 130px;
	color: #64748b;
	font-weight: 500;
}

.wcpr-criteria-stars {
	letter-spacing: 1px;
	font-size: 12px;
}

/* ---------------------------------------------------------------------------
 * Review Title
 * --------------------------------------------------------------------------- */
.wcpr-review-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 8px 0 4px;
}

/* ---------------------------------------------------------------------------
 * Review Content
 * --------------------------------------------------------------------------- */
.wcpr-review-content {
	margin: 8px 0;
}

/* ---------------------------------------------------------------------------
 * Review Meta
 * --------------------------------------------------------------------------- */
.wcpr-review-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
	font-size: 0.85em;
	color: #64748b;
}

/* ---------------------------------------------------------------------------
 * Reviewer Name
 * --------------------------------------------------------------------------- */
.wcpr-reviewer-name {
	font-weight: 700;
}

/* ---------------------------------------------------------------------------
 * Verified Badge
 * --------------------------------------------------------------------------- */
.wcpr-verified-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #dcfce7;
	color: #166534;
	font-size: 0.8em;
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 500;
}

/* ---------------------------------------------------------------------------
 * Source Badge
 * --------------------------------------------------------------------------- */
.wcpr-source-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #e0e7ff;
	color: #3730a3;
	font-size: 0.8em;
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 500;
}

/* ---------------------------------------------------------------------------
 * Tags
 * --------------------------------------------------------------------------- */
.wcpr-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.wcpr-tag {
	display: inline-block;
	background: var(--wcpr-tag-bg);
	color: var(--wcpr-tag-color);
	font-size: 0.8em;
	padding: 3px 12px;
	border-radius: 20px;
	font-weight: 500;
}

/* ---------------------------------------------------------------------------
 * Photos
 * --------------------------------------------------------------------------- */
.wcpr-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.wcpr-photo {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: var(--wcpr-border-radius);
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.wcpr-photo:hover {
	opacity: 0.85;
}

/* ---------------------------------------------------------------------------
 * Product Rating Badge (under product title)
 * --------------------------------------------------------------------------- */
.wcpr-product-rating-badge {
	margin: 4px 0 12px;
	line-height: 1;
}

.wcpr-badge-header {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wcpr-product-rating-stars {
	letter-spacing: 1px;
	font-size: 16px;
}

.wcpr-product-rating-text {
	font-size: 0.95em;
}

.wcpr-product-rating-count {
	color: #64748b;
	margin-left: 2px;
}

/* ---------------------------------------------------------------------------
 * Product Review Excerpt (inside badge)
 * --------------------------------------------------------------------------- */
.wcpr-product-review-excerpt {
	margin-top: 8px;
	padding: 10px 12px;
	background: var(--wcpr-bg-color);
	border-radius: var(--wcpr-border-radius);
	box-shadow: var(--wcpr-shadow);
	font-size: 0.88em;
	line-height: 1.5;
}

.wcpr-excerpt-title {
	display: block;
	font-weight: 600;
	margin-bottom: 2px;
}

.wcpr-excerpt-text {
	margin: 0 0 4px;
	color: #64748b;
}

.wcpr-excerpt-author {
	font-size: 0.9em;
	color: #94a3b8;
}

/* ---------------------------------------------------------------------------
 * Load More Button
 * --------------------------------------------------------------------------- */
.wcpr-load-more-wrap {
	text-align: center;
	margin-top: 20px;
}

.wcpr-load-more-btn {
	padding: 10px 24px;
	border: 2px solid currentColor;
	background: transparent;
	border-radius: var(--wcpr-border-radius);
	cursor: pointer;
	font-size: 0.9em;
	font-weight: 500;
	transition: opacity 0.2s ease;
}

.wcpr-load-more-btn:hover {
	opacity: 0.7;
}

.wcpr-load-more-btn:disabled {
	opacity: 0.5;
	cursor: wait;
}
