/**
 * WooCommerce Reviews Shortcode — Card Styles
 */

.wcrs-wrapper {
	max-width: 760px;
	margin: 0 auto;
}

.wcrs-review-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 32px;
}

.wcrs-card {
	background: #ffffff;
	border: 1px solid #e7e7e9;
	border-radius: 14px;
	padding: 20px 22px;
	box-shadow: 0 1px 3px rgba(16, 16, 16, 0.04);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.wcrs-card:hover {
	box-shadow: 0 4px 14px rgba(16, 16, 16, 0.08);
	transform: translateY(-1px);
}

.wcrs-card-header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 10px;
}

.wcrs-avatar img {
	border-radius: 50%;
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
}

.wcrs-meta {
	flex: 1;
	min-width: 0;
}

.wcrs-name-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wcrs-author {
	font-weight: 600;
	font-size: 15px;
	color: #1a1a1a;
}

.wcrs-verified {
	font-size: 11px;
	font-weight: 600;
	color: #1a7f37;
	background: #e7f6ec;
	padding: 2px 8px;
	border-radius: 999px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.wcrs-date {
	font-size: 13px;
	color: #8a8a8e;
	margin-top: 2px;
}

.wcrs-stars {
	display: flex;
	gap: 2px;
	font-size: 16px;
	line-height: 1;
	white-space: nowrap;
	flex-shrink: 0;
}

.wcrs-star {
	color: #d8d8dc;
}

.wcrs-star.is-filled {
	color: #f5a623;
}

.wcrs-content {
	font-size: 14.5px;
	line-height: 1.65;
	color: #3c3c41;
}

.wcrs-content p:last-child {
	margin-bottom: 0;
}

.wcrs-no-reviews,
.wcrs-closed,
.wcrs-purchase-notice {
	font-size: 14.5px;
	color: #6b6b70;
	background: #f7f7f8;
	border-radius: 10px;
	padding: 14px 16px;
}

/* Summary block: average score + star bar breakdown */

.wcrs-summary {
	display: flex;
	gap: 36px;
	background: #ffffff;
	border: 1px solid #e7e7e9;
	border-radius: 14px;
	padding: 28px 30px;
	box-shadow: 0 1px 3px rgba(16, 16, 16, 0.04);
	margin-bottom: 22px;
}

.wcrs-summary-score {
	flex: 0 0 150px;
	text-align: center;
	border-right: 1px solid #ececee;
	padding-right: 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.wcrs-summary-number {
	font-size: 46px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	color: #1a1a1a;
}

.wcrs-summary-stars {
	font-size: 18px;
	letter-spacing: 2px;
	margin: 8px 0 6px;
}

.wcrs-summary-total {
	font-size: 13px;
	color: #8a8a8e;
}

.wcrs-summary-bars {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wcrs-bar-row {
	display: grid;
	grid-template-columns: 38px 1fr 32px;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	margin-bottom: 6px;
}

.wcrs-bar-row:last-child {
	margin-bottom: 0;
}

.wcrs-bar-label {
	color: #5a5a5e;
	font-weight: 600;
	text-align: right;
}

.wcrs-bar-track {
	background: #ebebee;
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}

.wcrs-bar-fill {
	height: 100%;
	border-radius: 999px;
	background: #f5a623;
}

.wcrs-bar-count {
	color: #8a8a8e;
	font-size: 12.5px;
}

@media (max-width: 480px) {
	.wcrs-summary {
		flex-direction: column;
		gap: 18px;
	}

	.wcrs-summary-score {
		border-right: none;
		border-bottom: 1px solid #ececee;
		padding-right: 0;
		padding-bottom: 18px;
	}
}

.wcrs-review-list.wcrs-review-list-extra.wcrs-is-collapsed {
	display: none !important;
}

.wcrs-toggle-button {
	display: block;
	width: 100%;
	background: #ffffff;
	color: #1a1a1a;
	border: 1px solid #d9d9dc;
	border-radius: 10px;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	margin-bottom: 28px;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wcrs-toggle-button:hover {
	background: #f7f7f8;
	border-color: #c8c8cc;
}

.wcrs-toggle-button[aria-expanded="true"] {
	background: #f7f7f8;
}

/* Clickable star rating (radio + label trick, CSS-only, no JS needed) */

.wcrs-star-rating {
	display: flex;
	flex-direction: row-reverse;
	gap: 6px;
	font-size: 0;
	width: max-content;
	margin-top: 4px;
}

.wcrs-star-rating input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wcrs-star-rating label {
	font-size: 38px;
	line-height: 1;
	color: #d8d8dc;
	cursor: pointer;
	transition: color 0.12s ease, transform 0.12s ease;
	margin: 0;
	padding: 4px;
	display: inline-block;
}

.wcrs-star-rating label:hover,
.wcrs-star-rating label:hover ~ label {
	color: #f5a623;
	transform: scale(1.08);
}

.wcrs-star-rating input[type="radio"]:checked ~ label {
	color: #f5a623;
}

.wcrs-star-rating input[type="radio"]:focus-visible ~ label {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
	border-radius: 4px;
}

/* Defensive fallback: if a theme/plugin injects a "Phone" field with a
   required asterisk we can't fully strip via PHP, at least hide the
   visual marker so it doesn't read as mandatory. */
.wcrs-comment-form [class*="phone"] .required,
.wcrs-comment-form [id*="phone"] ~ .required {
	display: none;
}

/* Comment / review form */

.wcrs-comment-form {
	background: #fafafa;
	border: 1px solid #ececee;
	border-radius: 14px;
	padding: 24px;
}

.wcrs-comment-form #reply-title,
.wcrs-comment-form .comment-reply-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 16px;
	display: block;
}

.wcrs-form-rating,
.wcrs-form-comment {
	margin-bottom: 16px;
}

.wcrs-form-rating > label,
.wcrs-form-comment > label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #2c2c2e;
}

.wcrs-comment-form select,
.wcrs-comment-form textarea,
.wcrs-comment-form input[type="text"],
.wcrs-comment-form input[type="email"] {
	width: 100%;
	border: 1px solid #d9d9dc;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
}

.wcrs-comment-form textarea {
	resize: vertical;
}

.wcrs-submit-button,
.wcrs-comment-form input#submit {
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 11px 22px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.wcrs-submit-button:hover,
.wcrs-comment-form input#submit:hover {
	background: #333333;
}

@media (max-width: 520px) {
	.wcrs-card-header {
		flex-wrap: wrap;
	}

	.wcrs-stars {
		order: 3;
		margin-left: 70px;
	}
}

/* Thank-you modal shown after a review is submitted */

.wcrs-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(20, 20, 22, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
	box-sizing: border-box;
	animation: wcrs-fade-in 0.18s ease;
}

.wcrs-modal-overlay[hidden] {
	display: none;
}

.wcrs-modal {
	background: #ffffff;
	border-radius: 16px;
	padding: 36px 32px 28px;
	max-width: 360px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	animation: wcrs-modal-pop 0.22s ease;
}

.wcrs-modal-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: #e7f6ec;
	color: #1a7f37;
	font-size: 28px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcrs-modal h3 {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 700;
	color: #1a1a1a;
}

.wcrs-modal p {
	margin: 0 0 20px;
	font-size: 14.5px;
	line-height: 1.5;
	color: #5a5a5e;
}

.wcrs-modal-progress {
	height: 4px;
	background: #ececee;
	border-radius: 999px;
	overflow: hidden;
}

.wcrs-modal-progress-bar {
	height: 100%;
	width: 0%;
	background: #1a7f37;
	border-radius: 999px;
	transition: width linear;
}

@keyframes wcrs-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes wcrs-modal-pop {
	from { opacity: 0; transform: scale(0.94) translateY(6px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.wcrs-modal-overlay,
	.wcrs-modal {
		animation: none;
	}
}
