/* Phoenix LMS — public styles (RTL) */

/* Fallback palette.
   PHP prints the live palette — light or dark, plus every admin override — as
   a `.plms-app { --plms-*: … }` block after this file. `:where()` drops this
   copy to zero specificity so the printed block always wins regardless of the
   order the two end up in, and the plugin still renders correctly on its own
   if the inline style is ever stripped by an optimiser.
   Values here mirror the light defaults in plms_color_tokens(). */
:where(.plms-app) {
	--plms-brand: #2563eb;
	--plms-brand-dark: #134cca;
	--plms-brand-soft: #c8d7f9;
	--plms-brand-faint: #edf2fd;
	--plms-on-brand: #ffffff;
	--plms-app-bg: transparent;
	--plms-surface: #ffffff;
	--plms-surface-2: #fafafa;
	--plms-surface-3: #f3f4f6;
	--plms-line: #e5e7eb;
	--plms-line-strong: #d1d5db;
	--plms-overlay: #111827;
	--plms-on-overlay: #ffffff;
	--plms-heading: #111827;
	--plms-ink: #1f2937;
	--plms-muted: #6b7280;
	--plms-faint: #9ca3af;
	--plms-success: #15803d;
	--plms-success-soft: #eefbf3;
	--plms-success-line: #a9efc3;
	--plms-danger: #b91c1c;
	--plms-danger-soft: #fcf2f2;
	--plms-danger-line: #f3baba;
	--plms-warning: #b45309;
	--plms-warning-soft: #fce8d9;
	--plms-warning-line: #f8c6a0;
	--plms-info: #1d4ed8;
	--plms-info-soft: #e9eefb;
	--plms-info-line: #bdccf4;
	--plms-seal: #2563eb;
	--plms-seal-dark: #134cca;
	--plms-cart: #2563eb;
	--plms-cart-dark: #134cca;
	--plms-underline: #2563eb;
	--plms-ring: #2563eb;
	--plms-stars: #f59e0b;
	--plms-cert: #2f9e44;
	--plms-player-bg: #0f172a;
	--plms-player-ink: #cbd5e1;
	--plms-code-bg: #1e1e1e;
	--plms-code-ink: #e6e6e6;
}

.plms-app {
	--plms-radius: 14px;

	direction: rtl;
	text-align: right;
	color: var(--plms-ink);
	/* Transparent by default in both palettes, so the block takes the colour of
	   whatever site it is dropped into — light theme, light plugin; dark theme,
	   dark plugin — instead of laying its own rectangle over the page. Give the
	   "site background" token a colour to opt out of that. */
	background: var(--plms-app-bg);
	font-size: 15px;
	line-height: 1.9;

	/* @font-face for 'PLMS Persian' is injected by plms_font_face_css(). It is
	   limited to Arabic-script codepoints, so Latin text still comes from the
	   theme font (US Core themes publish --font-family on :root) and the block
	   matches the surrounding site. The generic tail keeps the declaration valid
	   on themes that publish no variable — `inherit` inside a font list would
	   invalidate the whole rule and drop the Persian face with it. */
	font-family: 'PLMS Persian', var(--font-family, sans-serif);
}

/* Tells the browser to draw its own furniture — form controls, scrollbars —
   in dark chrome inside the block, which custom properties cannot reach. The
   class sits on the container, so this never escapes into the host page. */
.plms-app.plms-dark {
	color-scheme: dark;
}

/* Embedded players carry their own chrome and should not inherit ours. */
.plms-app.plms-dark :where(iframe, video) {
	color-scheme: light;
}

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

/* Isolate plugin controls from theme button styles. Component selectors below
   provide the final colours, borders and spacing for each button type. */
.plms-app button,
.plms-app input[type='button'],
.plms-app input[type='submit'] {
	-webkit-appearance: none;
	appearance: none;
	font: inherit;
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
	box-shadow: none;
	background-image: none;
}

/* ==================================================== course page layout == */

.plms-course__title {
	margin: 0 0 20px;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.8;
}

/* Sidebar sits on the visual left; in RTL that is simply the second column. */
.plms-course__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 24px;
	align-items: start;
}

.plms-course__main {
	min-width: 0;
}

.plms-course__side {
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: sticky;
	top: 24px;
}

@media (max-width: 900px) {
	.plms-course__layout {
		grid-template-columns: 1fr;
	}

	.plms-course__side {
		position: static;
		order: -1;
	}
}

.plms-side-box {
	border: 1px solid var(--plms-line);
	border-radius: 16px;
	background: var(--plms-surface);
	padding: 18px;
}

.plms-side-box__title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--plms-line);
}

/* ------------------------------------------------------------------ buybox */

.plms-buybox {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}

.plms-buybox__row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.plms-buybox__row del {
	color: var(--plms-faint);
	font-size: 13px;
}

.plms-buybox__off {
	background: var(--plms-seal);
	color: var(--plms-on-brand);
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 999px;
}

.plms-buybox__price {
	font-size: 22px;
	font-weight: 800;
}

.plms-buybox__price.is-free {
	font-size: 17px;
	color: var(--plms-success);
}

.plms-buybox__sold {
	font-size: 12px;
	color: var(--plms-muted);
}

.plms-countdown {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--plms-brand-faint);
	border: 1px dashed var(--plms-seal);
}

.plms-countdown__label {
	font-size: 12px;
	color: var(--plms-muted);
	order: 2;
}

.plms-countdown__clock {
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 0.5px;
	direction: rtl;
	unicode-bidi: isolate;
	line-height: 1.5;
	order: 1;
}

.plms-countdown__date {
	display: none;
}

.plms-countdown__days {
	direction: rtl;
}

.plms-countdown__time {
	display: inline-block;
}

/* ------------------------------------------------------------------- specs */

.plms-specs {
	list-style: none;
	margin: 0;
	padding: 0;
}

.plms-specs__row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 0;
	border-bottom: 1px dashed var(--plms-line);
	font-size: 13.5px;
}

.plms-specs__row:last-child {
	border-bottom: 0;
}

.plms-specs__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: var(--plms-brand-faint);
	color: var(--plms-brand);
	flex: none;
}

