/**
 * NuroSparx LMS — student-facing design system.
 *
 * Loaded on every plugin screen (catalog, course, cart, checkout, dashboard,
 * player). Anything used by two screens lives here; a class defined in one
 * screen's sheet and used on another silently loses its styling, which is
 * the bug the admin split produced three times.
 *
 * Everything is scoped under `.nslms-app` and starts from a local reset,
 * because the active theme styles bare `button`, `h1`, `a` and `input` and
 * the plugin must look the same on any theme.
 *
 * One accent (--nsf-accent). Amber is reserved for rating stars and green for
 * "completed" — both are data states, not UI accents.
 */

/* ------------------------------------------------------------------ tokens */

.nslms-app {
	--nsf-accent: #e5092f;
	--nsf-accent-hover: #c8072a;
	--nsf-accent-soft: #fdecef;
	--nsf-accent-ring: rgba(229, 9, 47, .22);
	--nsf-ink: #151c2f;
	--nsf-ink-2: #1f2a45;
	--nsf-text: #374151;
	--nsf-muted: #6b7280;
	--nsf-faint: #9ca3af;
	--nsf-line: #e5e7eb;
	--nsf-line-soft: #f0f1f4;
	--nsf-bg: #f7f8fb;
	--nsf-surface: #fff;
	--nsf-ok: #15803d;
	--nsf-ok-soft: #e9f7ee;
	--nsf-star: #e59819;
	--nsf-warn-soft: #fff7e6;
	--nsf-radius: 14px;
	--nsf-radius-md: 10px;
	--nsf-radius-sm: 8px;
	--nsf-control: 44px;
	--nsf-control-sm: 36px;
	--nsf-shadow-sm: 0 1px 2px rgba(21, 28, 47, .06);
	--nsf-shadow: 0 1px 2px rgba(21, 28, 47, .05), 0 6px 20px rgba(21, 28, 47, .06);
	--nsf-shadow-lg: 0 12px 40px rgba(21, 28, 47, .16);
	--nsf-ease: cubic-bezier(.2, .8, .2, 1);

	color: var(--nsf-text);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------- reset */

.nslms-app *,
.nslms-app *::before,
.nslms-app *::after {
	box-sizing: border-box;
}

.nslms-app :where(h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd) {
	margin: 0;
	padding: 0;
}

.nslms-app :where(ul, ol) {
	list-style: none;
}

/* Some themes hide headings until a script reveals them (the NuroSparx
 * theme's global.css does). Plugin headings are never animated in. */
.nslms-app :where(h1, h2, h3, h4) {
	color: var(--nsf-ink);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
	visibility: visible !important;
	opacity: 1 !important;
	text-transform: none;
}

.nslms-app a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}

.nslms-app img,
.nslms-app svg,
.nslms-app video,
.nslms-app iframe {
	display: block;
	max-width: 100%;
}

.nslms-app img {
	height: auto;
}

.nslms-app .nslms-icon {
	flex: none;
}

.nslms-app button,
.nslms-app input,
.nslms-app select,
.nslms-app textarea {
	font: inherit;
	color: inherit;
	letter-spacing: normal;
	text-transform: none;
	margin: 0;
}

.nslms-app button {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	cursor: pointer;
	box-shadow: none;
	min-height: 0;
	line-height: inherit;
}

.nslms-app [hidden] {
	display: none !important;
}

.nslms-app :focus-visible {
	outline: 2px solid var(--nsf-accent);
	outline-offset: 2px;
}

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

/* ------------------------------------------------------------------ layout */

/* Page-level roots. Many themes wrap content in a flex row built for a
 * sidebar, which would shrink the plugin to its content width; claiming the
 * whole row fixes that on any theme. */
