/* ============================================================
   BizNews – wpDiscuz integration (article rating + comments)
   ============================================================ */

/* Comments block wrapper */
#wpdcom {
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid #ebebeb;
}

#wpdcom .wpd-thread-head .wpd-thread-info {
	border-bottom: 2px solid #FDC400;
}

/* ── Article rating (#wpd-post-rating) ── */
#wpd-post-rating {
	display: block;
	width: 100%;
	margin: 1.5rem 0;
	padding: 1.25rem 1rem;
	background: #fff;
	border: 1px solid #ebebeb;
	box-sizing: border-box;
}

#wpd-post-rating .wpd-rating-wrap {
	width: 100%;
	max-width: 360px;
	margin: 0 auto;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
}

/* Hide decorative dashed lines */
#wpd-post-rating .wpd-rating-wrap .wpd-rating-left,
#wpd-post-rating .wpd-rating-wrap .wpd-rating-right {
	display: none;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-data {
	width: 100%;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	white-space: normal;
}

/* Score + vote row */
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.35rem;
	width: auto;
	height: auto;
	margin: 0 auto 0.15rem;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 0;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-value span {
	display: inline !important;
	cursor: default;
	color: #1e2024;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrv {
	font-size: 2rem !important;
	font-weight: 700;
	line-height: 1 !important;
	padding: 0 !important;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrv::after {
	content: " / 5";
	font-size: 0.95rem;
	font-weight: 500;
	color: #6c757d;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrc,
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrt {
	display: inline !important;
	font-size: 0.85rem !important;
	font-weight: 500;
	line-height: 1.2 !important;
	padding: 0 !important;
	color: #6c757d !important;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-value .wpdrc::before {
	content: "·";
	margin: 0 0.35rem;
	color: #ccc;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover,
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover .wpdrv,
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover .wpdrc,
#wpd-post-rating .wpd-rating-wrap .wpd-rating-value:hover .wpdrt {
	background: transparent !important;
	color: inherit !important;
}

/* Title */
#wpd-post-rating .wpd-rating-wrap .wpd-rating-title {
	width: 100%;
	max-width: 100%;
	margin: 0.65rem 0 0;
	padding: 0;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6c757d;
	line-height: 1.3;
	word-break: normal;
	white-space: normal;
}

/* Vote count line (injected via title sibling – use stars area margin) */
#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars {
	display: flex;
	flex-wrap: nowrap;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	margin-top: 0.5rem;
	gap: 2px;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg,
#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg {
	width: 24px;
	height: 24px;
	display: block;
	flex-shrink: 0;
	margin: 0;
	overflow: visible;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star,
#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg .wpd-star {
	fill: #ddd;
}

#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-star.wpd-active,
#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg .wpd-star.wpd-active {
	fill: #FDC400;
}

/* Interactive stars (not yet rated) */
#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts {
	display: none;
	margin-top: 0.5rem;
	flex-wrap: nowrap;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 2px;
	cursor: pointer;
}

#wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rating-stars {
	display: none;
}

#wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rating-data:hover .wpd-rate-starts {
	display: flex;
}

#wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts svg {
	cursor: pointer;
}

#wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts:hover svg .wpd-star {
	fill: #FDC400;
}

#wpd-post-rating.wpd-not-rated .wpd-rating-wrap .wpd-rate-starts svg:hover ~ svg .wpd-star {
	fill: #ddd;
}

/* Fallback: generic .wpd-rating (shortcode / other contexts) */
.wpd-rating {
	display: block;
	width: 100%;
	margin: 1.5rem 0;
}

.wpd-rating .wpd-rating-wrap {
	width: 100%;
	max-width: 360px;
	margin: 0 auto;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-left,
.wpd-rating .wpd-rating-wrap .wpd-rating-right {
	display: none;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-data {
	width: 100%;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-value {
	width: auto;
	height: auto;
	border: none;
	border-radius: 0;
	background: transparent;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-value .wpdrc,
.wpd-rating .wpd-rating-wrap .wpd-rating-value .wpdrt {
	display: inline !important;
	font-size: 0.85rem !important;
	color: #6c757d !important;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-stars {
	display: flex;
	justify-content: center;
	margin-top: 0.5rem;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-stars svg,
.wpd-rating .wpd-rating-wrap .wpd-rate-starts svg {
	width: 24px;
	height: 24px;
}

.wpd-rating .wpd-rating-wrap .wpd-rating-stars svg .wpd-active {
	fill: #FDC400;
}

/* Responsive */
@media (max-width: 575.98px) {
	#wpd-post-rating {
		padding: 1rem 0.75rem;
	}

	#wpd-post-rating .wpd-rating-wrap .wpd-rating-stars svg,
	#wpd-post-rating .wpd-rating-wrap .wpd-rate-starts svg {
		width: 22px;
		height: 22px;
	}
}
