/* =============================================
   KPG Rating Widget
   Compatible with: Salient theme (ThemeNectar)
   ============================================= */

.kpg-rating-card {
	display: block;
	border: 2px solid #1a1a1a;
	border-radius: 8px;
	overflow: hidden;
	margin: 2em 0;
	font-family: inherit;
	background: #fff;
	max-width: 560px;
}

/* Header bar */
.kpg-rating-header {
	background: #1a1a1a;
	color: #fff;
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 7px 16px;
}

/* Each rating row */
.kpg-rating-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #e8e8e8;
}

.kpg-rating-row:last-child {
	border-bottom: none;
}

/* Label side (icon + text) */
.kpg-rating-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.kpg-rating-icon {
	font-size: 1.4em;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 1px;
}

.kpg-rating-label-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.kpg-rating-label-text strong {
	font-size: 0.95em;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: 0.01em;
}

.kpg-rating-subtext {
	display: block;
	font-size: 0.8em;
	color: #666;
	line-height: 1.4;
	font-style: italic;
}

/* Score side (dots + fraction) */
.kpg-rating-score {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.kpg-rating-dots {
	display: flex;
	gap: 2px;
	font-size: 1.1em;
	line-height: 1;
}

.kpg-dot {
	display: inline-block;
}

.kpg-dot--empty {
	color: #ccc;
	font-size: 1em;
}

.kpg-rating-fraction {
	font-size: 0.85em;
	font-weight: 700;
	color: #1a1a1a;
	white-space: nowrap;
	min-width: 2.2em;
	text-align: right;
}

/* ---- Detail rows (Players, Age, Play time, Official site) ---- */
.kpg-detail-rows {
	border-top: 2px solid #e8e8e8;
}

.kpg-detail-row {
	display: flex;
	align-items: baseline;
	padding: 10px 16px;
	border-bottom: 1px solid #e8e8e8;
	gap: 12px;
}

.kpg-detail-row:last-child {
	border-bottom: none;
}

.kpg-detail-label {
	font-size: 0.8em;
	font-weight: 600;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	white-space: nowrap;
	min-width: 100px;
	flex-shrink: 0;
}

.kpg-detail-value {
	font-size: 0.9em;
	color: #1a1a1a;
}

.kpg-detail-value a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.kpg-detail-value a:hover {
	opacity: 0.7;
}

/* ---- Responsive: stack on narrow screens ---- */
@media (max-width: 480px) {
	.kpg-rating-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.kpg-rating-score {
		padding-left: 34px; /* align under label text, past icon */
	}
}

/* ---- Content utility classes (article section formatting) ---- */

/* Contrast block: Beginner vs Experienced */
.kpg-contrast {
	background: #f5f5f5;
	border-left: 4px solid #1a1a1a;
	border-radius: 0 6px 6px 0;
	padding: 16px 20px;
	margin: 1.5em 0;
}

.kpg-contrast p {
	margin: 0.4em 0;
}

.kpg-contrast p:first-child {
	margin-top: 0;
}

.kpg-contrast p:last-child {
	margin-bottom: 0;
}

/* Scenario walkthrough: in-game moment */
.kpg-scenario {
	background: #fffdf0;
	border: 1px solid #e8d880;
	border-left: 4px solid #D4AF37;
	border-radius: 0 6px 6px 0;
	padding: 16px 20px;
	margin: 1.5em 0;
	font-style: italic;
	color: #444444;
}

.kpg-scenario p {
	margin: 0.4em 0;
}

.kpg-scenario p:first-child {
	margin-top: 0;
}

.kpg-scenario p:last-child {
	margin-bottom: 0;
}

/* Rule callout: the definitive take (use max twice per article) */
.kpg-rule {
	background: #1a1a1a;
	color: #ffffff;
	border-radius: 6px;
	padding: 14px 20px;
	margin: 1.5em 0;
	font-weight: 600;
	font-size: 0.95em;
}

.kpg-rule p {
	margin: 0;
	color: #ffffff;
}

/* Tip / key insight: gold-accented callout */
.kpg-tip {
	border: 2px solid #D4AF37;
	border-radius: 6px;
	padding: 14px 20px;
	margin: 1.5em 0;
}

.kpg-tip p {
	margin: 0.4em 0;
}

.kpg-tip p:first-child {
	margin-top: 0;
}

.kpg-tip p:last-child {
	margin-bottom: 0;
}

/* ---- Salient theme override guard ---- */
/* Salient sometimes adds margin/padding to .nectar-* wrappers that
   wraps shortcode output. These rules keep the card clean. */
.kpg-rating-card *,
.kpg-rating-card *::before,
.kpg-rating-card *::after {
	box-sizing: border-box;
}

.kpg-rating-card p {
	margin: 0;
	padding: 0;
}

/* ---- Author byline ---- */
.kpg-author-byline {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 1.5em;
}

.kpg-author-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.kpg-author-byline-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.kpg-byline-label {
	font-size: 0.75rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.kpg-byline-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
}

.kpg-byline-name:hover {
	text-decoration: underline;
}