.plms-specs__label {
	flex: 1;
	color: var(--plms-muted);
}

.plms-specs__value {
	font-weight: 700;
}

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

.plms-teacher-card {
	display: flex;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px dashed var(--plms-line);
}

.plms-teacher-card:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.plms-teacher-card__face {
	width: 58px;
	height: 58px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--plms-brand-soft);
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.plms-teacher-card__face img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.plms-teacher-card__initial {
	font-size: 22px;
	font-weight: 800;
	color: var(--plms-brand-dark);
}

.plms-teacher-card__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.plms-teacher-card__name {
	font-size: 14px;
}

.plms-teacher-card__role,
.plms-teacher-card__bio {
	font-size: 12px;
	color: var(--plms-muted);
	line-height: 1.9;
}

.plms-teacher-card__links {
	display: flex;
	gap: 6px;
	margin-top: 3px;
}

.plms-teacher-card__links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--plms-brand-faint);
	color: var(--plms-brand);
	transition: background 0.2s ease, color 0.2s ease;
}

.plms-teacher-card__links a:hover {
	background: var(--plms-brand);
	color: var(--plms-on-brand);
}

/* ----------------------------------------------------------------- faq */

.plms-faq__item {
	border: 1px solid var(--plms-line);
	border-radius: 12px;
	margin-bottom: 10px;
	background: var(--plms-surface-2);
	overflow: hidden;
}

.plms-faq__q {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	cursor: pointer;
	list-style: none;
	font-size: 14.5px;
}

/* Hide the browser's native disclosure triangle in both engines. */
.plms-faq__q::-webkit-details-marker {
	display: none;
}

.plms-faq__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--plms-surface-3);
	color: var(--plms-muted);
	font-size: 13px;
	flex: none;
}

.plms-faq__text {
	flex: 1;
}

.plms-faq__chevron {
	color: var(--plms-muted);
	transition: transform 0.25s ease;
	flex: none;
}

.plms-faq__item[open] {
	background: var(--plms-surface);
	border-color: var(--plms-brand-soft);
}

.plms-faq__item[open] .plms-faq__chevron {
	transform: rotate(180deg);
}

.plms-faq__a {
	padding: 0 52px 16px;
	color: var(--plms-muted);
	line-height: 2.1;
	font-size: 13.5px;
}

.plms-faq__a p {
	margin: 0 0 10px;
}

/* -------------------------------------------------------------------- hero */

.plms-hero {
	position: relative;
	margin-bottom: 22px;
	border-radius: 16px;
	overflow: hidden;
	background: var(--plms-brand-faint);
}

.plms-hero__img,
.plms-hero__player .plms-player {
	width: 100%;
	display: block;
	border-radius: 16px;
}

.plms-hero__tag {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--plms-overlay) 75%, transparent);
	color: var(--plms-on-overlay);
	font-size: 12px;
	pointer-events: none;
}

/* ----------------------------------------------------------------- outline */

.plms-outline {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.plms-outline__sub {
	list-style: none;
	margin: 0;
	padding: 0 26px 0 0;
}

.plms-outline__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	margin-bottom: 10px;
	border: 1px solid var(--plms-line);
	border-radius: 12px;
	background: var(--plms-surface-2);
	transition: border-color 0.25s ease, background 0.25s ease;
}

.plms-outline__row:hover {
	background: var(--plms-surface);
	border-color: var(--plms-brand-soft);
}

.plms-outline__row.is-sub {
	background: var(--plms-surface);
}

.plms-outline__state {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	flex: none;
}

.plms-outline__state.is-open {
	color: var(--plms-brand);
	background: var(--plms-brand-faint);
}

.plms-outline__state.is-locked {
	color: var(--plms-warning);
	background: var(--plms-warning-soft);
}

.plms-outline__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}

.plms-outline__title {
	font-size: 14.5px;
	line-height: 1.7;
}

.plms-outline__time {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--plms-muted);
}

/* Player on top, curriculum underneath — one column, full width. */
.plms-learn__grid {
	display: block;
}

.plms-learn__player {
	position: relative;
	margin-bottom: 20px;
}

.plms-i {
	flex: none;
	vertical-align: middle;
}

/* Personal watermark. Deterrent and forensic trail, not a barrier — it drifts
   between corners so a single crop cannot remove it from a whole recording. */
.plms-watermark {
	position: absolute;
	top: 8%;
	right: 6%;
	z-index: 2;
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 13px;
	letter-spacing: 1px;
	color: rgba(255, 255, 255, 0.55);
	background: rgba(0, 0, 0, 0.25);
	pointer-events: none;
	user-select: none;
	animation: plms-drift 47s linear infinite;
}

@keyframes plms-drift {
	0%   { top: 8%;  right: 6%;  }
	25%  { top: 78%; right: 8%;  }
	50%  { top: 82%; right: 62%; }
	75%  { top: 10%; right: 58%; }
	100% { top: 8%;  right: 6%;  }
}

@media (prefers-reduced-motion: reduce) {
	.plms-watermark {
		animation: none;
	}
}

.plms-player {
	position: relative;
	z-index: 1;
}

.plms-learn__rules {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-right: 3px solid var(--plms-brand);
	background: var(--plms-brand-faint);
	border-radius: var(--plms-radius);
	font-size: 14px;
}

.plms-item.is-locked {
	opacity: 0.55;
}

.plms-item__title--locked {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
}

.plms-item__hint {
	display: block;
	padding: 0 12px 10px;
	font-size: 12px;
	color: var(--plms-muted);
}

.plms-item__hint.is-done {
	color: var(--plms-success);
}

.plms-item__hint.is-error {
	color: var(--plms-danger);
}

.plms-quiz__locked {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border: 1px dashed var(--plms-line);
	border-radius: var(--plms-radius);
	background: var(--plms-surface-2);
}

.plms-quiz__locked p {
	margin: 0;
}

.plms-quiz__locked-icon {
	font-size: 22px;
}

/* Form controls do not inherit font by default. */
.plms-app input,
.plms-app select,
.plms-app textarea,
.plms-app button {
	font-family: inherit;
}

.plms-brandbar {
	margin-bottom: 20px;
}

