/**
 * GCDRI Rating Schema PRO - frontend styles
 * Version: 1.6.0
 *
 * Cấu trúc markup:
 * .gcdri-rating > .gcdri-stars > (.stars-base + .stars)
 *   .stars-base : 5 sao nền màu xám (luôn đầy)
 *   .stars      : 5 sao màu, cắt theo width % = ratingValue / 5
 */

.gcdri-rating {
	margin: 16px 0;
	font-size: 16px;
	line-height: 1.5;
}

.gcdri-rating.left-align {
	text-align: left;
}

.gcdri-rating.right-align {
	text-align: right;
}

.gcdri-rating .gcdri-stars {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0;
	white-space: nowrap;
}

.gcdri-rating .gcdri-stars .stars-base {
	color: #d4d4d4;
}

/**
 * width mặc định 100%: nếu inline style bị Content-Security-Policy chặn,
 * block vẫn hiện đủ 5 sao thay vì trắng trơn.
 */
.gcdri-rating .gcdri-stars .stars {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	overflow: hidden;
	color: #ffd700;
	pointer-events: none;
}

.gcdri-rating .rating-text {
	vertical-align: middle;
}

/* --- 10 kiểu sao ------------------------------------------------------- */

/* Style 1 - vàng cổ điển */
.gcdri-rating.style1 .stars {
	color: #ffd700;
}

/* Style 2 - cam viền tối */
.gcdri-rating.style2 .stars {
	color: #ff9800;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

/* Style 3 - nền xám nhạt. Dùng box-shadow thay padding để không lệch lớp overlay. */
.gcdri-rating.style3 .gcdri-stars {
	background: #eee;
	border-radius: 3px;
	box-shadow: 0 0 0 4px #eee;
}

/* Style 4 - cỡ lớn. Đặt font-size ở wrapper để 2 lớp sao cùng chiều rộng. */
.gcdri-rating.style4 .gcdri-stars {
	font-size: 24px;
}

.gcdri-rating.style4 .stars {
	color: #ff9800;
}

/* Style 5 - hồng */
.gcdri-rating.style5 .stars {
	color: #e91e63;
}

/* Style 6 - phát sáng xanh */
.gcdri-rating.style6 .stars {
	text-shadow: 0 0 3px #00bcd4;
}

/* Style 7 - đậm */
.gcdri-rating.style7 .gcdri-stars {
	font-weight: 700;
}

/* Style 8 - gradient. Fallback sang vàng đặc nếu trình duyệt không hỗ trợ background-clip: text. */
.gcdri-rating.style8 .stars {
	color: #ffd700;
	background-image: linear-gradient(90deg, #ffd700, #ff3d00);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.gcdri-rating.style8 .stars {
		-webkit-background-clip: text;
		background-clip: text;
		-webkit-text-fill-color: transparent;
		color: transparent;
	}
}

/* Style 9 - nhấp nháy. Keyframes có prefix để không đụng theme. */
.gcdri-rating.style9 .gcdri-stars {
	animation: gcdri-rsp-pulse 1.4s ease-in-out infinite;
}

@keyframes gcdri-rsp-pulse {
	0% {
		opacity: 1;
	}

	50% {
		opacity: 0.55;
	}

	100% {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gcdri-rating.style9 .gcdri-stars {
		animation: none;
	}
}

/* Style 10 - nghiêng, tím indigo */
.gcdri-rating.style10 .gcdri-stars {
	font-style: italic;
}

.gcdri-rating.style10 .stars {
	color: #3f51b5;
}
