/* Moduli landing strutturati: riepilogo corso e competenze. Il colore del testo è quello della pagina. */
.jm-ls {
	--jm-ls-accent: #ae708c;
	--jm-ls-line: rgba(28, 36, 48, 0.16);
	--jm-ls-card: rgba(255, 255, 255, 0.72);
	box-sizing: border-box;
	container-type: inline-size;
	container-name: jmls;
	width: 100%;
	max-width: 100%;
	margin: 0 0 28px;
	color: inherit;
	font-size: 16px;
	line-height: 1.45;
}
.jm-ls *,
.jm-ls *::before,
.jm-ls *::after { box-sizing: border-box; }
.jm-ls-title {
	margin: 0 0 16px;
	font-size: 1.35rem;
	line-height: 1.3;
	font-weight: 700;
	color: inherit;
}
.jm-ls-title--clip {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.jm-ls-note {
	margin: 16px 0 0;
	font-size: 0.95rem;
	line-height: 1.45;
	max-width: 75ch;
}
.jm-ls-items,
.jm-ls-sections,
.jm-ls-points {
	list-style: none;
	margin: 0;
	padding: 0;
}
.jm-ls-bubble {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	color: var(--jm-ls-accent);
}
.jm-ls-ico { display: block; }
.jm-ls-label,
.jm-ls-section-title,
.jm-ls-point-title { font-weight: 700; }
.jm-ls-value,
.jm-ls-point-desc,
.jm-ls-label,
.jm-ls-point-title,
.jm-ls-section-title span {
	overflow-wrap: anywhere;
	word-wrap: break-word;
	min-width: 0;
}

/* Schede */
.jm-ls-layout-cards .jm-ls-items {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.jm-ls-layout-cards .jm-ls-item,
.jm-ls-layout-circles.jm-ls-type-summary .jm-ls-item,
.jm-ls-layout-columns .jm-ls-section,
.jm-ls-layout-circles.jm-ls-type-value .jm-ls-section,
.jm-ls-layout-linear .jm-ls-section,
.jm-ls-layout-radial .jm-ls-section {
	min-width: 0;
	height: auto;
}
.jm-ls-layout-cards .jm-ls-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 14px 16px;
	border: 1px solid var(--jm-ls-line);
	border-radius: 14px;
	background: var(--jm-ls-card);
}
.jm-ls-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jm-ls-label { font-size: 0.82rem; letter-spacing: 0.01em; }
.jm-ls-value { font-size: 1rem; }

/* Fascia compatta */
.jm-ls-layout-inline .jm-ls-items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 0;
}
.jm-ls-layout-inline .jm-ls-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 6px 16px;
	min-width: 0;
	max-width: 100%;
}
.jm-ls-layout-inline .jm-ls-item + .jm-ls-item {
	border-left: 1px solid var(--jm-ls-line);
}

/* Cerchi riepilogo: icona nel cerchio, testo fuori */
.jm-ls-layout-circles.jm-ls-type-summary .jm-ls-items {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px 16px;
}
.jm-ls-layout-circles .jm-ls-item,
.jm-ls-layout-circles .jm-ls-section {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 10px 12px;
	align-items: start;
}
.jm-ls-layout-circles .jm-ls-bubble,
.jm-ls-layout-radial .jm-ls-bubble,
.jm-ls-layout-columns .jm-ls-bubble,
.jm-ls-layout-linear .jm-ls-bubble {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1.5px solid var(--jm-ls-accent);
	background: transparent;
}
.jm-ls-density-compact .jm-ls-bubble {
	width: 40px;
	height: 40px;
}
.jm-ls-density-compact.jm-ls-layout-cards .jm-ls-item { padding: 10px 12px; }
.jm-ls-density-compact { font-size: 15px; }
.jm-ls-density-compact .jm-ls-items,
.jm-ls-density-compact .jm-ls-sections { gap: 12px; }

/* Tre sezioni */
.jm-ls-layout-columns .jm-ls-sections {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}
.jm-ls-layout-columns .jm-ls-section,
.jm-ls-layout-linear .jm-ls-section,
.jm-ls-layout-radial .jm-ls-section,
.jm-ls-layout-circles.jm-ls-type-value .jm-ls-section {
	padding: 14px 14px 16px;
	border: 1px solid var(--jm-ls-line);
	border-radius: 14px;
	background: var(--jm-ls-card);
}
.jm-ls-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 1.05rem;
	line-height: 1.35;
}
.jm-ls-points { display: flex; flex-direction: column; gap: 10px; }
.jm-ls-points li { display: flex; flex-direction: column; gap: 2px; }
.jm-ls-point-title { font-size: 0.98rem; }
.jm-ls-point-desc { font-size: 0.92rem; line-height: 1.4; }

