/**
 * YITH WooCommerce Advanced Reviews Ultra-Compact Theme Styling for Ecom-Plus.
 *
 * Dense, space-efficient, mobile-optimized, and aligned with Ecom-Plus luxury emerald (#005C42) and amber (#F59E0B).
 *
 * @package Ecom_Plus
 */

:root {
	--ywar-brand-emerald: #0f172a;
	--ywar-brand-emerald-hover: #1e293b;
	--ywar-brand-amber: #f59e0b;
	--ywar-star-gold: #f59e0b;
}

/* 1. Main Review Container */
.yith-ywar-main-wrapper {
	font-family: inherit;
	color: #334155;
	padding: 0;
	margin: 0;
}

.yith-ywar-reviews-wrapper {
	background: transparent;
	border: none;
	padding: 0;
	margin-bottom: 1.25rem;
}

/* 2. Compact Customer Media Gallery Bar (When Photos/Videos Exist) */
.yith-ywar-reviews-with-attachments {
	margin-bottom: 1rem !important;
	padding: 0.75rem 1rem !important;
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.875rem !important;
}

.yith-ywar-reviews-with-attachments.empty-gallery {
	display: none !important;
}

.yith-ywar-reviews-with-attachments h4 {
	font-size: 0.75rem !important;
	font-weight: 800 !important;
	color: #475569 !important;
	margin: 0 0 0.5rem 0 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
}

.yith-ywar-attachment-item {
	width: 52px !important;
	height: 52px !important;
	border-radius: 0.5rem !important;
	overflow: hidden !important;
	border: 1.5px solid #cbd5e1 !important;
	display: inline-block !important;
	margin-right: 0.5rem !important;
	transition: all 0.2s ease !important;
}

.yith-ywar-attachment-item:hover {
	border-color: #0f172a !important;
	transform: scale(1.05) !important;
}

.yith-ywar-attachment-item img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

/* 3. Ultra-Compact 2-Column Reviews Grid on Desktop / Tablet */
.yith-ywar-reviews-list {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 0.75rem !important;
	margin: 0 0 1rem 0 !important;
	padding: 0 !important;
}

@media (min-width: 768px) {
	.yith-ywar-reviews-list {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 0.875rem !important;
	}
}