.plms-brandbar__logo {
	max-height: 56px;
	width: auto;
	display: block;
}

.plms-empty {
	padding: 24px;
	background: var(--plms-brand-faint);
	border-radius: var(--plms-radius);
	text-align: center;
	color: var(--plms-muted);
}

.plms-notice {
	padding: 14px 18px;
	border-radius: var(--plms-radius);
	margin-bottom: 20px;
	border: 1px solid transparent;
}

.plms-notice--success {
	background: var(--plms-success-soft);
	border-color: var(--plms-success-line);
	color: var(--plms-success);
}

.plms-notice--error {
	background: var(--plms-danger-soft);
	border-color: var(--plms-danger-line);
	color: var(--plms-danger);
}

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

.plms-btn {
	display: inline-block;
	padding: 10px 20px;
	border: 1px solid var(--plms-brand);
	border-radius: 999px;
	background: transparent;
	color: var(--plms-brand);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.plms-btn:hover {
	background: var(--plms-brand-faint);
}

.plms-btn--primary {
	background: var(--plms-brand);
	color: var(--plms-on-brand);
}

.plms-btn--primary:hover {
	background: var(--plms-brand-dark);
	color: var(--plms-on-brand);
}

.plms-btn--ghost {
	border-color: var(--plms-line);
	color: var(--plms-ink);
}

.plms-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ------------------------------------------------------------------ catalog */

.plms-grid {
	display: grid;
	/* min() keeps the track from overflowing viewports narrower than 260px. */
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: 22px;
}

.plms-grid--catalog,
.plms-grid--latest {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: stretch;
}

.plms-grid--catalog .plms-card,
.plms-grid--latest .plms-card {
	height: 100%;
}

/* ------------------------------------------------- author-sized grid ==
   `[phoenix_lms_courses_grid]` prints --plms-cols* inline, one value per
   breakpoint. repeat() needs a literal integer and min() cannot supply one, so
   the step-down is computed in PHP rather than expressed here — which also lets
   an author override any single tier without touching the others.

   The fallbacks mirror the catalogue's own ladder, so the rules still lay out
   sensibly if the inline style is ever stripped. The extra `.plms-app` outranks
   `.plms-grid` above regardless of source order. */
.plms-app .plms-grid--dynamic {
	grid-template-columns: repeat(var(--plms-cols, 4), minmax(0, 1fr));
	align-items: stretch;
}

.plms-app .plms-grid--dynamic .plms-card {
	height: 100%;
}

@media (max-width: 1080px) {
	.plms-app .plms-grid--dynamic {
		grid-template-columns: repeat(var(--plms-cols-md, 3), minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.plms-app .plms-grid--dynamic {
		grid-template-columns: repeat(var(--plms-cols-sm, 2), minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.plms-app .plms-grid--dynamic {
		grid-template-columns: repeat(var(--plms-cols-xs, 1), minmax(0, 1fr));
	}
}

.plms-catalog__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-bottom: 22px;
}

.plms-catalog__filter {
	border: 1px solid var(--plms-line);
	border-radius: 999px;
	background: var(--plms-surface);
	color: var(--plms-muted);
	padding: 7px 14px;
	font: inherit;
	font-size: 13px;
	line-height: 1.8;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.plms-catalog__filter:hover,
.plms-catalog__filter.is-active {
	border-color: var(--plms-brand);
	background: var(--plms-brand);
	color: var(--plms-on-brand);
}

.plms-card {
	position: relative;
	border: 1px solid var(--plms-line);
	border-radius: 16px;
	background: var(--plms-surface);
	padding: 12px;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.plms-card:hover {
	border-color: transparent;
	transform: translateY(-4px);
	box-shadow: 0 18px 38px -18px rgba(0, 0, 0, 0.28);
}

/* The underline sweeps out from the middle of the card's bottom edge. */
.plms-card__glow {
	position: absolute;
	right: 50%;
	bottom: -1px;
	transform: translateX(50%);
	width: 0;
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(90deg, transparent, var(--plms-underline, var(--plms-brand)) 18%, var(--plms-underline, var(--plms-brand)) 82%, transparent);
	transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

.plms-card:hover .plms-card__glow {
	width: 82%;
}

.plms-card__media {
	position: relative;
	display: block;
	/* Settings → برند و ظاهر prints --plms-cover-ratio; a shortcode may set it
	   again on its own grid. The image under it is object-fit: cover, so this
	   shape crops the artwork rather than distorting it. */
	aspect-ratio: var(--plms-cover-ratio, 16 / 10);
	background: var(--plms-brand-faint);
	border-radius: 12px;
	overflow: hidden;
}

.plms-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.plms-card:hover .plms-card__media img {
	transform: scale(1.05);
}

.plms-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--plms-brand);
	font-weight: 700;
	opacity: 0.5;
}

/* "Certificate on completion" pill over the cover. */
.plms-card__cert {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--plms-overlay) 78%, transparent);
	color: var(--plms-on-overlay);
	font-size: 12px;
	backdrop-filter: blur(3px);
}

.plms-card__cert-tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: var(--plms-cert);
	font-size: 10px;
	line-height: 1;
}

/* Discount seal: a 12-point rosette over the cover's top corner.
   Every vertex stays inside 0–100% because clip-path cannot paint outside the
   element's own box — points beyond that range get sliced flat instead. */
.plms-seal {
	position: absolute;
	top: -6px;
	right: -6px;
	z-index: 3;
	width: 68px;
	height: 68px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	color: var(--plms-on-brand);
	background: linear-gradient(145deg, var(--plms-seal), var(--plms-seal-dark));
	clip-path: polygon(
		50% 0%, 60.6% 10.4%, 75% 6.7%, 79% 21%, 93.3% 25%, 89.6% 39.4%,
		100% 50%, 89.6% 60.6%, 93.3% 75%, 79% 79%, 75% 93.3%, 60.6% 89.6%,
		50% 100%, 39.4% 89.6%, 25% 93.3%, 21% 79%, 6.7% 75%, 10.4% 60.6%,
		0% 50%, 10.4% 39.4%, 6.7% 25%, 21% 21%, 25% 6.7%, 39.4% 10.4%
	);
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
}

.plms-seal b {
	font-size: 16px;
	font-weight: 800;
	line-height: 1.1;
}

.plms-seal i {
	font-size: 10px;
	font-style: normal;
	line-height: 1;
	opacity: 0.95;
}

.plms-card__body {
	padding: 14px 6px 4px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	/* Lets the footer react to the card's own width rather than the screen's:
	   the same card is wide in one grid and narrow in a six-up one. */
	container-type: inline-size;
}

.plms-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.9;
}

.plms-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.plms-card:hover .plms-card__title a {
	color: var(--plms-brand);
}

.plms-card__teaser {
	margin: 0;
	color: var(--plms-muted);
	font-size: 13.5px;
	line-height: 2.1;
	/* Keep every card's body the same height regardless of copy length. */
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ------------------------------------------------------------- instructors */

/* --------------------------------------------------------- student dashboard */

.plms-dash__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 20px;
}

.plms-dash__hello {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
}

.plms-dash__stats {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.plms-dash__stat {
	padding: 8px 14px;
	border-radius: 12px;
	background: var(--plms-brand-faint);
	font-size: 13px;

	b {
		color: var(--plms-brand-dark);
		font-size: 16px;
		margin-left: 4px;
	}
}

.plms-dash__tabs {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	border-bottom: 2px solid var(--plms-line);
	margin-bottom: 20px;
}

.plms-dash__tab {
	border: 0;
	background: none;
	padding: 12px 18px;
	font-family: inherit;
	font-size: 14.5px;
	color: var(--plms-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.plms-dash__tab.is-active {
	color: var(--plms-brand);
	border-bottom-color: var(--plms-brand);
	font-weight: 700;
}

.plms-dash__panel {
	display: none;
}

.plms-dash__panel.is-active {
	display: block;
}

.plms-dash__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 16px;
}

.plms-dash__course {
	display: flex;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--plms-line);
	border-radius: 14px;
	text-decoration: none;
	color: inherit;
	background: var(--plms-surface);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.plms-dash__course:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.25);
}

.plms-dash__cover {
	flex: none;
	width: 84px;
	height: 84px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--plms-brand-faint);

	img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}
}

