/**
 * "Casino Rating" block — "Notte Italiana" rail card. Loaded on the front
 * end (inc/enqueue.php) and inside the block editor iframe
 * (inc/casino-rating-block.php) so the canvas preview matches what visitors
 * see. Desktop anatomy, left to right: the rank as a full-height vertical
 * gold-on-dark rail, the logo plate, the body (name, bonus, pills), and the
 * two action buttons stacked vertically behind a subtle divider. Mobile
 * stacks everything. Markup is unchanged — this is pure CSS on the existing
 * rank/logo/body/actions children. No numeric rating is displayed anywhere.
 */
.ci-rating-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 22px;
	margin: 18px 0;
	background: var(--ci-bg-card, #20242e);
	border: 1px solid var(--ci-border-strong, rgba(255, 255, 255, 0.16));
	border-radius: var(--ci-radius-lg, 10px);
	box-shadow: var(--ci-shadow-card, 0 10px 28px rgba(0, 0, 0, 0.45));
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ci-rating-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--ci-accent-neon-cyan, #c9a24b), var(--ci-accent-neon-pink, #b93a4e));
}

.ci-rating-card--missing {
	padding: 24px;
	text-align: center;
	color: var(--ci-text-muted);
}

.ci-rating-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--ci-shadow-card-lg, 0 22px 52px rgba(0, 0, 0, 0.55));
	border-color: var(--ci-accent-gold, #c9a24b);
}

.ci-rating-card__rank {
	flex-shrink: 0;
	font-family: var(--ci-font-heading, 'Fraunces', Georgia, serif);
	font-weight: 700;
	font-size: 26px;
	line-height: 1;
	text-align: center;
	color: var(--ci-accent-gold, #c9a24b);
}

.ci-rating-card__logo {
	flex-shrink: 0;
	width: 84px;
	height: 84px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--ci-border, rgba(255, 255, 255, 0.08));
	border-radius: var(--ci-radius-md, 8px);
	overflow: hidden;
}
.ci-rating-card__logo img {
	max-width: 82%;
	max-height: 82%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ci-rating-card__body {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}

.ci-rating-card__name {
	font-size: 19px;
	margin-bottom: 6px;
	font-weight: 700;
}
.ci-rating-card__name a { color: inherit; text-decoration: none; }
.ci-rating-card__name a:hover { text-decoration: underline; }

.ci-rating-card__bonus {
	color: #e07688;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 10px;
}

.ci-rating-card__pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
.ci-pill {
	display: inline-block;
	padding: 5px 14px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ci-text-secondary, #b7bcc6);
	background: var(--ci-bg-darker, #1a1d26);
	border: 1px solid var(--ci-border, rgba(255, 255, 255, 0.08));
	border-radius: 999px;
	white-space: nowrap;
}

.ci-rating-card__actions {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}
.ci-rating-card__actions .ci-btn {
	width: 100%;
	text-align: center;
}
.ci-btn--ghost {
	background: transparent;
	border: 1px solid var(--ci-border-strong, rgba(255, 255, 255, 0.16));
	color: var(--ci-text-primary, #f1efe9);
}
.ci-btn--ghost:hover {
	border-color: var(--ci-accent-gold, #c9a24b);
	color: var(--ci-accent-gold-light, #dcbd74);
}

/* Editor-canvas-only tweaks: static preview markers (non-clickable CTA span). */
.ci-rating-card--editor-preview .ci-btn { pointer-events: none; }
.ci-rating-card-editor-empty {
	padding: 16px;
	margin: 0;
	font-style: italic;
	color: var(--ci-text-muted, #7e8494);
}

@media (min-width: 640px) {
	.ci-rating-card {
		flex-direction: row;
		align-items: stretch;
		text-align: left;
		gap: 0;
		padding: 0;
	}

	/* Full-height vertical rank rail: gold number on a darker strip. */
	.ci-rating-card__rank {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 56px;
		background: var(--ci-bg-darker, #1a1d26);
		border-right: 1px solid var(--ci-border, rgba(255, 255, 255, 0.08));
	}

	.ci-rating-card__logo { align-self: center; margin: 22px 0 22px 22px; }

	.ci-rating-card__body {
		align-self: center;
		text-align: left;
		padding: 22px 20px;
	}
	.ci-rating-card__pills { justify-content: flex-start; }

	/* Actions column: vertically stacked buttons behind a subtle divider. */
	.ci-rating-card__actions {
		width: auto;
		flex-direction: column;
		justify-content: center;
		align-self: stretch;
		padding: 20px 22px;
		border-left: 1px solid var(--ci-border, rgba(255, 255, 255, 0.08));
	}
	.ci-rating-card__actions .ci-btn { width: 100%; min-width: 150px; }
}

/*
 * Editor-only hover-delete affordance: a small "×" button that appears over
 * the top-right corner of a custom block's canvas preview on hover, so the
 * block can be removed without opening the toolbar's "..." menu. Has no
 * effect on the front end — these classes are only ever emitted by the
 * editor JS's edit() functions, never by the PHP render_callback output.
 */
.ci-block-hover-wrap {
	position: relative;
}
.ci-block-hover-delete.ci-block-hover-delete {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 5;
	width: 28px;
	height: 28px;
	min-width: 28px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	border-radius: 50%;
	opacity: 0;
	transform: scale(0.9);
	transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
	pointer-events: none;
}
.ci-block-hover-wrap:hover .ci-block-hover-delete.ci-block-hover-delete {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}
.ci-block-hover-delete.ci-block-hover-delete:hover {
	background: var(--ci-accent-red, #b93a4e);
}