/* Percorso lineare: linea decorativa, freccia solo se «direzione di lettura» */
.jm-ls-layout-linear .jm-ls-sections {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
	position: relative;
}
.jm-ls-layout-linear .jm-ls-sections::before {
	content: "";
	position: absolute;
	left: 8%;
	right: 8%;
	top: 40px;
	border-top: 2px solid var(--jm-ls-line);
	z-index: 0;
}
.jm-ls-layout-linear .jm-ls-section { position: relative; z-index: 1; background: var(--jm-ls-card); }
.jm-ls-connector-reading.jm-ls-layout-linear .jm-ls-section:not(:last-child) .jm-ls-section-title::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-left: auto;
	border-right: 2px solid var(--jm-ls-accent);
	border-bottom: 2px solid var(--jm-ls-accent);
	transform: rotate(-45deg);
	flex: 0 0 auto;
}

/* Mappa radiale: pannelli leggibili, centro decorativo */
.jm-ls-layout-radial { position: relative; }
.jm-ls-radial-center {
	width: 132px;
	height: 132px;
	margin: 0 auto 16px;
	border-radius: 50%;
	border: 1.5px solid var(--jm-ls-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 12px;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.3;
	color: var(--jm-ls-accent);
}
.jm-ls-layout-radial .jm-ls-sections {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

@container jmls (max-width: 959px) {
	.jm-ls-layout-cards .jm-ls-items,
	.jm-ls-layout-circles.jm-ls-type-summary .jm-ls-items,
	.jm-ls-layout-columns .jm-ls-sections,
	.jm-ls-layout-linear .jm-ls-sections,
	.jm-ls-layout-radial .jm-ls-sections,
	.jm-ls-layout-circles.jm-ls-type-value .jm-ls-sections {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.jm-ls-layout-linear .jm-ls-sections::before { display: none; }
	.jm-ls-layout-linear .jm-ls-section { border-left: 3px solid var(--jm-ls-line); }
	.jm-ls-connector-reading.jm-ls-layout-linear .jm-ls-section:not(:last-child) .jm-ls-section-title::after {
		transform: rotate(45deg);
	}
	.jm-ls-layout-inline .jm-ls-items { flex-direction: column; }
	.jm-ls-layout-inline .jm-ls-item { padding: 8px 0; }
	.jm-ls-layout-inline .jm-ls-item + .jm-ls-item {
		border-left: 0;
		border-top: 1px solid var(--jm-ls-line);
	}
	.jm-ls-radial-center { width: 96px; height: 96px; }
}
@container jmls (max-width: 640px) {
	.jm-ls-layout-cards .jm-ls-items,
	.jm-ls-layout-circles.jm-ls-type-summary .jm-ls-items,
	.jm-ls-layout-columns .jm-ls-sections,
	.jm-ls-layout-linear .jm-ls-sections,
	.jm-ls-layout-radial .jm-ls-sections,
	.jm-ls-layout-circles.jm-ls-type-value .jm-ls-sections {
		grid-template-columns: minmax(0, 1fr);
	}
	.jm-ls-layout-circles .jm-ls-item,
	.jm-ls-layout-circles .jm-ls-section {
		grid-template-columns: auto minmax(0, 1fr);
	}
}
@media (max-width: 640px) {
	.jm-ls-layout-cards .jm-ls-items,
	.jm-ls-layout-columns .jm-ls-sections,
	.jm-ls-layout-linear .jm-ls-sections,
	.jm-ls-layout-radial .jm-ls-sections {
		grid-template-columns: minmax(0, 1fr);
	}
	.jm-ls-layout-inline .jm-ls-items { flex-direction: column; }
	.jm-ls-layout-inline .jm-ls-item + .jm-ls-item { border-left: 0; }
	.jm-ls-layout-linear .jm-ls-sections::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.jm-ls, .jm-ls * { transition: none !important; animation: none !important; }
}

/* Blocco in editor: stesso titolo degli altri moduli */
#modal-landingpage-classe .lp-ls-block {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 8px 12px 12px;
	margin: 0 0 16px;
}
#modal-landingpage-classe .lp-ls-block .lp-ls-editor-name {
	flex: 1;
	min-width: 0;
	color: #212529;
}

/* Editor: miniature e anteprima */
.lp-ls-tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.lp-ls-tab {
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #0f172a;
	border-radius: 999px;
	padding: 6px 12px;
	cursor: pointer;
	font-weight: 700;
}
.lp-ls-tab[aria-selected="true"] {
	border-color: #0f172a;
	box-shadow: inset 0 0 0 1px #0f172a;
}
.lp-ls-tab:focus-visible,
.lp-ls-layout:focus-visible,
.lp-ls-icon:focus-visible,
.lp-ls-mini-btn:focus-visible {
	outline: 2px solid #0f172a;
	outline-offset: 2px;
}
.lp-ls-row { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
#lp_struct_body .lp-ls-card label {
	display: block;
	margin: 14px 0 4px;
	font-size: 13px;
	font-weight: 700;
	color: #1c2430;
}
#lp_struct_body .lp-ls-card label.lp-ls-row {
	display: flex;
	font-weight: 500;
	margin: 8px 0;
}
#lp_struct_body .lp-ls-card input[type="text"],
#lp_struct_body .lp-ls-card textarea,
#lp_struct_body .lp-ls-card select {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 10px;
	font: inherit;
	color: #0f172a;
	background: #fff;
}
#lp_struct_body .lp-ls-voice { background: #fff; }
.lp-ls-row input[type="text"],
.lp-ls-row textarea,
.lp-ls-block input[type="text"],
.lp-ls-block textarea {
	width: 100%;
	max-width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 10px;
	font: inherit;
	color: #0f172a;
	background: #fff;
}
.lp-ls-card {
	background: #fff;
	color: #1c2430;
	border-radius: 12px;
	padding: 14px;
}
.lp-ls-item {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px;
	margin: 0 0 10px;
	background: #f8fafc;
}
.lp-ls-meta { font-size: 12px; color: #475569; margin: 4px 0; }
.lp-ls-miss { color: #9a3412; font-size: 12px; font-weight: 700; }
.lp-ls-layouts { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-ls-layout {
	width: 132px;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #fff;
	color: #0f172a;
	padding: 8px;
	cursor: pointer;
	text-align: left;
}
.lp-ls-layout[aria-pressed="true"] {
	border-color: #0f172a;
	box-shadow: inset 0 0 0 1px #0f172a;
}
.lp-ls-thumb {
	height: 46px;
	border-radius: 8px;
	background:
		linear-gradient(#e2e8f0, #e2e8f0) 8px 10px / 18px 26px no-repeat,
		linear-gradient(#e2e8f0, #e2e8f0) 32px 10px / 18px 26px no-repeat,
		linear-gradient(#e2e8f0, #e2e8f0) 56px 10px / 18px 26px no-repeat,
		#f8fafc;
	margin-bottom: 6px;
}
.lp-ls-thumb-inline {
	background: linear-gradient(#94a3b8, #94a3b8) 8px 22px / 100px 3px no-repeat, #f8fafc;
}
.lp-ls-thumb-circles {
	background:
		radial-gradient(circle at 16px 22px, #ae708c 0 8px, transparent 9px),
		radial-gradient(circle at 40px 22px, #ae708c 0 8px, transparent 9px),
		radial-gradient(circle at 64px 22px, #ae708c 0 8px, transparent 9px),
		#f8fafc;
}
.lp-ls-thumb-linear {
	background: linear-gradient(#94a3b8, #94a3b8) 14px 22px / 88px 2px no-repeat, #f8fafc;
}
.lp-ls-thumb-radial {
	background: radial-gradient(circle at 58px 24px, transparent 0 16px, #ae708c 17px 18px, transparent 19px), #f8fafc;
}
.lp-ls-preview-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 12px; }
.lp-ls-preview {
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	padding: 10px;
	background: #fff;
	color: #1c2430;
	overflow: auto;
	max-width: 100%;
}
.lp-ls-preview-wide { min-width: 0; }
.lp-ls-preview-narrow { width: 280px; max-width: 100%; }
.lp-ls-preview-narrow .jm-ls { width: 260px; }
.lp-ls-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.lp-ls-icon {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	background: #fff;
	cursor: pointer;
	color: #ae708c;
}
.lp-ls-icon[aria-pressed="true"] { border-color: #0f172a; box-shadow: inset 0 0 0 1px #0f172a; }
.lp-ls-count { font-size: 12px; color: #64748b; }
.lp-ls-warn {
	background: #fff7ed;
	color: #9a3412;
	border-radius: 8px;
	padding: 8px 10px;
	margin: 0 0 8px;
	font-size: 13px;
}
.lp-modulo-block .jm-ls { margin-bottom: 0; }
.jm-ls-why { margin: 0 0 16px; max-width: 70ch; font-size: 1.05rem; line-height: 1.45; }
.jm-ls-highlights { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.jm-ls-essentials { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--jm-ls-accent, #ae708c); background: rgba(174, 112, 140, 0.08); }
.jm-ls-kind { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: #5c6778; }
.jm-ls-point-meta { display: block; font-size: 0.92rem; }
.jm-ls-more { margin-top: 14px; }
.jm-ls-more > summary { cursor: pointer; font-weight: 700; }
.jm-ls-more > summary:focus-visible { outline: 2px solid #0f172a; outline-offset: 2px; }
.jm-ls-draft { outline: 1px dashed #c4a06a; border-radius: 8px; padding: 4px; }
.jm-ls-points li { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 800px) {
	.lp-ls-preview-wrap { grid-template-columns: minmax(0, 1fr); }
	.lp-ls-preview-narrow, .lp-ls-preview-narrow .jm-ls { width: 100%; }
}
