/**
 * Casino Rating — structural + visual styles for rating output.
 * Visual tokens come from the active theme (:root --csr-* variables); fallbacks
 * keep the output usable even without a matching theme.
 */

.csr-table {
	--_accent: var( --csr-color-accent, #18a058 );
	--_card: var( --csr-color-card, #fff );
	--_border: var( --csr-color-border, #e6e8eb );
	--_text: var( --csr-color-text, #1a1d21 );
	--_muted: var( --csr-color-muted, #6b7280 );
	display: flex;
	flex-direction: column;
	gap: 14px;
	color: var( --_text );
}

.csr-table__title { margin: 0 0 4px; font-size: 1.5rem; }

.csr-table__head,
.csr-row {
	display: grid;
	grid-template-columns: 52px 2.2fr 1.7fr auto 1.5fr;
	align-items: center;
	gap: 16px;
}

.csr-table__head {
	padding: 4px 22px;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var( --_muted );
}

.csr-row {
	position: relative;
	padding: 18px 22px;
	background: var( --_card );
	border: 1px solid var( --_border );
	border-radius: var( --csr-radius, 14px );
	box-shadow: var( --csr-shadow-sm, 0 1px 3px rgba( 0, 0, 0, 0.06 ) );
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.csr-row:hover {
	box-shadow: var( --csr-shadow-lg, 0 18px 40px rgba( 0, 0, 0, 0.16 ) );
	transform: translateY( -2px );
	border-color: #d7dbe0;
}

/* Editor's choice — first data row (head is the first child). */
.csr-row:nth-child(2) {
	border-color: var( --csr-color-cta, #f5a623 );
	box-shadow: 0 0 0 1px var( --csr-color-cta, #f5a623 ), var( --csr-shadow, 0 6px 18px rgba( 0, 0, 0, 0.08 ) );
}
.csr-row:nth-child(2)::before {
	content: "TOP";
	position: absolute;
	top: -10px;
	left: 22px;
	background: var( --csr-grad-cta, #f5a623 );
	color: #3a2a05;
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	padding: 3px 10px;
	border-radius: 99px;
	box-shadow: var( --csr-shadow-sm, 0 1px 3px rgba( 0, 0, 0, 0.2 ) );
}

.csr-col--rank { justify-self: center; }

.csr-rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	font-weight: 800;
	font-size: 1.05rem;
	color: var( --_text );
	background: var( --csr-color-zebra, #f1f3f5 );
	box-shadow: inset 0 0 0 2px rgba( 0, 0, 0, 0.05 );
}

.csr-row:nth-child(2) .csr-rank { background: linear-gradient( 180deg, #ffe07a, #f5c518 ); color: #5a4500; box-shadow: inset 0 0 0 2px rgba( 255, 255, 255, 0.6 ); }
.csr-row:nth-child(3) .csr-rank { background: linear-gradient( 180deg, #e7eaee, #c2c7cf ); color: #3b4049; }
.csr-row:nth-child(4) .csr-rank { background: linear-gradient( 180deg, #f0bd92, #d9925f ); color: #5a3214; }

.csr-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; font-weight: 600; }

.csr-brand__logo {
	flex: 0 0 auto;
	width: 88px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 12px;
	background: transparent;
}
.csr-brand__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.csr-brand__name { font-size: 1.05rem; font-weight: 700; }
.csr-brand:hover .csr-brand__name { color: var( --_accent ); }

.csr-bonus { font-weight: 600; line-height: 1.4; }
.csr-bonus--empty { color: var( --_muted ); font-weight: 400; }

.csr-col--score { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }

.csr-score-badge {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	min-width: 54px;
	padding: 7px 12px;
	font-weight: 800;
	font-size: 1.15rem;
	color: #fff;
	background: var( --csr-grad-score, #18a058 );
	border-radius: 10px;
	box-shadow: var( --csr-shadow-sm, 0 1px 3px rgba( 0, 0, 0, 0.15 ) );
}
.csr-score-badge::after { content: "/10"; font-size: 0.6em; font-weight: 600; opacity: 0.75; margin-left: 2px; }
.csr-score-badge--lg { font-size: 1.4rem; min-width: 64px; }
.csr-score-badge--xl { font-size: 2rem; min-width: 84px; padding: 12px 18px; border-radius: 14px; }

.csr-score-users { color: var( --_muted ); font-size: 0.72rem; }

.csr-col--cta { display: flex; flex-direction: column; gap: 7px; align-items: stretch; }

.csr-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 11px 18px;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: var( --csr-radius-btn, 10px );
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.csr-btn--primary {
	background: var( --csr-grad-cta, #f5a623 );
	color: var( --csr-color-cta-text, #1a1d21 );
	box-shadow: 0 6px 14px rgba( 245, 166, 35, 0.35 );
}
.csr-btn--primary::after { content: "→"; font-weight: 800; transition: transform 0.15s ease; }
.csr-btn--primary:hover { transform: translateY( -1px ); box-shadow: 0 10px 20px rgba( 245, 166, 35, 0.45 ); }
.csr-btn--primary:hover::after { transform: translateX( 3px ); }
.csr-btn--primary:active { transform: translateY( 0 ); }
.csr-btn--block { width: 100%; }
.csr-btn--lg { padding: 14px 26px; font-size: 1.05rem; }

.csr-link-review { text-align: center; font-size: 0.82rem; color: var( --_muted ); text-decoration: none; font-weight: 600; }
.csr-link-review:hover { color: var( --_accent ); }

.csr-empty { color: var( --_muted ); padding: 20px; text-align: center; background: var( --csr-color-zebra, #f8f9fa ); border-radius: var( --csr-radius, 14px ); }

/* ---- Compact box (inline in articles) ---- */
.csr-box { border: 1px solid var( --csr-color-border, #e6e8eb ); border-radius: var( --csr-radius, 14px ); padding: 18px; background: var( --csr-color-card, #fff ); max-width: 380px; box-shadow: var( --csr-shadow, 0 6px 18px rgba( 0, 0, 0, 0.08 ) ); }
.csr-box__head { display: flex; align-items: center; gap: 12px; }
.csr-box__logo { width: 72px; height: 44px; display: flex; align-items: center; }
.csr-box__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.csr-box__title { font-weight: 700; flex: 1; }
.csr-box__bonus { margin: 12px 0; font-weight: 600; }

/* ---- Spec list on a review ---- */
.csr-spec { margin: 0; border: 1px solid var( --csr-color-border, #e6e8eb ); border-radius: var( --csr-radius, 14px ); overflow: hidden; }
.csr-spec__row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 13px 18px; }
.csr-spec__row:nth-child(odd) { background: var( --csr-color-zebra, #f8f9fa ); }
.csr-spec__label { margin: 0; color: var( --csr-color-muted, #6b7280 ); }
.csr-spec__value { margin: 0; font-weight: 600; }

/* ---- Score breakdown ---- */
.csr-breakdown { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.csr-breakdown__overall { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.csr-breakdown__overall-label { font-size: 0.82rem; color: var( --csr-color-muted, #6b7280 ); }
.csr-breakdown__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.csr-breakdown__item { display: grid; grid-template-columns: 1fr 2fr auto; gap: 14px; align-items: center; }
.csr-breakdown__name { font-weight: 600; }
.csr-breakdown__bar { height: 10px; border-radius: 99px; background: var( --csr-color-zebra, #eef1f4 ); overflow: hidden; }
.csr-breakdown__fill { display: block; height: 100%; background: var( --csr-grad-score, #18a058 ); border-radius: 99px; }
.csr-breakdown__value { font-weight: 800; min-width: 30px; text-align: right; }

/* ---- Pros / cons ---- */
.csr-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.csr-proscons__col { border: 1px solid var( --csr-color-border, #e6e8eb ); border-radius: var( --csr-radius, 14px ); padding: 18px; }
.csr-proscons__col--pros { background: #f1fbf5; border-color: #c7ecd5; }
.csr-proscons__col--cons { background: #fdf3f3; border-color: #f3d3d3; }
.csr-proscons__title { margin: 0 0 12px; font-size: 1.1rem; }
.csr-proscons__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.csr-proscons__list li { position: relative; padding-left: 26px; }
.csr-proscons__col--pros li::before { content: "✓"; position: absolute; left: 0; color: var( --csr-color-accent, #18a058 ); font-weight: 800; }
.csr-proscons__col--cons li::before { content: "✕"; position: absolute; left: 0; color: var( --csr-color-danger, #e5484d ); font-weight: 800; }

/* ---- User rating ---- */
.csr-userrate { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.csr-userrate__stars { display: inline-flex; }
.csr-star { background: none; border: 0; padding: 0 2px; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var( --csr-color-star, #d0d4d9 ); transition: color 0.1s ease, transform 0.1s ease; }
.csr-star:hover { transform: scale( 1.12 ); }
.csr-star.is-active { color: var( --csr-color-star-active, #f5a623 ); }
.csr-userrate.is-voted .csr-star { cursor: default; }
.csr-userrate.is-voted .csr-star:hover { transform: none; }
.csr-userrate__summary { color: var( --csr-color-muted, #6b7280 ); }
.csr-userrate__avg { font-weight: 800; color: var( --csr-color-text, #1a1d21 ); }
.csr-userrate__msg { color: var( --csr-color-accent, #18a058 ); font-size: 0.85rem; font-weight: 600; }

/* ---- Responsive ---- */
@media ( max-width: 760px ) {
	.csr-table__head { display: none; }
	.csr-row {
		grid-template-columns: 44px 1fr;
		grid-template-areas:
			"rank brand"
			"bonus bonus"
			"score cta";
		row-gap: 12px;
		column-gap: 12px;
		padding: 16px;
	}
	.csr-col--rank { grid-area: rank; }
	.csr-col--brand { grid-area: brand; }
	.csr-col--bonus { grid-area: bonus; }
	.csr-col--score { grid-area: score; flex-direction: row; align-items: center; gap: 8px; }
	.csr-col--cta { grid-area: cta; }
	.csr-brand__logo { width: 72px; height: 46px; }
	.csr-breakdown { grid-template-columns: 1fr; gap: 18px; }
	.csr-proscons { grid-template-columns: 1fr; }
	.csr-spec__row { grid-template-columns: 1fr 1fr; }
}