.nslms-page {
	flex: 1 1 100%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.nslms-container {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

@media (max-width: 640px) {
	.nslms-container {
		padding: 0 16px;
	}
}

.nslms-section-title {
	font-size: 22px;
	margin-bottom: 16px;
}

.nslms-muted {
	color: var(--nsf-muted);
}

/* ----------------------------------------------------------------- buttons */

.nslms-app .nslms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: var(--nsf-control);
	padding: 0 20px;
	border-radius: var(--nsf-radius-md);
	border: 1px solid transparent;
	background: var(--nsf-surface);
	color: var(--nsf-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}

.nslms-app .nslms-btn:active {
	transform: translateY(1px);
}

.nslms-app .nslms-btn--primary {
	background: var(--nsf-accent);
	color: #fff;
}

.nslms-app .nslms-btn--primary:hover {
	background: var(--nsf-accent-hover);
	color: #fff;
}

.nslms-app .nslms-btn--dark {
	background: var(--nsf-ink);
	color: #fff;
}

.nslms-app .nslms-btn--dark:hover {
	background: var(--nsf-ink-2);
	color: #fff;
}

.nslms-app .nslms-btn--outline {
	border-color: var(--nsf-line);
	background: var(--nsf-surface);
}

.nslms-app .nslms-btn--outline:hover {
	border-color: var(--nsf-ink);
}

.nslms-app .nslms-btn--soft {
	background: var(--nsf-accent-soft);
	color: var(--nsf-accent);
}

.nslms-app .nslms-btn--soft:hover {
	background: #fbd9df;
}

.nslms-app .nslms-btn--ghost {
	background: transparent;
	color: var(--nsf-muted);
	padding: 0 10px;
}

.nslms-app .nslms-btn--ghost:hover {
	color: var(--nsf-ink);
	background: var(--nsf-line-soft);
}

.nslms-app .nslms-btn--sm {
	height: var(--nsf-control-sm);
	padding: 0 14px;
	font-size: 14px;
	border-radius: var(--nsf-radius-sm);
}

.nslms-app .nslms-btn--lg {
	height: 52px;
	padding: 0 26px;
	font-size: 16px;
}

.nslms-app .nslms-btn--block {
	display: flex;
	width: 100%;
}

.nslms-app .nslms-btn--icon {
	width: var(--nsf-control);
	padding: 0;
}

.nslms-app .nslms-btn--icon.nslms-btn--sm {
	width: var(--nsf-control-sm);
}

.nslms-app .nslms-btn[disabled],
.nslms-app .nslms-btn[aria-disabled="true"] {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

.nslms-app .nslms-btn[aria-busy="true"] {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.nslms-app .nslms-btn[aria-busy="true"]::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) transparent;
	animation: nslms-spin .7s linear infinite;
}

.nslms-app .nslms-btn--outline[aria-busy="true"]::after,
.nslms-app .nslms-btn--soft[aria-busy="true"]::after {
	border-color: var(--nsf-ink) var(--nsf-ink) var(--nsf-ink) transparent;
}

.nslms-link {
	color: var(--nsf-accent) !important;
	font-weight: 600;
}

.nslms-link:hover {
	text-decoration: underline !important;
}

@keyframes nslms-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ------------------------------------------------------------------ badges */

.nslms-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 24px;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--nsf-line-soft);
	color: var(--nsf-ink);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.nslms-badge--accent {
	background: var(--nsf-accent-soft);
	color: var(--nsf-accent);
}

.nslms-badge--ok {
	background: var(--nsf-ok-soft);
	color: var(--nsf-ok);
}

.nslms-badge--dark {
	background: var(--nsf-ink);
	color: #fff;
}

.nslms-badge--glass {
	background: rgba(255, 255, 255, .92);
	color: var(--nsf-ink);
	box-shadow: var(--nsf-shadow-sm);
}

/* ------------------------------------------------------------------- stars */

.nslms-rating {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	line-height: 1;
}

.nslms-rating-value {
	font-weight: 700;
	color: var(--nsf-ink);
}

.nslms-rating-count {
	color: var(--nsf-muted);
}

.nslms-stars {
	position: relative;
	display: inline-flex;
	color: #d9dce3;
}

.nslms-stars-fill {
	position: absolute;
	inset: 0 auto 0 0;
	display: inline-flex;
	overflow: hidden;
	color: var(--nsf-star);
	white-space: nowrap;
}

.nslms-stars .nslms-icon {
	fill: currentColor;
	stroke: none;
}

/* ------------------------------------------------------------------- price */

.nslms-price {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.nslms-price-now {
	color: var(--nsf-ink);
	font-weight: 800;
	letter-spacing: -.01em;
}

.nslms-price-was {
	color: var(--nsf-faint);
	text-decoration: line-through;
	font-weight: 500;
}

.nslms-price-free {
	color: var(--nsf-ok);
}

/* A price loads after the page (it depends on the visitor's country), so its
 * slot holds a shimmer rather than jumping from empty to filled. */
.nslms-skel {
	display: inline-block;
	min-width: 64px;
	height: 1em;
	border-radius: 6px;
	background: linear-gradient(90deg, #eef0f4 0%, #f7f8fa 50%, #eef0f4 100%);
	background-size: 200% 100%;
	animation: nslms-shimmer 1.2s ease-in-out infinite;
	vertical-align: middle;
}

@keyframes nslms-shimmer {
	from {
		background-position: 100% 0;
	}

	to {
		background-position: -100% 0;
	}
}

/* ---------------------------------------------------------------- progress */

.nslms-meter {
	height: 8px;
	border-radius: 999px;
	background: var(--nsf-line-soft);
	overflow: hidden;
}

.nslms-meter > span {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--nsf-accent);
	transition: width .5s var(--nsf-ease);
}

.nslms-meter.is-complete > span {
	background: var(--nsf-ok);
}

.nslms-meter-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 8px;
	font-size: 13px;
	color: var(--nsf-muted);
}

.nslms-meter-row strong {
	color: var(--nsf-ink);
	font-weight: 700;
}

/* ------------------------------------------------------------------- forms */

.nslms-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.nslms-field + .nslms-field,
.nslms-field-row + .nslms-field,
.nslms-field + .nslms-field-row,
.nslms-field-row + .nslms-field-row {
	margin-top: 16px;
}

.nslms-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Side-by-side fields align; the stacked-field spacing above must not apply. */
.nslms-field-row > .nslms-field + .nslms-field {
	margin-top: 0;
}

@media (max-width: 560px) {
	.nslms-field-row {
		grid-template-columns: 1fr;
	}
}

.nslms-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--nsf-ink);
}

