/**
 * DCC-i My Learning — Programme Journey
 * =====================================
 * Every selector is scoped under .dcci-ml so the Organisation Hub and
 * public pages cannot be affected.
 *
 * Identity: deep purple #3E1E67, pink #e91e63, Montserrat, rounded,
 * soft backgrounds, ND-friendly calm.
 */

.dcci-ml {
	--ml-purple: #3E1E67;
	--ml-purple-mid: #8d2f88;
	--ml-pink: #e91e63;
	--ml-ink: #3E1E67;
	--ml-muted: #6b6580;
	--ml-line: rgba(62, 30, 103, 0.12);
	--ml-soft: #faf7fd;
	--ml-green: #1e7a4d;

	max-width: 900px;
	margin: 0 auto;
	/* Top padding gives ~32px of breathing room between the portal
	   breadcrumb (rendered above by page-dcci-portal.php) and the banner.
	   Applied here rather than to .dcci-bc-wrap, which is shared across the
	   whole portal and must not shift on other pages. */
	padding: 40px 20px 64px;
	font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
	color: var(--ml-ink);
}

/* Certificates page: the banner morph leans ~60px above the banner box
   (see .dcci-ml-banner__morph top:-60px). The dashboard has clearance above,
   but here the banner is the first element, so add top room to stop the
   morph's head being clipped by the section top / portal header. */
.dcci-ml--certificates {
	padding-top: 92px;
}

.dcci-ml *:focus-visible {
	outline: 3px solid var(--ml-pink);
	outline-offset: 2px;
	border-radius: 6px;
}