/* 4. Dense, Low-Profile Review Cards */
.yith-ywar-single-review,
.yith-ywar-reviews-list > div,
.yith-ywar-reviews-list > article,
.yith-ywar-reviews-list .review-item {
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.75rem !important;
	padding: 0.75rem 1rem !important;
	margin: 0 !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: space-between !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.yith-ywar-single-review:hover,
.yith-ywar-reviews-list > div:hover {
	border-color: #cbd5e1 !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

/* Review Card Header (Author + Stars + Badge) */
.yith-ywar-author-info,
.yith-ywar-single-review .review-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 0.5rem !important;
	margin-bottom: 0.35rem !important;
	padding-bottom: 0.35rem !important;
	border-bottom: 1px solid #f1f5f9 !important;
}

.yith-ywar-author-name,
.yith-ywar-single-review .author-name {
	font-weight: 700 !important;
	font-size: 0.8125rem !important;
	color: #0f172a !important;
	line-height: 1.2 !important;
}

.yith-ywar-verified-badge {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.2rem !important;
	padding: 0.1rem 0.4rem !important;
	background-color: #ecfdf5 !important;
	border: 1px solid #a7f3d0 !important;
	color: #065f46 !important;
	border-radius: 9999px !important;
	font-size: 0.625rem !important;
	font-weight: 700 !important;
	line-height: 1 !important;
}

/* Star Ratings in Reviews & PDP */
.yith-ywar-stars,
.yith-ywar-star-rating,
.star-rating,
.yith-ywar-single-review .stars,
.yith-ywar-product-rating .star-rating {
	color: #f59e0b !important;
	font-size: 0.75rem !important;
	line-height: 1 !important;
	margin: 0 !important;
}

.yith-ywar-product-rating-wrapper {
	display: inline-flex !important;
	align-items: center !important;
	margin: 0.25rem 0 0.5rem 0 !important;
}

.yith-ywar-product-rating {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.5rem !important;
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
}

.yith-ywar-product-rating .stars {
	display: inline-block !important;
	width: 80px !important;
	min-width: 80px !important;
	max-width: 80px !important;
	height: 16px !important;
	vertical-align: middle !important;
	margin: 0 !important;
	-webkit-mask-size: 16px 16px !important;
	mask-size: 16px 16px !important;
	-webkit-mask-repeat: repeat-x !important;
	mask-repeat: repeat-x !important;
}

.yith-ywar-product-rating .total-reviews {
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
	color: #64748b !important;
	text-decoration: none !important;
	line-height: 1 !important;
	margin: 0 !important;
}

.yith-ywar-product-rating .total-reviews:hover {
	color: #ff6a00 !important;
	text-decoration: underline !important;
}

/* Review Title & Content */
.yith-ywar-review-title,
.yith-ywar-single-review .review-title {
	font-size: 0.8125rem !important;
	font-weight: 800 !important;
	color: #0f172a !important;
	margin: 0.15rem 0 !important;
	line-height: 1.3 !important;
}

.yith-ywar-review-content,
.yith-ywar-single-review .review-content,
.yith-ywar-single-review p {
	font-size: 0.8125rem !important;
	color: #475569 !important;
	line-height: 1.45 !important;
	margin: 0.25rem 0 !important;
}

/* Review In-Card Media Attachments */
.yith-ywar-single-review .attachments-list,
.yith-ywar-single-review .review-attachments {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 0.375rem !important;
	margin-top: 0.35rem !important;
}

.yith-ywar-single-review .attachment-thumb,
.yith-ywar-single-review .attachments-list img {
	width: 44px !important;
	height: 44px !important;
	border-radius: 0.375rem !important;
	object-fit: cover !important;
	border: 1px solid #e2e8f0 !important;
	cursor: pointer !important;
	transition: transform 0.15s ease !important;
}

.yith-ywar-single-review .attachment-thumb:hover,
.yith-ywar-single-review .attachments-list img:hover {
	transform: scale(1.08) !important;
	border-color: #0f172a !important;
}

/* Actions / Upvote Bar */
.yith-ywar-actions,
.yith-ywar-single-review .review-actions {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-end !important;
	gap: 0.5rem !important;
	margin-top: 0.35rem !important;
	padding-top: 0.25rem !important;
}

.yith-ywar-vote-button,
.yith-ywar-single-review .vote-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 0.25rem !important;
	padding: 0.15rem 0.5rem !important;
	background-color: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 0.375rem !important;
	font-size: 0.6875rem !important;
	font-weight: 700 !important;
	color: #64748b !important;
	line-height: 1.2 !important;
	transition: all 0.15s ease !important;
	cursor: pointer !important;
}

.yith-ywar-vote-button:hover,
.yith-ywar-single-review .vote-btn:hover {
	background-color: #f1f5f9 !important;
	border-color: #cbd5e1 !important;
	color: #0f172a !important;
}

/* 5. Ultra-Compact Review Submission Form */
.yith-ywar-edit-forms.new-review {
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 1rem !important;
	padding: 1rem 1.25rem !important;
	margin-top: 1rem !important;
}

.yith-ywar-edit-forms .form-header {
	font-size: 0.875rem !important;
	font-weight: 800 !important;
	color: #0f172a !important;
	margin-bottom: 0.75rem !important;
	padding-bottom: 0.5rem !important;
	border-bottom: 1px solid #e2e8f0 !important;
}

.yith-ywar-edit-forms .form-element {
	margin-bottom: 0.625rem !important;
}

.yith-ywar-edit-forms .form-element label {
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	color: #334155 !important;
	display: block !important;
	margin-bottom: 0.25rem !important;
}

.yith-ywar-edit-forms .form-review-user-data {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 0.625rem !important;
}