.nslms-hint {
	font-size: 13px;
	color: var(--nsf-muted);
}

.nslms-app .nslms-input,
.nslms-app .nslms-select,
.nslms-app .nslms-textarea {
	display: block;
	width: 100%;
	height: var(--nsf-control);
	min-height: var(--nsf-control);
	padding: 0 14px;
	border: 1px solid var(--nsf-line);
	border-radius: var(--nsf-radius-md);
	background: var(--nsf-surface);
	color: var(--nsf-ink);
	font-size: 15px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}

.nslms-app .nslms-textarea {
	height: auto;
	min-height: 120px;
	padding: 12px 14px;
	resize: vertical;
}

.nslms-app .nslms-select {
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.nslms-app .nslms-input::placeholder,
.nslms-app .nslms-textarea::placeholder {
	color: var(--nsf-faint);
}

.nslms-app .nslms-input:hover,
.nslms-app .nslms-select:hover,
.nslms-app .nslms-textarea:hover {
	border-color: #cfd3db;
}

.nslms-app .nslms-input:focus,
.nslms-app .nslms-select:focus,
.nslms-app .nslms-textarea:focus {
	outline: none;
	border-color: var(--nsf-accent);
	box-shadow: 0 0 0 3px var(--nsf-accent-ring);
}

.nslms-app .nslms-input[aria-invalid="true"] {
	border-color: var(--nsf-accent);
}

.nslms-input-icon {
	position: relative;
}

.nslms-input-icon > .nslms-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--nsf-faint);
	pointer-events: none;
}

.nslms-app .nslms-input-icon > .nslms-input {
	padding-left: 42px;
}

.nslms-input-group {
	display: flex;
	gap: 8px;
}

.nslms-input-group > .nslms-input {
	flex: 1;
	min-width: 0;
}

/* Custom checkbox / radio: a native input, restyled, so keyboard and form
 * behaviour are the browser's own. */
.nslms-check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 32px;
	font-size: 15px;
	color: var(--nsf-text);
	cursor: pointer;
	user-select: none;
}

.nslms-app .nslms-check input {
	appearance: none;
	flex: none;
	width: 18px;
	height: 18px;
	border: 1.5px solid #c5cad3;
	border-radius: 5px;
	background: #fff;
	display: grid;
	place-content: center;
	cursor: pointer;
	transition: background-color .15s, border-color .15s;
}

.nslms-app .nslms-check input[type="radio"] {
	border-radius: 50%;
}

.nslms-app .nslms-check input:checked {
	background: var(--nsf-accent);
	border-color: var(--nsf-accent);
}

.nslms-app .nslms-check input[type="checkbox"]:checked::before {
	content: "";
	width: 10px;
	height: 6px;
	border: 2px solid #fff;
	border-top: 0;
	border-right: 0;
	transform: rotate(-45deg) translate(1px, -1px);
}

.nslms-app .nslms-check input[type="radio"]:checked {
	background: #fff;
	box-shadow: inset 0 0 0 4px var(--nsf-accent);
}