.plms-dash__cbody {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 0;

	strong {
		font-size: 14.5px;
		line-height: 1.7;
	}

	small {
		font-size: 12px;
		color: var(--plms-muted);
	}
}

.plms-dash__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;

	th,
	td {
		padding: 12px 14px;
		text-align: right;
		border-bottom: 1px solid var(--plms-line);
	}

	th {
		color: var(--plms-muted);
		font-weight: 600;
		background: var(--plms-surface-2);
	}

	small {
		color: var(--plms-muted);
	}
}

.plms-dash__table-wrap {
	overflow-x: auto;
}

/* ----------------------------------------------------------- payment result */

.plms-receipt {
	max-width: 520px;
	margin: 0 auto;
}

.plms-receipt__card {
	text-align: center;
	padding: 36px 28px;
	border-radius: 18px;
	border: 1px solid var(--plms-line);
	background: var(--plms-surface);
}

.plms-receipt__card.is-ok {
	border-top: 4px solid var(--plms-success);
}

.plms-receipt__card.is-fail {
	border-top: 4px solid var(--plms-danger);
}

.plms-receipt__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	margin-bottom: 14px;
}

.is-ok .plms-receipt__icon {
	color: var(--plms-success);
	background: var(--plms-success-soft);
}

.is-fail .plms-receipt__icon {
	color: var(--plms-danger);
	background: var(--plms-danger-soft);
}

.plms-receipt__title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 800;
}

.plms-receipt__lead {
	margin: 0 0 20px;
	color: var(--plms-muted);
}

.plms-receipt__rows {
	margin: 0 0 22px;
	text-align: right;

	> div {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 11px 4px;
		border-bottom: 1px dashed var(--plms-line);
	}

	dt {
		color: var(--plms-muted);
		font-size: 13px;
	}

	dd {
		margin: 0;
		font-size: 13.5px;
	}
}

.plms-receipt__actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ------------------------------------------------------------------ coupon */

.plms-coupon {
	margin-bottom: 12px;
	padding: 12px;
	border: 1px dashed var(--plms-line);
	border-radius: 12px;
	background: var(--plms-surface-2);
	transition: border-color 0.25s ease, background 0.25s ease;
}

.plms-coupon.is-applied {
	border-color: var(--plms-success);
	border-style: solid;
	background: var(--plms-success-soft);
}

.plms-coupon__label {
	display: block;
	font-size: 12.5px;
	color: var(--plms-muted);
	margin-bottom: 8px;
}

.plms-coupon__row {
	display: flex;
	gap: 8px;
}

.plms-coupon__input {
	flex: 1;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid var(--plms-line);
	border-radius: 9px;
	font-family: inherit;
	font-size: 14px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.plms-coupon__input:focus {
	outline: none;
	border-color: var(--plms-brand);
}

.plms-coupon__msg {
	display: block;
	margin-top: 8px;
	font-size: 12.5px;
}

.plms-coupon__msg.is-ok {
	color: var(--plms-success);
}

.plms-coupon__msg.is-error {
	color: var(--plms-danger);
}

.plms-card__timer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	background: var(--plms-brand-faint);
	color: var(--plms-brand-dark);
	direction: rtl;
}

.plms-card__timer-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1.4;
}

.plms-card__timer strong {
	font-size: 14px;
	font-weight: 800;
	direction: rtl;
	unicode-bidi: isolate;
}

.plms-card__timer small {
	font-weight: 400;
	color: var(--plms-muted);
	font-size: 11px;
}

.plms-card__timer.is-over {
	background: var(--plms-surface-3);
	color: var(--plms-muted);
}

.plms-card__teachers {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-bottom: 12px;
}

.plms-card__teachers-label {
	font-size: 12px;
	color: var(--plms-muted);
	white-space: nowrap;
}

.plms-avatars {
	display: flex;
	flex-direction: row-reverse;
	/* Reversed so the first instructor sits on top of the stack in RTL. */
	justify-content: flex-end;
}