.dcci-ml .dcci-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Banner (mirrors the Hub's "Your Next Session" card) ── */

.dcci-ml .dcci-ml-banner {
	position: relative;
	margin: 0 0 28px;
	padding: 26px 30px;
	border-radius: 24px;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(120deg, #3e1e67 0%, #6b2d8b 60%, #8d2f88 100%);
	box-shadow: 0 8px 36px rgba(62, 30, 103, 0.24);
}

.dcci-ml .dcci-ml-banner::before {
	content: '';
	position: absolute;
	top: -60px;
	right: -40px;
	width: 300px;
	height: 300px;
	border-radius: 42% 58% 66% 34% / 58% 42% 62% 38%;
	background: rgba(255, 255, 255, 0.045);
	pointer-events: none;
	z-index: 0;
}

/* Hub colour variants — same gradients as .dcci-ns-card--* on the Hub. */
.dcci-ml .dcci-ml-banner--pink       { background: linear-gradient(120deg,#6b003a 0%,#b5004e 55%,#e91e63 100%); }
.dcci-ml .dcci-ml-banner--green      { background: linear-gradient(120deg,#0b3d20 0%,#1a7a3c 55%,#27ae60 100%); }
.dcci-ml .dcci-ml-banner--blue       { background: linear-gradient(120deg,#0d2560 0%,#1e4db8 55%,#2e86c1 100%); }
.dcci-ml .dcci-ml-banner--teal       { background: linear-gradient(120deg,#054449 0%,#0a8585 55%,#0a9396 100%); }
.dcci-ml .dcci-ml-banner--orange     { background: linear-gradient(120deg,#5c2100 0%,#b84500 55%,#e05c00 100%); }
.dcci-ml .dcci-ml-banner--red        { background: linear-gradient(120deg,#4a0010 0%,#82003a 55%,#8a2387 100%); }
.dcci-ml .dcci-ml-banner--thurrock   { background: linear-gradient(120deg,#2e1a52 0%,#4e3a7a 55%,#6d5495 100%); }
.dcci-ml .dcci-ml-banner--dcc        { background: linear-gradient(120deg,#3a0e38 0%,#671f65 55%,#8d2f88 100%); }
.dcci-ml .dcci-ml-banner--nhs        { background: linear-gradient(120deg,#0d2d5e 0%,#164a96 55%,#1c5daf 100%); }
.dcci-ml .dcci-ml-banner--birmingham { background: linear-gradient(120deg,#3d0e3c 0%,#6e2070 55%,#8b2988 100%); }
.dcci-ml .dcci-ml-banner--medway     { background: linear-gradient(120deg,#1a6480 0%,#3a9bbf 55%,#70c6e4 100%); }
.dcci-ml .dcci-ml-banner--coventry   { background: linear-gradient(120deg,#001e5c 0%,#003899 55%,#0053be 100%); }

.dcci-ml .dcci-ml-banner__label {
	position: relative;
	z-index: 1;
	display: block;
	margin-bottom: 14px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	opacity: 0.65;
}

.dcci-ml .dcci-ml-banner__body {
	position: relative;
	z-index: 1;
}

.dcci-ml .dcci-ml-banner__title {
	margin: 0 0 4px;
	font-size: clamp(19px, 2vw, 26px);
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
	overflow-wrap: anywhere;
}

.dcci-ml .dcci-ml-banner__org {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.55;
	overflow-wrap: anywhere;
}

.dcci-ml .dcci-ml-banner__sub {
	margin: 0;
	max-width: 44ch;
	font-size: 13px;
	line-height: 1.6;
	opacity: 0.72;
}

/* Morph character — mirrors .dcci-ns-morph on the Hub. */
.dcci-ml .dcci-ml-banner--has-morph {
	overflow: visible;
	padding-right: 300px;
}

.dcci-ml .dcci-ml-banner__morph {
	position: absolute;
	right: -10px;
	bottom: 0;
	top: -60px;
	width: 300px;
	pointer-events: none;
	overflow: visible;
	z-index: 0;
}

.dcci-ml .dcci-ml-banner__blob {
	position: absolute;
	bottom: -40px;
	right: -40px;
	width: 360px;
	height: 360px;
	border-radius: 42% 58% 60% 40% / 45% 55% 45% 55%;
	background: rgba(255, 255, 255, 0.15);
	opacity: 0.18;
	pointer-events: none;
}

.dcci-ml .dcci-ml-banner__img {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 300px;
	height: auto;
	object-fit: contain;
	object-position: bottom right;
	display: block;
	filter: drop-shadow(-4px 0 18px rgba(0, 0, 0, 0.25));
}

/* ── Onboarding ─────────────────────────────────────────── */

/* Deliberately a slim horizontal strip, not a card: it is the least
   important thing on the page once a learner is underway. */
.dcci-ml .dcci-ml-onboard {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 0 0 24px;
	padding: 10px 44px 10px 16px;
	border: 1px solid var(--ml-line);
	border-radius: 12px;
	background: var(--ml-soft);
}

.dcci-ml .dcci-ml-onboard[hidden] {
	display: none;
}

.dcci-ml .dcci-ml-onboard__body {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	min-width: 0;
}

.dcci-ml .dcci-ml-onboard__title {
	margin: 0;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--ml-purple);
	white-space: nowrap;
}

.dcci-ml .dcci-ml-onboard__text {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.4;
	color: var(--ml-muted);
}

/* Returning learner: the strip sits below Continue learning and shrinks to
   a single quiet line — the guide is still there, but out of the way. */
.dcci-ml .dcci-ml-onboard--returning {
	margin: 0 0 28px;
	padding: 8px 40px 8px 14px;
	background: transparent;
	border-style: dashed;
}

.dcci-ml .dcci-ml-onboard--returning .dcci-ml-onboard__text {
	font-size: 0.75rem;
}

.dcci-ml .dcci-ml-onboard__meta {
	font-weight: 500;
	opacity: 0.8;
}

.dcci-ml .dcci-ml-onboard__dismiss {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 1.1rem;
	line-height: 1;
	color: var(--ml-muted);
	cursor: pointer;
}

.dcci-ml .dcci-ml-onboard__dismiss:hover {
	background: rgba(62, 30, 103, 0.08);
	color: var(--ml-purple);
}

/* ── Buttons ────────────────────────────────────────────── */

.dcci-ml .dcci-ml-btn {
	display: inline-block;
	padding: 13px 30px;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dcci-ml .dcci-ml-btn--primary {
	background: var(--ml-pink);
	color: #fff !important;
	box-shadow: 0 3px 12px rgba(233, 30, 99, 0.28);
}

.dcci-ml .dcci-ml-btn--primary:hover {
	background: #c2185b;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(233, 30, 99, 0.32);
}

.dcci-ml .dcci-ml-btn--ghost {
	padding: 9px 18px;
	border: 1px solid var(--ml-line);
	background: #fff;
	color: var(--ml-purple-mid) !important;
	font-size: 0.82rem;
}

.dcci-ml .dcci-ml-btn--ghost:hover {
	background: #fff;
	border-color: rgba(62, 30, 103, 0.28);
}

/* ── Continue learning — the one dominant action ────────── */

.dcci-ml .dcci-ml-continue {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	flex-wrap: wrap;
	margin: 0 0 40px;
	padding: 26px 28px;
	border: 1px solid rgba(62, 30, 103, 0.14);
	border-radius: 20px;
	background: linear-gradient(180deg, #fdf6ff 0%, #f4ecfb 100%);
	box-shadow: 0 4px 18px rgba(62, 30, 103, 0.07);
}

.dcci-ml .dcci-ml-continue__body {
	flex: 1 1 260px;
	min-width: 0;
}

.dcci-ml .dcci-ml-continue__eyebrow {
	margin: 0 0 4px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ml-purple-mid);
}

.dcci-ml .dcci-ml-continue__title {
	margin: 0 0 3px;
	font-size: 1.22rem;
	font-weight: 800;
	line-height: 1.3;
	color: var(--ml-purple);
	overflow-wrap: anywhere;
}

/* Organisation name — smaller context label beneath the package title. */
.dcci-ml .dcci-ml-continue__org {
	margin: 0 0 10px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ml-muted);
	overflow-wrap: anywhere;
}

.dcci-ml .dcci-ml-continue__next {
	margin: 0 0 12px;
	font-size: 0.85rem;
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-continue__next strong {
	color: var(--ml-purple);
}

.dcci-ml .dcci-ml-continue__counter {
	margin: 6px 0 0;
	font-size: 0.76rem;
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-continue__home {
	display: inline-block;
	margin: 14px 0 0;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ml-purple-mid);
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.dcci-ml .dcci-ml-continue__home-arrow {
	text-decoration: none;
	display: inline-block;
}

.dcci-ml .dcci-ml-continue__home:hover {
	color: var(--ml-purple);
}

.dcci-ml .dcci-ml-continue__action {
	flex-shrink: 0;
}

.dcci-ml .dcci-ml-continue--done {
	background: #f3faf6;
	border-color: rgba(30, 122, 77, 0.18);
}

.dcci-ml .dcci-ml-continue--done .dcci-ml-continue__eyebrow {
	color: var(--ml-green);
}

.dcci-ml .dcci-ml-continue__meta {
	margin: 0;
	max-width: 52ch;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--ml-muted);
}

/* ── Progress bar ───────────────────────────────────────── */

.dcci-ml .dcci-ml-bar {
	height: 8px;
	/* Spans the text column rather than an arbitrary 340px, so it reads as
	   part of the card's left column instead of a stub floating in it. */
	width: 100%;
	border-radius: 999px;
	background: rgba(62, 30, 103, 0.12);
	overflow: hidden;
}

.dcci-ml .dcci-ml-bar__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--ml-purple-mid);
	transition: width 0.4s ease;
}

/* ── Programme journey ──────────────────────────────────── */

.dcci-ml .dcci-ml-prog {
	margin: 0 0 40px;
}

.dcci-ml .dcci-ml-prog__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--ml-line);
}

.dcci-ml .dcci-ml-prog__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--ml-purple);
}

.dcci-ml .dcci-ml-prog__hub {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ml-purple-mid);
	text-decoration: none;
}

.dcci-ml .dcci-ml-prog__hub:hover {
	text-decoration: underline;
}

.dcci-ml .dcci-ml-journey {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dcci-ml .dcci-ml-step {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid rgba(62, 30, 103, 0.07);
}

.dcci-ml .dcci-ml-step:last-child {
	border-bottom: 0;
}

.dcci-ml .dcci-ml-step__mark {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin-top: 1px;
	border-radius: 50%;
	background: rgba(62, 30, 103, 0.08);
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-step--complete .dcci-ml-step__mark {
	background: rgba(30, 122, 77, 0.14);
	color: var(--ml-green);
}

.dcci-ml .dcci-ml-step--in-progress .dcci-ml-step__mark {
	background: rgba(233, 30, 99, 0.14);
	color: var(--ml-pink);
}

.dcci-ml .dcci-ml-step__body {
	flex: 1 1 auto;
	min-width: 0;
}

.dcci-ml .dcci-ml-step__title {
	margin: 0 0 3px;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--ml-purple);
	overflow-wrap: anywhere;
}

.dcci-ml .dcci-ml-step--locked .dcci-ml-step__title {
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-step__status {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-step--in-progress .dcci-ml-step__status {
	color: var(--ml-pink);
}

.dcci-ml .dcci-ml-step--complete .dcci-ml-step__status {
	color: var(--ml-green);
}

.dcci-ml .dcci-ml-step__prog {
	margin: 4px 0 0;
	font-size: 0.75rem;
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-step__end {
	flex-shrink: 0;
	padding-top: 2px;
}

.dcci-ml .dcci-ml-step__action {
	display: inline-block;
	padding: 8px 18px;
	border: 1px solid var(--ml-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ml-purple-mid);
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.dcci-ml .dcci-ml-step__action:hover {
	background: var(--ml-soft);
	border-color: rgba(62, 30, 103, 0.28);
}

/* ── Learning record ────────────────────────────────────── */

.dcci-ml .dcci-ml-rec {
	margin: 0;
	padding: 22px 24px;
	border: 1px solid var(--ml-line);
	border-radius: 18px;
	background: #fff;
}

.dcci-ml .dcci-ml-rec__title {
	margin: 0 0 4px;
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--ml-purple);
}

.dcci-ml .dcci-ml-rec__intro {
	margin: 0 0 14px;
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--ml-muted);
}

.dcci-ml .dcci-ml-rec__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dcci-ml .dcci-ml-rec__item {
	margin: 0;
}

.dcci-ml .dcci-ml-rec__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--ml-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--ml-purple-mid);
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.dcci-ml .dcci-ml-rec__link {
	background: var(--ml-soft);
}

.dcci-ml .dcci-ml-rec__link:hover {
	background: #f3ecfa;
	border-color: rgba(62, 30, 103, 0.28);
}

.dcci-ml .dcci-ml-rec__arrow {
	transition: transform 0.2s ease;
}

.dcci-ml .dcci-ml-rec__link:hover .dcci-ml-rec__arrow {
	transform: translateX(3px);
}

/* Disabled "Coming soon" variant — used for the Certificates button when a
   Bronze learner's booking plugin is off. Same chip shape, not clickable. */
.dcci-ml .dcci-ml-rec__link--soon {
	cursor: default;
	opacity: 0.7;
	color: var(--ml-purple-mid);
}
.dcci-ml .dcci-ml-rec__link--soon:hover {
	background: var(--ml-soft);
	border-color: var(--ml-line);
}
.dcci-ml .dcci-ml-rec__soon {
	font-size: 0.66rem;
	font-weight: 800;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: #fff;
	background: #b08d57;
	padding: 2px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1024px) {
	.dcci-ml {
		max-width: 100%;
	}
}

@media (max-width: 768px) {
	.dcci-ml {
		padding: 8px 16px 48px;
	}

	/* Morph would crowd the text below tablet: drop it and reclaim the
	   reserved right-hand padding. */
	.dcci-ml .dcci-ml-banner--has-morph {
		padding-right: 30px;
		overflow: hidden;
	}

	.dcci-ml .dcci-ml-banner__morph {
		display: none;
	}

	.dcci-ml .dcci-ml-continue {
		gap: 20px;
		padding: 22px;
	}
}

@media (max-width: 600px) {
	.dcci-ml .dcci-ml-banner {
		padding: 22px 18px;
	}

	.dcci-ml .dcci-ml-banner--has-morph {
		padding-right: 18px;
	}

	.dcci-ml .dcci-ml-continue__action,
	.dcci-ml .dcci-ml-btn--primary {
		width: 100%;
		text-align: center;
	}

	/* Vertical journey: action drops below the text, full width. */
	.dcci-ml .dcci-ml-step {
		flex-wrap: wrap;
	}

	.dcci-ml .dcci-ml-step__end {
		flex-basis: 100%;
		padding-left: 42px;
		padding-top: 10px;
	}

	.dcci-ml .dcci-ml-step__action {
		display: block;
		text-align: center;
	}

	.dcci-ml .dcci-ml-rec__list {
		flex-direction: column;
	}

	.dcci-ml .dcci-ml-rec__link {
		justify-content: space-between;
	}
}

/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
	.dcci-ml *,
	.dcci-ml *::before,
	.dcci-ml *::after {
		transition: none !important;
		animation: none !important;
	}

	.dcci-ml .dcci-ml-btn--primary:hover {
		transform: none;
	}

	.dcci-ml .dcci-ml-rec__link:hover .dcci-ml-rec__arrow {
		transform: none;
	}
}