/* ============================================================
   WooCommerce Advanced Reviews — Public Styles
   ============================================================ */

/* ── Star display (read-only) ─────────────────────────────── */
.war-star-display {
	display: inline-flex;
	gap: 1px;
	vertical-align: middle;
	line-height: 1;
}
.war-star { font-size: 18px; }
.war-star-full  { color: #f5a623; }
.war-star-half  { color: #f5a623; opacity: .55; }
.war-star-empty { color: #ddd; }

/* ── Star rating near product title ───────────────────────── */
.war-product-rating-summary {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 12px;
	flex-wrap: wrap;
	text-align: center;
}
.war-product-rating-summary .war-star { font-size: 16px; }
.war-rating-count { font-size: 13px; color: #777; }
.war-rating-link  { color: #777; text-decoration: underline; text-underline-offset: 2px; }
.war-rating-link:hover { color: #333; }

/* ── Reviews wrap ─────────────────────────────────────────── */
.war-reviews-wrap { max-width: 900px; }

/* ── Rating summary bar ───────────────────────────────────── */
.war-rating-summary {
	display: flex;
	align-items: center;
	gap: 40px;
	background: #fafafa;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 24px 28px;
	margin-bottom: 32px;
	flex-wrap: wrap;
}
.war-rating-average {
	text-align: center;
	min-width: 90px;
}
.war-avg-number {
	display: block;
	font-size: 48px;
	font-weight: 700;
	color: #222;
	line-height: 1;
	margin-bottom: 6px;
}
.war-rating-average .war-star { font-size: 22px; }
.war-avg-label {
	display: block;
	font-size: 12px;
	color: #999;
	margin-top: 6px;
}
.war-rating-bars { flex: 1; min-width: 200px; }
.war-rating-bar-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}
.war-bar-label {
	font-size: 13px;
	color: #666;
	width: 32px;
	flex-shrink: 0;
	text-align: right;
}
.war-bar-track {
	flex: 1;
	height: 8px;
	background: #e8e8e8;
	border-radius: 4px;
	overflow: hidden;
}
.war-bar-fill {
	height: 100%;
	background: #f5a623;
	border-radius: 4px;
	transition: width .4s ease;
}
.war-bar-count {
	font-size: 12px;
	color: #999;
	width: 16px;
	text-align: right;
	flex-shrink: 0;
}

/* ── Reviews list ─────────────────────────────────────────── */
.war-reviews-title {
	font-size: 18px;
	font-weight: 600;
	color: #222;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #f0f0f0;
}
.war-no-reviews {
	text-align: center;
	padding: 40px 20px;
	color: #999;
}
.war-no-reviews-icon { font-size: 40px; display: block; margin-bottom: 12px; }

/* ── Review card ──────────────────────────────────────────── */
.war-review-card {
	border: 1px solid #efefef;
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 16px;
	background: #fff;
	transition: box-shadow .2s;
}
.war-review-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }

.war-review-card-header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 12px;
}
.war-reviewer-avatar img.war-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.war-reviewer-info {
	flex: 1;
}
.war-reviewer-name {
	display: block;
	font-weight: 600;
	font-size: 15px;
	color: #222;
}
.war-verified-badge {
	display: inline-block;
	font-size: 11px;
	color: #2e7d32;
	background: #e8f5e9;
	border-radius: 20px;
	padding: 2px 8px;
	margin-top: 3px;
}
.war-review-meta {
	text-align: right;
	flex-shrink: 0;
}
.war-review-meta .war-star { font-size: 16px; }
.war-review-date {
	display: block;
	font-size: 12px;
	color: #aaa;
	margin-top: 4px;
}
.war-review-body {
	color: #444;
	font-size: 14px;
	line-height: 1.7;
	margin-bottom: 12px;
}
.war-review-body p { margin: 0 0 8px; }
.war-review-body p:last-child { margin: 0; }

/* ── Review photos ────────────────────────────────────────── */
.war-review-photos {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.war-photo-thumb {
	display: block;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e0e0e0;
	transition: opacity .2s;
}
.war-photo-thumb:hover { opacity: .82; }
.war-photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Inline review form ───────────────────────────────────── */
.war-inline-form-wrap {
	background: #fafafa;
	border: 1px solid #efefef;
	border-radius: 12px;
	padding: 28px 32px;
	margin-top: 36px;
}
.war-form-title {
	font-size: 18px;
	font-weight: 600;
	color: #222;
	margin: 0 0 22px;
	padding-bottom: 12px;
	border-bottom: 2px solid #efefef;
}
.war-inline-form-inner { max-width: 600px; }

/* ── Star rating input ────────────────────────────────────── */
.war-stars-wrap {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 3px;
}
.war-stars-wrap input[type="radio"] { display: none; }
.war-stars-wrap label {
	font-size: 32px;
	color: #ddd;
	cursor: pointer;
	transition: color .12s;
	padding: 0 2px;
	line-height: 1;
}
.war-stars-wrap input:checked ~ label,
.war-stars-wrap label:hover,
.war-stars-wrap label:hover ~ label { color: #f5a623; }

/* ── Form fields ──────────────────────────────────────────── */
.war-field {
	margin-bottom: 18px;
}
.war-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.war-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 600px) {
	.war-form-row { grid-template-columns: 1fr; }
	.war-inline-form-wrap { padding: 20px 18px; }
}
.war-required { color: #e02222; }
.war-image-hint { font-weight: 400; font-size: 11px; color: #aaa; margin-left: 6px; text-transform: none; letter-spacing: 0; }

.war-input,
.war-textarea {
	width: 100%;
	border: 1.5px solid #e0e0e0;
	border-radius: 8px;
	padding: 11px 14px;
	font-size: 14px;
	color: #333;
	background: #fff;
	transition: border-color .18s, box-shadow .18s;
	box-sizing: border-box;
	font-family: inherit;
}
.war-input:focus,
.war-textarea:focus {
	border-color: #96588a;
	outline: none;
	box-shadow: 0 0 0 3px rgba(150,88,138,.1);
}
.war-textarea { resize: vertical; min-height: 120px; }

.war-logged-as {
	font-size: 13px;
	color: #777;
	margin: 0 0 18px;
	padding: 10px 14px;
	background: #fff;
	border-radius: 8px;
	border: 1.5px solid #e0e0e0;
}

/* ── Image upload area ────────────────────────────────────── */
.war-image-upload-wrap label { cursor: pointer; }
.war-upload-area {
	position: relative;
	border: 2px dashed #d0d0d0;
	border-radius: 10px;
	padding: 18px;
	text-align: center;
	background: #fff;
	cursor: pointer;
	transition: border-color .18s, background .18s;
}
.war-upload-area:hover,
.war-upload-area.war-drag-over {
	border-color: #96588a;
	background: #fdf6ff;
}
.war-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}
.war-upload-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: #aaa;
	font-size: 13px;
	pointer-events: none;
}
.war-upload-icon { font-size: 28px; }

/* ── Preview grid ─────────────────────────────────────────── */
.war-preview-container {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}
.war-preview-item {
	position: relative;
	width: 76px;
	height: 76px;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid #e0e0e0;
}
.war-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.war-preview-remove {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 20px;
	height: 20px;
	background: rgba(0,0,0,.55);
	color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.war-preview-uploading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,.65);
}

/* ── Approval notice ──────────────────────────────────────── */
.war-approval-notice {
	font-size: 13px;
	color: #888;
	margin-bottom: 18px;
}

/* ── Submit button ────────────────────────────────────────── */
.war-submit-btn {
	display: inline-block;
	background: #222 !important;
	color: #fff !important;
	border: none !important;
	padding: 13px 32px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	letter-spacing: .5px;
	text-transform: uppercase;
	border-radius: 8px !important;
	cursor: pointer;
	transition: background .18s !important;
}
.war-submit-btn:hover  { background: #444 !important; }
.war-submit-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Notices ──────────────────────────────────────────────── */
.war-notice {
	padding: 13px 18px;
	border-radius: 8px;
	margin-bottom: 18px;
	font-size: 14px;
}
.war-notice-success { background: #e8f5e9; border-left: 4px solid #4caf50; color: #2e7d32; }
.war-notice-error   { background: #fce4e4; border-left: 4px solid #e02222; color: #b71c1c; }

/* ── Review page (shortcode) ──────────────────────────────── */
.war-review-page { max-width: 720px; margin: 0 auto; }
.war-review-intro { margin-bottom: 32px; }
.war-product-review-block {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.war-product-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.war-product-header img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }
.war-product-header h3 { margin: 0; font-size: 16px; }
.war-star-rating-input { margin-bottom: 16px; }
.war-star-rating-input > label { font-weight: 600; display: block; margin-bottom: 4px; }
.war-product-submitted { text-align: center; padding: 20px; font-size: 16px; color: #2e7d32; font-weight: 600; }
.war-check { font-size: 24px; margin-right: 8px; }

/* ── Reviews Widget (homepage shortcode) ──────────────────── */
.war-widget-wrap {
	text-align: center;
	padding: 20px 0 40px;
}
.war-widget-header {
	margin-bottom: 32px;
}
.war-widget-header .war-star-display {
	justify-content: center;
	margin-bottom: 10px;
}
.war-widget-header .war-star { font-size: 38px; }
.war-widget-summary-text {
	font-size: 16px;
	color: #444;
	margin: 0;
}
.war-widget-summary-text strong {
	font-size: 17px;
	color: #222;
}
.war-widget-summary-text a {
	color: #222;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.war-widget-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	text-align: left;
}
@media (max-width: 1024px) {
	.war-widget-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.war-widget-grid { grid-template-columns: 1fr; }
}

.war-widget-card {
	background: #fff;
	border: 1px solid #efefef;
	border-radius: 10px;
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 2px 8px rgba(0,0,0,.04);
	transition: box-shadow .2s;
}
.war-widget-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }

.war-widget-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.war-widget-card-top .war-star-display { }
.war-widget-card-top .war-star { font-size: 16px; }
.war-widget-card-stars-rating {
	font-size: 13px;
	color: #aaa;
	display: flex;
	align-items: center;
	gap: 6px;
}
.war-widget-card-stars-rating span { color: #aaa; }
.war-widget-card-age {
	font-size: 12px;
	color: #bbb;
	white-space: nowrap;
}

.war-widget-card-text {
	font-size: 14px;
	color: #444;
	line-height: 1.65;
	flex: 1;
}

.war-widget-card-author {
	font-size: 14px;
	font-weight: 700;
	color: #222;
	margin-top: 4px;
}

.war-widget-photos {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.war-widget-photo {
	width: 52px;
	height: 52px;
	border-radius: 6px;
	object-fit: cover;
	border: 1px solid #e8e8e8;
}