.plms-avatar {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--plms-brand-soft);
	border: 2px solid var(--plms-surface);
	box-shadow: 0 0 0 1.5px var(--plms-ring);
	margin-left: -10px;
	transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s;
	cursor: pointer;
}

.plms-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.plms-avatar__initial {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-weight: 700;
	color: var(--plms-brand-dark);
}

.plms-avatar:hover {
	transform: scale(1.45);
	z-index: 4;
}

/* ------------------------------------------------------------ card footer */

.plms-card__foot {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--plms-line);
	margin-top: auto;
	/* A floor, not a fixed height: footers still line up across a row, but a
	   course with sales, a rating and a discount on a narrow card grows the
	   footer instead of spilling its price below the border. */
	min-height: 70px;
	flex: 0 0 auto;
}

/* A labelled button rather than an icon: "مشاهده دوره" says what happens, a
   book glyph did not. Height matches the old 42px square so the footer row
   keeps its rhythm; width follows the text. */
.plms-card__cart {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 14px;
	border-radius: 11px;
	background: var(--plms-cart);
	color: var(--plms-on-brand);
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: transform 0.25s ease, background 0.25s ease;
}

.plms-card__cart:hover {
	background: var(--plms-cart-dark);
	transform: translateY(-2px);
}

/* Everything numeric, stacked on the side opposite the button. In RTL the
   auto start margin pushes it to the left edge, where the price always sat. */
.plms-card__figures {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
	min-width: 0;
	margin-right: auto;
	/* The block's 1.9 is body-copy spacing; three short figure lines at that
	   height outgrow the 70px footer and knock its divider out of line with
	   the neighbouring cards. */
	line-height: 1.35;
}

/* Sales count and stars on one line — stacked they would take the height the
   price needs. */
.plms-card__stats {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 2px 6px;
	font-size: 12px;
	color: var(--plms-muted);
}

.plms-card__prices {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: left;
}

/* Below ~200px a labelled button and a full price no longer fit on one line.
   The figures keep the top line and the button takes a full-width line of its
   own underneath; the floor is raised so dividers still line up across a row
   of cards that all switched together. */
@container (max-width: 200px) {
	.plms-card__foot {
		flex-wrap: wrap;
		row-gap: 8px;
		min-height: 116px;
	}

	.plms-card__figures {
		flex: 1 1 100%;
	}

	.plms-card__cart {
		order: 1;
		flex: 1 1 100%;
		height: 36px;
	}
}

.plms-card__was {
	font-size: 12px;
	color: var(--plms-faint);
}

.plms-card__price {
	font-size: 15px;
	font-weight: 800;
}

.plms-card__price.is-free {
	color: var(--plms-success);
}

@media (max-width: 1080px) {
	.plms-grid--catalog,
	.plms-grid--latest {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.plms-grid--catalog,
	.plms-grid--latest {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.plms-grid--catalog,
	.plms-grid--latest {
		grid-template-columns: 1fr;
	}
}

.plms-stars {
	display: inline-flex;
	gap: 1px;
	font-size: 13px;
	color: var(--plms-line-strong);
	line-height: 1;
}

.plms-stars i {
	font-style: normal;
}

.plms-stars i.is-on {
	color: var(--plms-stars);
}

.plms-stars i.is-half {
	background: linear-gradient(to left, var(--plms-stars) 50%, var(--plms-line-strong) 50%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.plms-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
	.plms-card,
	.plms-card__glow,
	.plms-avatar,
	.plms-card__media img {
		transition: none;
	}
}

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

.plms-price del {
	color: var(--plms-muted);
	font-size: 0.9em;
	margin-left: 6px;
}

.plms-price--free {
	color: var(--plms-success);
	font-weight: 700;
}

.plms-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--plms-brand-faint);
	color: var(--plms-brand-dark);
	font-size: 12px;
	font-weight: 600;
}

.plms-badge--discount {
	background: var(--plms-warning-soft);
	color: var(--plms-warning);
}

.plms-badge--ok {
	background: var(--plms-success-soft);
	color: var(--plms-success);
}

.plms-badge--fail {
	background: var(--plms-danger-soft);
	color: var(--plms-danger);
}

/* ------------------------------------------------------------------- course */

.plms-course__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	gap: 28px;
	align-items: start;
	margin-bottom: 32px;
}

.plms-course__media img {
	width: 100%;
	border-radius: var(--plms-radius);
	display: block;
}

.plms-course__title {
	margin: 0 0 12px;
	font-size: 26px;
}