.nslms-check-count {
	margin-left: auto;
	color: var(--nsf-faint);
	font-size: 13px;
}

.nslms-notice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border-radius: var(--nsf-radius-md);
	background: var(--nsf-line-soft);
	color: var(--nsf-ink);
	font-size: 14px;
}

.nslms-notice--error {
	background: var(--nsf-accent-soft);
	color: #a3071f;
}

.nslms-notice--ok {
	background: var(--nsf-ok-soft);
	color: var(--nsf-ok);
}

.nslms-notice--warn {
	background: var(--nsf-warn-soft);
	color: #8a5a00;
}

/* ------------------------------------------------------------------- cards */

.nslms-card {
	background: var(--nsf-surface);
	border: 1px solid var(--nsf-line);
	border-radius: var(--nsf-radius);
	box-shadow: var(--nsf-shadow-sm);
}

.nslms-card-pad {
	padding: 24px;
}

/* Course card — the catalog grid and the dashboard grid share it. */
.nslms-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.nslms-ccard {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--nsf-surface);
	border: 1px solid var(--nsf-line);
	border-radius: var(--nsf-radius);
	overflow: hidden;
	transition: box-shadow .2s var(--nsf-ease), transform .2s var(--nsf-ease), border-color .2s;
}

.nslms-ccard:hover {
	box-shadow: var(--nsf-shadow);
	transform: translateY(-2px);
	border-color: #dfe2e8;
}

.nslms-ccard-media {
	position: relative;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--nsf-ink) 0%, var(--nsf-ink-2) 100%);
	overflow: hidden;
}

.nslms-ccard-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s var(--nsf-ease);
}

.nslms-ccard:hover .nslms-ccard-media img {
	transform: scale(1.03);
}

.nslms-ccard-media-fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: rgba(255, 255, 255, .35);
}

.nslms-ccard-tags {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.nslms-ccard-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	padding: 16px 18px 18px;
}

.nslms-ccard-kicker {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--nsf-accent);
}

.nslms-app .nslms-ccard-title {
	font-size: 17px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* The whole card is the link target, via the title's stretched ::after. */
.nslms-ccard-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.nslms-ccard-instructor {
	font-size: 14px;
	color: var(--nsf-muted);
}

.nslms-ccard-excerpt {
	font-size: 14px;
	color: var(--nsf-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nslms-ccard-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	font-size: 13px;
	color: var(--nsf-muted);
}

.nslms-ccard-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.nslms-ccard-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--nsf-line-soft);
}

.nslms-ccard-foot .nslms-price {
	font-size: 18px;
}

.nslms-ccard-foot .nslms-price-was {
	font-size: 14px;
}

/* Controls above the stretched link stay clickable. */
.nslms-ccard .nslms-btn,
.nslms-ccard [data-nslms-add] {
	position: relative;
	z-index: 2;
}

/* ------------------------------------------------------------ empty states */

.nslms-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 56px 24px;
	text-align: center;
	border: 1px dashed #d8dce4;
	border-radius: var(--nsf-radius);
	background: var(--nsf-surface);
}

.nslms-empty-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: var(--nsf-accent-soft);
	color: var(--nsf-accent);
}

.nslms-app .nslms-empty h3 {
	font-size: 19px;
}

.nslms-empty p {
	max-width: 420px;
	color: var(--nsf-muted);
	font-size: 15px;
}

.nslms-empty .nslms-btn {
	margin-top: 8px;
}

/* -------------------------------------------------------------------- tabs */

.nslms-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--nsf-line);
	overflow-x: auto;
	scrollbar-width: none;
}

.nslms-tabs::-webkit-scrollbar {
	display: none;
}

.nslms-app .nslms-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 16px;
	color: var(--nsf-muted);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	transition: color .15s;
}

.nslms-app .nslms-tab:hover {
	color: var(--nsf-ink);
}

.nslms-app .nslms-tab[aria-selected="true"] {
	color: var(--nsf-ink);
}

.nslms-app .nslms-tab[aria-selected="true"]::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: -1px;
	height: 2px;
	border-radius: 2px;
	background: var(--nsf-accent);
}

.nslms-tab-count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--nsf-line-soft);
	color: var(--nsf-muted);
	font-size: 12px;
}

/* --------------------------------------------------------------- accordion */

.nslms-acc {
	border: 1px solid var(--nsf-line);
	border-radius: var(--nsf-radius);
	overflow: hidden;
	background: var(--nsf-surface);
}

