/* ── Container ────────────────────────────────────────────────────────────── */
.sva-prio-container {
	width: 100%;
}

/* Horizontal: up to 3 columns, max 300 px each, flex-wrap */
.sva-prio-horizontal {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: stretch;
	justify-content: center;
}

.sva-prio-horizontal .sva-prio-tile {
	/* Fixed 300px basis — tiles center naturally regardless of count */
	flex: 0 1 300px;
	box-sizing: border-box;
}

/* Vertical: single stacked column, centered */
.sva-prio-vertical {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}

.sva-prio-vertical .sva-prio-tile {
	width: 100%;
	max-width: 960px;
	box-sizing: border-box;
}

/* ── Tile ─────────────────────────────────────────────────────────────────── */
.sva-prio-tile {
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	background-color: transparent;
	border: 1px solid rgba(128, 128, 128, 0.3);
	border-radius: 6px;
	padding: 20px;
	box-sizing: border-box;
}

.sva-prio-title {
	margin-top: 0;
	font-weight: 700;
	color: inherit;
}

.sva-prio-excerpt {
	color: inherit;
	margin-bottom: 12px;
}

.sva-prio-readmore {
	display: inline-block;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* ── Dialog overlay ───────────────────────────────────────────────────────── */
.sva-prio-dialog-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.sva-prio-dialog-overlay[hidden] {
	display: none;
}

/* ── Dialog ───────────────────────────────────────────────────────────────── */
.sva-prio-dialog {
	position: relative;
	/* Use Gutenberg/theme CSS custom property with sane fallback */
	background-color: var(--wp--preset--color--background,
	                  var(--wp--preset--color--base,
	                  var(--background-color, #ffffff)));
	color: inherit;
	border-radius: 8px;
	max-width: 800px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
}

.sva-prio-dialog-body {
	padding: 48px 40px 40px;
}

.sva-prio-dialog-title {
	margin-top: 0;
	color: inherit;
	font-weight: 700;
}

.sva-prio-dialog-content {
	color: inherit;
}

.sva-prio-dialog-content img {
	max-width: 100%;
	height: auto;
}

/* ── Close button ─────────────────────────────────────────────────────────── */
.sva-prio-dialog-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 0;
	border-radius: 4px;
	transition: background 0.15s;
}

.sva-prio-dialog-close:hover {
	background: rgba(128, 128, 128, 0.15);
}

/* Prevent body scroll while dialog is open */
body.sva-dialog-open {
	overflow: hidden;
}