.plms-course__meta {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.plms-course__desc {
	color: var(--plms-muted);
}

.plms-access {
	margin-top: 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.plms-access__ok {
	color: var(--plms-success);
	font-weight: 600;
}

.plms-access__msg.is-error,
.plms-quiz__msg.is-error,
.plms-certificate__msg.is-error {
	color: var(--plms-danger);
}

.plms-access__msg.is-ok,
.plms-quiz__msg.is-ok,
.plms-certificate__msg.is-ok {
	color: var(--plms-success);
}

.plms-section {
	margin-top: 36px;
}

/* Centred heading with a hairline reaching both edges, so each block reads as
   a clearly separated section. */
.plms-section__title {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 20px;
	font-size: 19px;
	font-weight: 700;
}

.plms-section__deco {
	flex: 1;
	height: 1px;
	background: linear-gradient(
		to left,
		transparent,
		var(--plms-line) 22%,
		var(--plms-line) 78%,
		transparent
	);
}

.plms-section__label {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	flex: none;
	white-space: nowrap;
	color: var(--plms-ink);
}

.plms-section__label .plms-i {
	color: var(--plms-brand);
}

@media (max-width: 560px) {
	.plms-section__title {
		gap: 10px;
		font-size: 17px;
	}

	.plms-section__label {
		/* Long headings may wrap rather than squeeze the rules to nothing. */
		white-space: normal;
	}
}

/* -------------------------------------------------------------- certificate */

.plms-cert {
	display: flex;
	gap: 18px;
	padding: 22px;
	border-radius: 16px;
	border: 1px solid var(--plms-line);
	background: var(--plms-surface);
	position: relative;
	overflow: hidden;
}

/* A tinted strip on the leading edge carries the state colour. */
.plms-cert::before {
	content: '';
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 5px;
	background: var(--plms-cert-accent, var(--plms-brand));
}

.plms-cert--issued {
	--plms-cert-accent: var(--plms-success);
	background: linear-gradient(180deg, var(--plms-success-soft), var(--plms-surface) 60%);
}

.plms-cert--pending {
	--plms-cert-accent: var(--plms-warning);
	background: linear-gradient(180deg, var(--plms-warning-soft), var(--plms-surface) 60%);
}

.plms-cert--rejected {
	--plms-cert-accent: var(--plms-danger);
	background: linear-gradient(180deg, var(--plms-danger-soft), var(--plms-surface) 60%);
}

.plms-cert--eligible {
	--plms-cert-accent: var(--plms-brand);
	background: linear-gradient(180deg, var(--plms-brand-faint), var(--plms-surface) 60%);
}

.plms-cert--locked {
	--plms-cert-accent: var(--plms-faint);
}

.plms-cert__seal {
	flex: none;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--plms-cert-accent);
	background: var(--plms-surface-3);
	background: color-mix(in srgb, var(--plms-cert-accent) 12%, var(--plms-surface));
	border: 2px dashed var(--plms-line);
	border-color: color-mix(in srgb, var(--plms-cert-accent) 35%, var(--plms-surface));
}

.plms-cert__main {
	flex: 1;
	min-width: 0;
}

.plms-cert__title {
	margin: 0 0 4px;
	font-size: 17px;
	font-weight: 800;
}

.plms-cert__lead {
	margin: 0 0 16px;
	color: var(--plms-muted);
	font-size: 13.5px;
}

/* ------------------------------------------------------------ score meter */

.plms-cert__meter {
	margin-bottom: 18px;
	padding: 14px;
	border-radius: 12px;
	background: var(--plms-surface-2);
}

.plms-cert__meter-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 12.5px;
	color: var(--plms-muted);
	margin-bottom: 8px;

	b {
		color: var(--plms-ink);
	}
}

.plms-cert__meter-track {
	height: 8px;
	border-radius: 999px;
	background: var(--plms-surface-3);
	overflow: hidden;
}

.plms-cert__meter-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--plms-cert-accent);
	transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.plms-cert__gap {
	margin: 8px 0 0;
	font-size: 12.5px;
	color: var(--plms-muted);
}

/* -------------------------------------------------------------- step trail */

.plms-cert__steps {
	list-style: none;
	display: flex;
	gap: 8px;
	margin: 0 0 16px;
	padding: 0;
	flex-wrap: wrap;
}

.plms-cert__step {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 130px;
	padding: 9px 12px;
	border-radius: 10px;
	background: var(--plms-surface-3);
	color: var(--plms-muted);
	font-size: 12.5px;
}

.plms-cert__step.is-done {
	background: var(--plms-surface-3);
	background: color-mix(in srgb, var(--plms-cert-accent) 12%, var(--plms-surface));
	color: var(--plms-ink);
}

.plms-cert__step-dot {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	background: var(--plms-line-strong);
	color: var(--plms-ink);
}

.plms-cert__step.is-done .plms-cert__step-dot {
	background: var(--plms-cert-accent);
	color: var(--plms-on-brand);
}

/* ------------------------------------------------------------------- meta */

.plms-cert__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
	font-size: 12.5px;
	color: var(--plms-muted);
}

.plms-cert__chip {
	padding: 4px 12px;
	border-radius: 999px;
	font-weight: 700;
	color: var(--plms-on-brand);
	background: var(--plms-cert-accent);
}

.plms-cert__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

@media (max-width: 560px) {
	.plms-cert {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 20px 16px;
	}

	.plms-cert__meter-head,
	.plms-cert__meta,
	.plms-cert__actions {
		justify-content: center;
	}
}

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

.plms-progress {
	margin-bottom: 22px;
}

.plms-progress__head {
	display: flex;
	justify-content: space-between;
	font-weight: 600;
	margin-bottom: 8px;
}

.plms-progress__track {
	height: 10px;
	border-radius: 999px;
	background: var(--plms-brand-soft);
	overflow: hidden;
}

.plms-progress__fill {
	height: 100%;
	background: var(--plms-brand);
	border-radius: 999px;
	transition: width 0.35s ease;
}

.plms-progress__meta {
	margin-top: 6px;
	font-size: 13px;
	color: var(--plms-muted);
}

/* ------------------------------------------------------------------- player */

/* Superseded: the learn area is a single column (player above the list). */

.plms-player-slot {
	position: relative;
	background: var(--plms-player-bg);
	border-radius: var(--plms-radius);
	overflow: hidden;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
}

.plms-player-hint {
	color: var(--plms-player-ink);
	margin: 0;
	padding: 16px;
	text-align: center;
}

.plms-player {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.plms-player--embed,
.plms-player--embed iframe {
	width: 100%;
	height: 100%;
}

.plms-player-link {
	color: var(--plms-on-overlay);
}

/* --------------------------------------------------------------- curriculum */

.plms-curriculum {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--plms-line);
	border-radius: var(--plms-radius);
	overflow: hidden;
}

.plms-lesson + .plms-lesson {
	border-top: 1px solid var(--plms-line);
}

.plms-chapters {
	list-style: none;
	margin: 0;
	padding: 0 22px 0 0;
	background: var(--plms-surface-2);
}

.plms-chapter + .plms-chapter {
	border-top: 1px dashed var(--plms-line);
}

.plms-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
}

.plms-item.is-playing {
	background: var(--plms-brand-faint);
}

.plms-item__play {
	display: flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-align: right;
	flex: 1;
}

.plms-item__icon {
	color: var(--plms-brand);
	font-size: 12px;
}

.plms-item.is-done .plms-item__title {
	color: var(--plms-muted);
}

.plms-item__title--plain {
	flex: 1;
	color: var(--plms-muted);
}

.plms-item__done {
	border: 1px solid var(--plms-line);
	background: var(--plms-surface);
	border-radius: 999px;
	padding: 3px 12px;
	font: inherit;
	font-size: 12px;
	color: var(--plms-muted);
	cursor: pointer;
	white-space: nowrap;
}

