/* Modern Star Rating Styles */
.comment-form-rating {
	margin: 20px 0;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 8px;
	border-left: 4px solid #ffc107;
}
.comment-form-rating > label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 14px;
	color: #333;
}
.comment-form-rating .required {
	color: #e74c3c;
}
/* Radio group container */
.rating-stars {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}
/* Hide default radio buttons */
.rating-stars input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
/* Star label styling */
.star-label {
	cursor: pointer;
	position: relative;
	display: inline-block;
	transition: transform 0.2s ease;
	order: 2;
}
.star-label:hover {
	transform: scale(1.15);
}
/* Hide the text, show only star */
.star-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* Star icon using ::before */
.star-label::before {
	content: "★";
	font-size: 20px;
	color: #ddd;
	transition: color 0.2s ease, text-shadow 0.2s ease;
	display: block;
	line-height: 1;
}
/* Hover effect - highlight current star and all previous stars */
.rating-stars:hover .star-label::before {
	color: #ddd;
}
.star-label:hover::before,
.star-label:hover ~ .star-label::before {
	color: #ffc107;
	text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}
/* Selected state - when radio is checked, highlight it and all following stars */
.rating-stars input[type="radio"]:checked + .star-label::before {
	color: #ffc107;
	text-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}
.rating-stars input[type="radio"]:checked ~ .star-label::before {
	color: #ffc107;
	text-shadow: 0 0 10px rgba(255, 193, 7, 0.6);
}
/* Focus state for accessibility */
.rating-stars input[type="radio"]:focus + .star-label::before {
	outline: 2px solid #ffc107;
	outline-offset: 2px;
	border-radius: 4px;
}

/* Average Rating Summary - NEW SECTION */
.average-rating-summary {
	margin: 30px 0;
	padding: 25px;
	background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
	border: 2px solid #ffc107;
	border-radius: 12px;
	text-align: center;
	box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}

.average-rating-header {
	font-size: 18px;
	font-weight: 700;
	color: #333;
	margin-bottom: 15px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.average-rating-content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	flex-wrap: wrap;
}

.average-stars {
	color: #ffc107;
	font-size: 32px;
	letter-spacing: 4px;
	text-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.average-number {
	font-size: 36px;
	font-weight: 700;
	color: #ffc107;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rating-count {
	font-size: 14px;
	color: #666;
	font-style: italic;
}

/* Display comment rating (on submitted comments) */
.comment-rating {
	margin: 0 0 15px 0;
	padding: 10px 15px;
	background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
	border-left: 3px solid #ffc107;
	border-radius: 4px;
	font-weight: 500;
	color: #555;
}
.comment-rating .stars {
	color: #ffc107;
	font-size: 18px;
	letter-spacing: 2px;
	margin-left: 8px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Delete comment button */
.comment-delete-action {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #eee;
}
.delete-comment-link {
	display: inline-block;
	padding: 6px 14px;
	background: #f44336;
	color: #fff !important;
	text-decoration: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	transition: background 0.3s ease, transform 0.2s ease;
}
.delete-comment-link:hover {
	background: #d32f2f;
	transform: translateY(-1px);
	text-decoration: none;
}
.delete-comment-link:active {
	transform: translateY(0);
}

/* Success message after deletion */
.comment-deleted-notice {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #4CAF50;
	color: white;
	padding: 15px 25px;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 9999;
	font-weight: 500;
	opacity: 1;
	transition: opacity 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 600px) {
	.star-label::before {
		font-size: 18px;
	}
	
	.rating-stars {
		gap: 2px;
	}
	
	.comment-form-rating {
		padding: 12px;
	}
	
	.average-rating-summary {
		padding: 20px 15px;
	}
	
	.average-stars {
		font-size: 28px;
	}
	
	.average-number {
		font-size: 30px;
	}
	
	.rating-count {
		width: 100%;
		margin-top: 8px;
	}
}