.nslms-acc-section + .nslms-acc-section {
	border-top: 1px solid var(--nsf-line);
}

.nslms-app .nslms-acc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 12px 18px;
	background: var(--nsf-bg);
	text-align: left;
	color: var(--nsf-ink);
}

.nslms-acc-head .nslms-icon-chevron-down {
	color: var(--nsf-muted);
	transition: transform .2s var(--nsf-ease);
}

.nslms-acc-head[aria-expanded="true"] .nslms-icon-chevron-down {
	transform: rotate(180deg);
}

.nslms-acc-title {
	flex: 1;
	font-weight: 700;
	font-size: 15px;
}

.nslms-acc-meta {
	font-size: 13px;
	color: var(--nsf-muted);
	white-space: nowrap;
}

.nslms-acc-items > li {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 10px 18px;
	font-size: 15px;
	border-top: 1px solid var(--nsf-line-soft);
}

.nslms-acc-items .nslms-item-type {
	color: var(--nsf-muted);
}

.nslms-acc-items .nslms-item-title {
	flex: 1;
	min-width: 0;
}

.nslms-acc-items .nslms-item-side {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--nsf-muted);
	white-space: nowrap;
}

.nslms-preview-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	color: var(--nsf-accent) !important;
	font-weight: 600;
}

/* ------------------------------------------------------------------ avatar */

.nslms-avatar {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--nsf-line-soft);
}

.nslms-avatar--lg {
	width: 72px;
	height: 72px;
}

.nslms-avatar--xl {
	width: 96px;
	height: 96px;
}

/* ------------------------------------------------------------------ dialog */

/* Native <dialog>: the browser supplies the focus trap, Escape and inert
 * background. Styling only. */
.nslms-dialog {
	width: min(520px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	border: 0;
	border-radius: var(--nsf-radius);
	background: var(--nsf-surface);
	color: var(--nsf-text);
	box-shadow: var(--nsf-shadow-lg);
	overflow: auto;
}

.nslms-dialog::backdrop {
	background: rgba(15, 20, 33, .55);
	backdrop-filter: blur(2px);
}

.nslms-dialog[open] {
	animation: nslms-pop .22s var(--nsf-ease);
}

@keyframes nslms-pop {
	from {
		opacity: 0;
		transform: translateY(8px) scale(.98);
	}
}

.nslms-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px 0;
}

.nslms-app .nslms-dialog-head h2 {
	font-size: 19px;
}

.nslms-dialog-body {
	padding: 20px 24px 24px;
}

.nslms-dialog-foot {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid var(--nsf-line-soft);
	background: var(--nsf-bg);
}

/* ---------------------------------------------------------------- drawer */

.nslms-drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(440px, 100vw);
	max-width: 100vw;
	height: 100%;
	max-height: 100%;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	background: var(--nsf-surface);
	color: var(--nsf-text);
	box-shadow: var(--nsf-shadow-lg);
	overflow: hidden;
}

.nslms-drawer[open] {
	display: flex;
	flex-direction: column;
	animation: nslms-slide .3s var(--nsf-ease);
}

.nslms-drawer::backdrop {
	background: rgba(15, 20, 33, .5);
}

@keyframes nslms-slide {
	from {
		transform: translateX(100%);
	}
}

.nslms-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: 68px;
	padding: 0 20px 0 24px;
	border-bottom: 1px solid var(--nsf-line);
}

.nslms-app .nslms-drawer-head h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
}

.nslms-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 24px;
}

.nslms-drawer-foot {
	padding: 20px 24px 24px;
	border-top: 1px solid var(--nsf-line);
	background: var(--nsf-bg);
}

.nslms-drawer-links {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	font-size: 14px;
	font-weight: 600;
}

.nslms-app .nslms-drawer-links a,
.nslms-app .nslms-drawer-links button {
	color: var(--nsf-muted);
}

.nslms-app .nslms-drawer-links a:hover,
.nslms-app .nslms-drawer-links button:hover {
	color: var(--nsf-ink);
}

.nslms-app .nslms-btn.is-disabled {
	opacity: .55;
	pointer-events: none;
}

.nslms-lines {
	margin: 0;
}

/* Cart lines — the drawer, the cart page and the checkout summary share them. */
.nslms-line {
	display: grid;
	grid-template-columns: 88px 1fr auto;
	gap: 14px;
	align-items: start;
	padding: 16px 0;
}