.plms-item.is-done .plms-item__done {
	border-color: var(--plms-success-line);
	background: var(--plms-success-soft);
	color: var(--plms-success);
}

.plms-curriculum--preview .plms-lesson {
	padding: 12px 14px;
}

.plms-lesson__title {
	font-weight: 600;
}

.plms-curriculum--preview .plms-chapter {
	padding: 8px 14px;
	color: var(--plms-muted);
}

/* --------------------------------------------------------------------- quiz */

.plms-quiz__hint,
.plms-quiz__last {
	color: var(--plms-muted);
	margin-bottom: 16px;
}

/* Question sits in its own header block; the options get a separate framed
   box beneath it, so nothing overlaps a border. */
.plms-question {
	margin: 0 0 22px;
}

.plms-question__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
	font-weight: 700;
	line-height: 2;
}

.plms-question__no {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	margin-top: 3px;
	border-radius: 8px;
	background: var(--plms-brand);
	color: var(--plms-on-brand);
	font-size: 12.5px;
}

.plms-question__text {
	flex: 1;
	min-width: 0;
	/* Long unbroken strings (pasted codes) must not push the box wider. */
	overflow-wrap: anywhere;
}

.plms-question__options {
	border: 1px solid var(--plms-line);
	border-radius: var(--plms-radius);
	padding: 8px 12px;
	background: var(--plms-surface);
}

.plms-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 8px;
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.18s ease;
}

/* Hairline between options, but not after the last one. */
.plms-option + .plms-option {
	border-top: 1px solid var(--plms-line);
}

.plms-option:hover {
	background: var(--plms-brand-faint);
}

.plms-option input {
	flex: none;
	margin: 0;
}

.plms-option span {
	overflow-wrap: anywhere;
}

.plms-result {
	margin-top: 20px;
	padding: 24px;
	border-radius: var(--plms-radius);
	text-align: center;
	border: 1px solid var(--plms-line);
}

.plms-result.is-pass {
	background: var(--plms-success-soft);
	border-color: var(--plms-success-line);
}

.plms-result.is-fail {
	background: var(--plms-danger-soft);
	border-color: var(--plms-danger-line);
}

.plms-result__score {
	font-size: 44px;
	font-weight: 800;
	line-height: 1.2;
}

.plms-result__meta,
.plms-result__verdict {
	margin: 6px 0;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 860px) {
	.plms-course__head,
}

/* ------------------------------------------------- free preview (guests) */

.plms-preview-slot {
	margin-bottom: 18px;
	border-radius: 14px;
	overflow: hidden;
	background: var(--plms-player-bg);
}

.plms-preview-slot .plms-player {
	width: 100%;
	display: block;
}

/* A previewable outline row is a real button, so reset the UA styling. */
button.plms-outline__row {
	width: 100%;
	font: inherit;
	color: inherit;
	text-align: inherit;
	cursor: pointer;
}

.plms-outline__row.is-playable:hover {
	border-color: var(--plms-brand);
	background: var(--plms-brand-faint);
}

.plms-outline__row.is-playing {
	border-color: var(--plms-brand);
	background: var(--plms-brand-faint);
}

.plms-outline__free {
	flex: none;
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--plms-success-soft);
	color: var(--plms-success);
	white-space: nowrap;
}

/* ---------------------------------------------------------------- login */

.plms-login {
	max-width: 420px;
	margin: 0 auto;
}

.plms-login__box {
	border: 1px solid var(--plms-line);
	border-radius: 16px;
	background: var(--plms-surface);
	padding: 28px 26px;
}

.plms-login__title {
	margin: 0 0 20px;
	font-size: 19px;
	font-weight: 800;
	text-align: center;
}

/* Core prints its own markup, so style by its classes. */
.plms-login .login-username,
.plms-login .login-password {
	margin-bottom: 14px;
}

.plms-login label {
	display: block;
	margin-bottom: 6px;
	font-size: 13.5px;
	color: var(--plms-muted);
}

.plms-login input[type='text'],
.plms-login input[type='password'] {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--plms-line);
	border-radius: 10px;
	font: inherit;
	background: var(--plms-surface);
}

.plms-login input[type='text']:focus,
.plms-login input[type='password']:focus {
	outline: 2px solid var(--plms-brand);
	outline-offset: 1px;
	border-color: var(--plms-brand);
}

.plms-login .login-remember label {
	display: flex;
	align-items: center;
	gap: 7px;
	color: var(--plms-ink);
}

.plms-login .login-submit input[type='submit'] {
	width: 100%;
	margin-top: 12px;
	padding: 12px;
	border: 0;
	border-radius: 10px;
	background: var(--plms-brand);
	color: var(--plms-on-brand);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.plms-login .login-submit input[type='submit']:hover {
	background: var(--plms-brand-dark);
}

.plms-login__links {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--plms-line);
	font-size: 13px;
}

.plms-login__actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ------------------------------------------------------------- otp login */

.plms-login__tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 20px;
	border-bottom: 2px solid var(--plms-line);
}

.plms-login__tab {
	flex: 1;
	border: 0;
	background: none;
	padding: 10px 8px;
	font: inherit;
	font-size: 13.5px;
	color: var(--plms-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.plms-login__tab.is-active {
	color: var(--plms-brand);
	border-bottom-color: var(--plms-brand);
	font-weight: 700;
}

.plms-login__pane {
	display: none;
}

.plms-login__pane.is-active {
	display: block;
}

.plms-otp .plms-field {
	display: block;
	margin-bottom: 14px;
}

.plms-otp .plms-field__label {
	display: block;
	margin-bottom: 6px;
	font-size: 13.5px;
	color: var(--plms-muted);
}

.plms-otp input {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--plms-line);
	border-radius: 10px;
	font: inherit;
}

.plms-otp input[data-otp-code] {
	text-align: center;
	letter-spacing: 10px;
	font-size: 20px;
	font-weight: 700;
}

.plms-btn--block {
	display: block;
	width: 100%;
	text-align: center;
}

/* "No account yet?" note under the get-code button. */
.plms-otp__join {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 16px;
	padding: 14px 16px;
	border: 1px solid color-mix(in srgb, var(--plms-brand) 22%, transparent);
	border-radius: 14px;
	background:
		radial-gradient(circle at 0 0, color-mix(in srgb, var(--plms-brand) 14%, transparent), transparent 60%),
		linear-gradient(135deg, var(--plms-brand-faint), var(--plms-surface));
	overflow: hidden;
}

.plms-otp__join::before {
	content: '';
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--plms-brand), var(--plms-brand-dark));
}