@media (min-width: 640px) {
	.yith-ywar-edit-forms .form-review-user-data {
		grid-template-columns: 1fr 1fr !important;
	}
}

.yith-ywar-edit-forms input[type="text"],
.yith-ywar-edit-forms input[type="email"],
.yith-ywar-edit-forms textarea {
	width: 100% !important;
	padding: 0.4rem 0.75rem !important;
	font-size: 0.8125rem !important;
	background: #ffffff !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 0.5rem !important;
	color: #0f172a !important;
	outline: none !important;
	box-sizing: border-box !important;
	transition: border-color 0.15s ease !important;
}

.yith-ywar-edit-forms input[type="text"]:focus,
.yith-ywar-edit-forms input[type="email"]:focus,
.yith-ywar-edit-forms textarea:focus {
	border-color: #0f172a !important;
	box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1) !important;
}

.yith-ywar-edit-forms textarea {
	min-height: 60px !important;
	height: 68px !important;
	resize: vertical !important;
}

/* Star picker in form */
.yith-ywar-edit-forms .form-review-rating .stars span {
	font-size: 1.125rem !important;
	cursor: pointer !important;
	color: #f59e0b !important;
}

/* Compact File Attachment in Form */
.yith-ywar-attachments {
	background: #ffffff !important;
	border: 1.5px dashed #cbd5e1 !important;
	border-radius: 0.625rem !important;
	padding: 0.625rem !important;
	text-align: center !important;
}

.yith-ywar-attachments .attachment-field {
	font-size: 0.75rem !important;
}

.yith-ywar-edit-forms .form-review-attachment label span {
	font-size: 0.6875rem !important;
	color: #64748b !important;
	display: block !important;
	margin-top: 0.15rem !important;
	line-height: 1.3 !important;
}

/* Submit Button */
.yith-ywar-edit-forms button[type="submit"],
.yith-ywar-edit-forms .form-footer button {
	background-color: #0f172a !important;
	color: #ffffff !important;
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	padding: 0.5rem 1.25rem !important;
	border-radius: 0.625rem !important;
	border: none !important;
	cursor: pointer !important;
	transition: background-color 0.15s ease !important;
}

.yith-ywar-edit-forms button[type="submit"]:hover,
.yith-ywar-edit-forms .form-footer button:hover {
	background-color: #004733 !important;
}

/* ==========================================================================
   6. Optimized Empty Reviews State (Balanced Icon, Enhanced Typography & Zero Wasted Space)
   ========================================================================== */
.yith-ywar-no-reviews {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	width: auto !important;
	max-width: 480px !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 1rem auto !important;
	padding: 1.5rem 2rem !important;
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 1rem !important;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
	box-sizing: border-box !important;
	gap: 0.75rem !important;
}

.yith-ywar-no-reviews .icon,
.yith-ywar-no-reviews img.icon {
	width: 52px !important;
	height: 52px !important;
	margin: 0 auto !important;
	display: block !important;
	opacity: 0.9 !important;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04)) !important;
}

.yith-ywar-no-reviews .message,
.yith-ywar-no-reviews span.message {
	display: block !important;
	font-size: 1rem !important;
	line-height: 1.55 !important;
	font-weight: 600 !important;
	color: #334155 !important;
	text-align: center !important;
	max-width: 380px !important;
	margin: 0 auto !important;
}

.yith-ywar-reviews-wrapper:has(.yith-ywar-no-reviews),
.yith-ywar-reviews-list:has(.yith-ywar-no-reviews) {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
}

@media (max-width: 640px) {
	.yith-ywar-no-reviews {
		padding: 1.25rem 1.25rem !important;
		margin: 0.75rem auto !important;
		max-width: 100% !important;
		gap: 0.5rem !important;
	}
	.yith-ywar-no-reviews .icon,
	.yith-ywar-no-reviews img.icon {
		width: 44px !important;
		height: 44px !important;
	}
	.yith-ywar-no-reviews .message,
	.yith-ywar-no-reviews span.message {
		font-size: 0.875rem !important;
		line-height: 1.45 !important;
	}
}
