/**
 * Shared design system for the guide plugin's public-facing surfaces (the
 * single guide page, the guide archive, the Related Guides block) --
 * deliberately the same tokens/treatments as the admin app's own design
 * system (src/admin.css), just scoped under `.imotions-public` instead of
 * `.imotions-guide-admin`, so a guide's public page and its editor feel like
 * one product.
 */

.imotions-public {
	--iguide-orange: #fc8902;
	--iguide-navy: #041c38;
	--iguide-violet: #7c5cfc;
	--iguide-pink: #f45d8c;
	--iguide-gradient: linear-gradient(135deg, var(--iguide-orange) 0%, var(--iguide-pink) 55%, var(--iguide-violet) 100%);
	--iguide-gradient-soft: linear-gradient(135deg, rgba(252, 137, 2, 0.1) 0%, rgba(244, 93, 140, 0.08) 55%, rgba(124, 92, 252, 0.1) 100%);
	--iguide-surface: #ffffff;
	--iguide-border: #e2e3ee;
	--iguide-border-soft: #edeef6;
	--iguide-text: #1a1f36;
	--iguide-text-muted: #6b7086;
	--iguide-radius-lg: 16px;
	--iguide-radius-md: 12px;
	--iguide-radius-sm: 8px;
	--iguide-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
	--iguide-shadow-md: 0 4px 12px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
	--iguide-shadow-lg: 0 16px 36px -12px rgba(16, 24, 40, 0.18), 0 4px 8px -4px rgba(16, 24, 40, 0.06);

	color: var(--iguide-text);
}

.imotions-public * {
	box-sizing: border-box;
}

/* ---------- Kicker (small gradient-dot eyebrow label) ---------- */

.imotions-public-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--iguide-text-muted);
	margin-bottom: 12px;
}

.imotions-public-kicker::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--iguide-gradient);
	flex-shrink: 0;
}

/* ---------- Single guide page ---------- */

.imotions-guide-single-summary {
	font-size: 1.15rem;
	color: var(--iguide-text-muted);
	margin: 0 0 2.5em;
	max-width: 62ch;
}

.imotions-guide-scene-outline {
	position: relative;
	display: flex;
	gap: 18px;
	margin-bottom: 20px;
	padding: 22px 24px;
	background: var(--iguide-surface);
	border: 1px solid var(--iguide-border-soft);
	border-radius: var(--iguide-radius-lg);
	box-shadow: var(--iguide-shadow-sm);
	scroll-margin-top: 24px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Arriving via a #scene-slug deep link should visibly call the section out. */
.imotions-guide-scene-outline:target {
	border-color: transparent;
	box-shadow: var(--iguide-shadow-lg), 0 0 0 2px var(--iguide-violet);
}

.imotions-guide-scene-badge {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--iguide-gradient);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.imotions-guide-scene-outline h2 {
	font-size: 1.3rem;
	margin: 0 0 0.4em;
	color: var(--iguide-text);
}

.imotions-guide-scene-outline > .imotions-guide-scene-body {
	flex: 1;
	min-width: 0;
}

.imotions-guide-scene-outline p {
	color: var(--iguide-text-muted);
}

.imotions-guide-scene-outline ul {
	margin: 0.9em 0 0;
	padding-left: 0;
	list-style: none;
}

.imotions-guide-scene-outline li {
	position: relative;
	margin-bottom: 0.7em;
	padding-left: 20px;
}

.imotions-guide-scene-outline li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--iguide-gradient);
}

.imotions-guide-interactive {
	margin-bottom: 3em;
}

.imotions-guide-interactive .imotions-public-kicker {
	margin-bottom: 14px;
}

/* The player already draws its own rounded/shadowed frame (.imotions-player-frame,
see src/block/style.css) -- no extra border/shadow wrapper needed here, or it
reads as two nested boxes. */

.imotions-guide-steps-kicker {
	margin-bottom: 18px;
}

/* ---------- Shared card grid (archive + Related Guides) ---------- */

.imotions-public-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.imotions-public-card {
	position: relative;
	display: block;
	padding: 20px;
	background: var(--iguide-surface);
	border: 1px solid var(--iguide-border-soft);
	border-radius: var(--iguide-radius-md);
	box-shadow: var(--iguide-shadow-sm);
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.imotions-public-card::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--iguide-gradient);
	opacity: 0;
	transition: opacity 0.15s ease;
}

.imotions-public-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--iguide-shadow-lg);
	border-color: transparent;
}

.imotions-public-card:hover::before {
	opacity: 1;
}

.imotions-public-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--iguide-text);
	margin-bottom: 6px;
}

.imotions-public-card-summary {
	font-size: 0.9rem;
	color: var(--iguide-text-muted);
	margin: 0;
}

/* Product/modality tagging -- a guide can carry several modality terms, so
this wraps and the row grows downward rather than overflowing the card;
TermBadges.js/render_term_badges() additionally cap the raw count with a
"+N" indicator so an unusually-tagged guide can't blow out the row at all. */
.imotions-public-badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 12px;
}

.imotions-public-badge {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 999px;
	white-space: nowrap;
}

.imotions-public-badge--product {
	background: var(--iguide-gradient-soft);
	color: var(--iguide-violet);
}

.imotions-public-badge--modality {
	background: #f7f7fb;
	color: var(--iguide-text-muted);
	border: 1px solid var(--iguide-border);
}

.imotions-public-badge--more {
	color: var(--iguide-text-muted);
	background: transparent;
}

.imotions-public-see-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 20px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	color: var(--iguide-violet);
	transition: gap 0.15s ease, color 0.15s ease;
}

.imotions-public-see-all:hover {
	gap: 10px;
	color: var(--iguide-pink);
}

.imotions-public-empty {
	text-align: center;
	padding: 56px 24px;
	color: var(--iguide-text-muted);
}

/* ---------- Archive filter bar ---------- */

.imotions-guide-archive-filters {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

.imotions-guide-archive-search,
.imotions-guide-archive-filters select {
	padding: 10px 14px;
	border: 1px solid var(--iguide-border);
	border-radius: var(--iguide-radius-sm);
	background: var(--iguide-surface);
	font-size: 0.95rem;
	color: var(--iguide-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.imotions-guide-archive-search {
	flex: 2 1 240px;
}

.imotions-guide-archive-filters select {
	flex: 1 1 170px;
}

.imotions-guide-archive-search:focus,
.imotions-guide-archive-filters select:focus {
	outline: none;
	border-color: var(--iguide-orange);
	box-shadow: 0 0 0 3px rgba(252, 137, 2, 0.15);
}

/* ---------- Related Guides ---------- */

.imotions-related-guides {
	margin: 3em 0 1em;
}