.plms-otp__join-icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--plms-brand);
	color: var(--plms-on-brand);
	box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--plms-brand) 70%, transparent);
}

.plms-otp__join-text strong {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	color: var(--plms-ink);
}

.plms-otp__join-text p {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.9;
	color: var(--plms-muted);
}

.plms-otp__sent {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--plms-muted);
	line-height: 2;
}

.plms-otp__resend {
	margin: 12px 0 0;
	text-align: center;
	font-size: 12.5px;
	color: var(--plms-muted);
}

.plms-linkbtn {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: inherit;
	color: var(--plms-brand);
	cursor: pointer;
	text-decoration: underline;
}

.plms-otp__msg {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	text-align: center;
}

.plms-otp__msg.is-error {
	color: var(--plms-danger);
}

.plms-otp__msg.is-ok {
	color: var(--plms-success);
}

/* ================================================= button theme isolation ==
   Keep every public-facing plugin button independent from the active theme,
   including wp_login_form's submit input. The doubled .plms-app scope and
   important declarations intentionally win over opinionated theme rules. */
.plms-app.plms-app button,
.plms-app.plms-app input[type='button'],
.plms-app.plms-app input[type='submit'] {
	-webkit-appearance: none !important;
	appearance: none !important;
	font-family: 'PLMS Persian', var(--font-family, sans-serif) !important;
	font-size: inherit !important;
	line-height: 1.8 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-shadow: none !important;
	box-shadow: none !important;
	background-image: none !important;
}

.plms-app.plms-app button:focus-visible,
.plms-app.plms-app input[type='button']:focus-visible,
.plms-app.plms-app input[type='submit']:focus-visible,
.plms-app.plms-app .plms-card__cart:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--plms-brand) 30%, transparent) !important;
	outline-offset: 2px !important;
}

.plms-app.plms-app .plms-btn {
	display: inline-block !important;
	padding: 10px 20px !important;
	border: 1px solid var(--plms-brand) !important;
	border-radius: 999px !important;
	background-color: transparent !important;
	color: var(--plms-brand) !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	text-decoration: none !important;
}

.plms-app.plms-app .plms-btn:hover {
	background-color: var(--plms-brand-faint) !important;
	color: var(--plms-brand-dark) !important;
}

.plms-app.plms-app .plms-btn--primary,
.plms-app.plms-app .login-submit input[type='submit'] {
	border: 1px solid var(--plms-brand) !important;
	border-radius: 999px !important;
	background-color: var(--plms-brand) !important;
	color: var(--plms-on-brand) !important;
	font-weight: 700 !important;
	cursor: pointer !important;
}

.plms-app.plms-app .login-submit input[type='submit'] {
	width: 100% !important;
	padding: 10px 20px !important;
}

.plms-app.plms-app .plms-btn--primary {
	border-radius: 999px !important;
}

.plms-app.plms-app .plms-btn--primary:hover,
.plms-app.plms-app .login-submit input[type='submit']:hover {
	border-color: var(--plms-brand-dark) !important;
	background-color: var(--plms-brand-dark) !important;
	color: var(--plms-on-brand) !important;
}

.plms-app.plms-app .plms-btn--ghost {
	border-color: var(--plms-line) !important;
	background-color: var(--plms-surface) !important;
	color: var(--plms-ink) !important;
}

.plms-app.plms-app .plms-catalog__filter {
	padding: 7px 14px !important;
	border: 1px solid var(--plms-line) !important;
	border-radius: 999px !important;
	background-color: var(--plms-surface) !important;
	color: var(--plms-muted) !important;
	cursor: pointer !important;
}

.plms-app.plms-app .plms-catalog__filter:hover,
.plms-app.plms-app .plms-catalog__filter.is-active {
	border-color: var(--plms-brand) !important;
	background-color: var(--plms-brand) !important;
	color: var(--plms-on-brand) !important;
}

.plms-app.plms-app .plms-dash__tab,
.plms-app.plms-app .plms-login__tab {
	border: 0 !important;
	border-bottom: 2px solid transparent !important;
	border-radius: 0 !important;
	background-color: transparent !important;
	color: var(--plms-muted) !important;
	cursor: pointer !important;
}

.plms-app.plms-app .plms-dash__tab.is-active,
.plms-app.plms-app .plms-login__tab.is-active {
	border-bottom-color: var(--plms-brand) !important;
	color: var(--plms-brand) !important;
	font-weight: 700 !important;
}

.plms-app.plms-app .plms-linkbtn,
.plms-app.plms-app .plms-item__play {
	border: 0 !important;
	border-radius: 0 !important;
	background-color: transparent !important;
	color: var(--plms-brand) !important;
	cursor: pointer !important;
}

.plms-app.plms-app .plms-item__play {
	padding: 0 !important;
	color: inherit !important;
}

.plms-app.plms-app .plms-item__done {
	padding: 3px 12px !important;
	border: 1px solid var(--plms-line) !important;
	border-radius: 999px !important;
	background-color: var(--plms-surface) !important;
	color: var(--plms-muted) !important;
	cursor: pointer !important;
}

.plms-app.plms-app button.plms-outline__row {
	border: 1px solid var(--plms-line) !important;
	background-color: var(--plms-surface) !important;
	color: inherit !important;
	text-align: inherit !important;
	cursor: pointer !important;
}

.plms-app.plms-app button[disabled],
.plms-app.plms-app input[type='submit'][disabled] {
	opacity: 0.6 !important;
	cursor: not-allowed !important;
}

/* Centred brand mark above the sign-in card. */
.plms-login__brand {
	text-align: center;
	margin-bottom: 22px;
}

.plms-login__logo {
	max-width: 190px;
	max-height: 90px;
	width: auto;
	height: auto;
	display: inline-block;
}