.nslms-line + .nslms-line {
	border-top: 1px solid var(--nsf-line-soft);
}

.nslms-line-thumb {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--nsf-radius-sm);
	overflow: hidden;
	background: linear-gradient(135deg, var(--nsf-ink), var(--nsf-ink-2));
}

.nslms-line-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nslms-app .nslms-line-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--nsf-ink);
}

.nslms-line-sub {
	margin-top: 3px;
	font-size: 13px;
	color: var(--nsf-muted);
}

.nslms-line-price {
	text-align: right;
	font-size: 15px;
}

.nslms-line-price .nslms-price {
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.nslms-line-price .nslms-price-was {
	font-size: 13px;
}

.nslms-app .nslms-line-remove {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
	font-size: 13px;
	color: var(--nsf-muted);
}

.nslms-app .nslms-line-remove:hover {
	color: var(--nsf-accent);
}

.nslms-line.is-owned {
	opacity: .6;
}

.nslms-totals {
	display: grid;
	gap: 8px;
	font-size: 15px;
}

.nslms-totals > div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.nslms-totals dt,
.nslms-totals dd {
	margin: 0;
	font-weight: inherit;
}

.nslms-totals .is-discount dd {
	color: var(--nsf-ok);
	font-weight: 600;
}

.nslms-totals .is-total {
	margin-top: 6px;
	padding-top: 12px;
	border-top: 1px solid var(--nsf-line);
	font-size: 18px;
	font-weight: 800;
	color: var(--nsf-ink);
}

/* Floating cart — any page with add-to-cart, regardless of the theme header. */
.nslms-app .nslms-fab {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 52px;
	padding: 0 20px 0 18px;
	border-radius: 999px;
	background: var(--nsf-ink);
	color: #fff;
	font-weight: 700;
	box-shadow: var(--nsf-shadow-lg);
	transition: transform .2s var(--nsf-ease);
}

.nslms-app .nslms-fab:hover {
	transform: translateY(-2px);
}

.nslms-cart-count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--nsf-accent, #e5092f);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.nslms-cart-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.nslms-fab.is-bump {
	animation: nslms-bump .45s var(--nsf-ease);
}

@keyframes nslms-bump {
	40% {
		transform: scale(1.08);
	}
}

@media (max-width: 640px) {
	.nslms-app .nslms-fab {
		right: 16px;
		bottom: 16px;
	}
}

/* ------------------------------------------------------------------- toast */

.nslms-toasts {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 10000;
	display: grid;
	gap: 8px;
	transform: translateX(-50%);
	pointer-events: none;
}

.nslms-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: var(--nsf-radius-md);
	background: var(--nsf-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	box-shadow: var(--nsf-shadow-lg);
	animation: nslms-pop .25s var(--nsf-ease);
}

.nslms-toast.is-error {
	background: #a3071f;
}

/* ------------------------------------------------------------ star picker */

.nslms-star-input {
	display: inline-flex;
	flex-direction: row-reverse;
	gap: 4px;
}

.nslms-star-input input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.nslms-app .nslms-star-input label {
	cursor: pointer;
	color: #d9dce3;
	transition: color .1s, transform .1s;
}

.nslms-star-input .nslms-icon {
	fill: currentColor;
	stroke: none;
}

.nslms-star-input label:hover,
.nslms-star-input label:hover ~ label,
.nslms-star-input input:checked ~ label {
	color: var(--nsf-star);
}

.nslms-star-input label:hover {
	transform: scale(1.1);
}

.nslms-star-input input:focus-visible + label {
	outline: 2px solid var(--nsf-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ------------------------------------------------------------ pagination */

.nslms-pages {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 40px;
}

.nslms-app .nslms-pages a,
.nslms-app .nslms-pages span {
	display: inline-grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--nsf-radius-sm);
	border: 1px solid var(--nsf-line);
	background: var(--nsf-surface);
	color: var(--nsf-ink);
	font-weight: 600;
	font-size: 14px;
}

.nslms-app .nslms-pages a:hover {
	border-color: var(--nsf-ink);
}

.nslms-app .nslms-pages .current {
	background: var(--nsf-ink);
	border-color: var(--nsf-ink);
	color: #fff;
}

.nslms-app .nslms-pages .dots {
	border: 0;
	background: none;
}

@media (prefers-reduced-motion: reduce) {
	.nslms-app *,
	.nslms-app *::before,
	.nslms-app *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
}
