/*
 * Lesson walkthrough: «ابدأ التطبيق خطوة بخطوة». The steps are written in the
 * lesson text inside .lwnls-walk (a plain list of steps when JavaScript is
 * off); walkthrough.js hides that list, adds the start card and opens the
 * steps one at a time in a window (.lwnls-modal).
 */
.lwnls-walk {
	margin: 1.6em 0;
}
.lwnls-walk__step {
	margin: 0 0 1.4em;
	padding: 16px 20px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 14px;
	background: #fff;
}
.lwnls-walk__step h3 {
	margin: 0 0 0.5em;
	font-size: 19px;
}
.lwnls-walk__img {
	margin: 0.8em 0;
}
.lwnls-walk__img img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--lwnlp-line);
	border-radius: 10px;
}
.lwnls-walk.is-js {
	display: none;
}

/* Start card, in the lesson text */
.lwnls-walkcard {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin: 1.6em 0;
	padding: 20px 22px;
	border: 1px solid var(--lwnlp-line);
	border-inline-start: 5px solid var(--lwnlp-coral);
	border-radius: 14px;
	background: #fff;
}
.lwnls-walkcard__text {
	flex: 1 1 240px;
}
.lwnls-walkcard__title {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 700;
	color: var(--lwnlp-navy);
}
.lwnls-walkcard__sub {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--lwnlp-muted);
}
.lwnls-walkbtn,
.lwnls-modal button.lwnls-btn {
	border: 0;
	border-radius: 10px;
	padding: 12px 22px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	background: var(--lwnlp-coral);
	color: #fff;
}
.lwnls-walkbtn:hover,
.lwnls-modal button.lwnls-btn:hover {
	background: #d13a51;
}
.lwnls-modal button.lwnls-btn--ghost {
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
	border: 1px solid var(--lwnlp-line);
}
.lwnls-modal button.lwnls-btn--ghost:hover {
	background: #e8eef9;
}
.lwnls-modal button.lwnls-btn:disabled {
	opacity: 0.45;
	cursor: default;
}

/* The window */
/* The window is added to <body>, outside the lesson page, so it carries its own colours. */
.lwnls-modal {
	--lwnlp-coral: #e8475f;
	--lwnlp-navy: #143447;
	--lwnlp-ghost: #f4f7fd;
	--lwnlp-green: #12b76a;
	--lwnlp-green-bg: #ecfdf3;
	--lwnlp-green-text: #027a48;
	--lwnlp-line: #e4e9f2;
	--lwnlp-muted: #667085;
}
html.lwnls-modal-open {
	overflow: hidden;
}
.lwnls-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(20, 52, 71, 0.6);
}
.lwnls-modal__panel {
	display: flex;
	flex-direction: column;
	width: min(1120px, 100%);
	height: min(95vh, 980px);
	max-height: 95vh;
	border-radius: 18px;
	background: #fff;
	color: #344054;
	box-shadow: 0 20px 60px rgba(20, 52, 71, 0.35);
	overflow: hidden;
}
.lwnls-modal__panel:focus {
	outline: none;
}
.lwnls-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 32px;
	border-bottom: 1px solid var(--lwnlp-line);
}
.lwnls-modal__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--lwnlp-navy);
}
.lwnls-modal__close {
	flex: none;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--lwnlp-ghost);
	color: var(--lwnlp-navy);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.lwnls-modal__close:hover {
	background: #e8eef9;
}
.lwnls-modal__progress {
	padding: 10px 32px 0;
}
.lwnls-modal__count {
	margin: 0 0 6px;
	font-size: 14px;
	color: var(--lwnlp-muted);
}
.lwnls-modal__track {
	height: 6px;
	border-radius: 3px;
	background: var(--lwnlp-line);
	overflow: hidden;
}
.lwnls-modal__track i {
	display: block;
	height: 100%;
	width: 0;
	background: var(--lwnlp-green);
	transition: width 0.25s;
}
.lwnls-modal__scrollwrap {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
}
/* A soft fade over the bottom edge, and a button, while there is more to read below. */
.lwnls-modal__scrollwrap::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 90px;
	background: linear-gradient(to top, #fff 15%, rgba(255, 255, 255, 0));
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s;
}
.lwnls-modal__scrollwrap.has-more::after {
	opacity: 1;
}
.lwnls-modal button.lwnls-modal__more {
	position: absolute;
	inset-inline: 0;
	bottom: 14px;
	z-index: 2;
	margin-inline: auto;
	width: max-content;
	padding: 9px 20px;
	border: 0;
	border-radius: 999px;
	background: var(--lwnlp-navy);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	box-shadow: 0 4px 14px rgba(20, 52, 71, 0.35);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s;
	animation: lwnls-bob 1.6s ease-in-out infinite;
}
.lwnls-modal__scrollwrap.has-more button.lwnls-modal__more {
	opacity: 1;
	visibility: visible;
}
@keyframes lwnls-bob {
	50% {
		transform: translateY(4px);
	}
}
@media (prefers-reduced-motion: reduce) {
	.lwnls-modal button.lwnls-modal__more {
		animation: none;
	}
}
.lwnls-modal__body {
	flex: 1 1 auto;
	min-width: 0;
	overflow-y: auto;
	scrollbar-width: auto;
	scrollbar-color: #98a2b3 #eef1f6;
	padding: 20px 32px 28px;
	font-size: 18px;
	line-height: 1.9;
}
.lwnls-modal__body h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 0.6em;
	font-size: 21px;
	line-height: 1.5;
	color: var(--lwnlp-navy);
}
.lwnls-modal__badge {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--lwnlp-coral);
	color: #fff;
	font-size: 16px;
}
.lwnls-modal__body p {
	margin: 0 0 0.8em;
}
.lwnls-modal .lwnls-walk__step {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}
.lwnls-modal__body .lwnls-walk__img img {
	box-shadow: 0 2px 10px rgba(20, 52, 71, 0.1);
}
.lwnls-modal__resume {
	padding: 8px 12px;
	border-radius: 10px;
	background: var(--lwnlp-ghost);
	font-size: 15px;
}
.lwnls-modal__resume button {
	margin-inline-start: 8px;
	border: 0;
	background: none;
	color: var(--lwnlp-coral);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}
.lwnls-modal__foot {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 32px;
	border-top: 1px solid var(--lwnlp-line);
	background: #fff;
}
.lwnls-modal pre.lwnls-prompt {
	position: relative;
	padding-top: 44px;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* Last screen: done + help form */
.lwnls-modal__done {
	text-align: center;
	padding: 4px 0 12px;
}
.lwnls-modal__tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--lwnlp-green-bg);
	color: var(--lwnlp-green-text);
	font-size: 30px;
}
.lwnls-modal__done h3 {
	justify-content: center;
	margin: 10px 0 4px;
}
.lwnls-help {
	margin: 12px 0 0;
	padding: 16px;
	border: 1px solid var(--lwnlp-line);
	border-radius: 14px;
	background: var(--lwnlp-ghost);
	text-align: start;
}
.lwnls-help p {
	margin: 0 0 10px;
	font-weight: 700;
	color: var(--lwnlp-navy);
}
.lwnls-help__ask {
	margin: 0 0 12px;
	padding-inline-start: 1.3em;
	font-size: 16px;
	line-height: 1.8;
	color: #344054;
}
.lwnls-help p.lwnls-help__note {
	margin: 22px 0 0;
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.7;
	color: #98a2b3;
}
.lwnls-help label {
	display: block;
	margin: 0 0 4px;
	font-size: 14px;
	color: var(--lwnlp-muted);
}
.lwnls-help input[type="email"],
.lwnls-help textarea {
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 12px;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 16px;
	color: #344054;
}
.lwnls-help input:focus,
.lwnls-help textarea:focus {
	border-color: var(--lwnlp-coral);
	outline: none;
	box-shadow: 0 0 0 3px #fdecef;
}
.lwnls-help__hp {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.lwnls-help p.lwnls-help__error {
	margin: 0 0 10px;
	padding: 8px 12px;
	border-radius: 8px;
	background: #fef3f2;
	color: #b42318;
	font-size: 15px;
	font-weight: 400;
}
.lwnls-help__sent {
	margin: 12px 0 0;
	padding: 16px;
	border-radius: 14px;
	background: var(--lwnlp-green-bg);
	color: var(--lwnlp-green-text);
	font-weight: 700;
	text-align: center;
}

@media (max-width: 600px) {
	.lwnls-modal {
		padding: 0;
	}
	.lwnls-modal__panel {
		width: 100%;
		max-height: none;
		height: 100%;
		border-radius: 0;
	}
	.lwnls-modal__body {
		font-size: 16.5px;
		padding: 16px 20px 20px;
	}
	.lwnls-modal__head,
	.lwnls-modal__progress,
	.lwnls-modal__foot {
		padding-inline: 20px;
	}
	.lwnls-modal__foot button.lwnls-btn {
		flex: 1 1 0;
		padding-inline: 10px;
	}
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .lwnls-walk__step,
	:root:not([data-theme="light"]) .lwnls-walkcard {
		background: #14222b;
	}
	:root:not([data-theme="light"]) .lwnls-modal__panel,
	:root:not([data-theme="light"]) .lwnls-modal__foot {
		background: #14222b;
		color: #d0d9e0;
	}
	:root:not([data-theme="light"]) .lwnls-modal__scrollwrap::after {
		background: linear-gradient(to top, #14222b 15%, rgba(20, 34, 43, 0));
	}
	:root:not([data-theme="light"]) .lwnls-modal button.lwnls-modal__more {
		background: #e6edf3;
		color: #14222b;
	}
	:root:not([data-theme="light"]) .lwnls-modal {
		--lwnlp-navy: #e6edf3;
		--lwnlp-ghost: #1d2f3a;
		--lwnlp-line: #2c3e4a;
		--lwnlp-muted: #9fb0bd;
	}
	:root:not([data-theme="light"]) .lwnls-help input[type="email"],
	:root:not([data-theme="light"]) .lwnls-help textarea {
		background: #0f1a21;
		border-color: #2c3e4a;
		color: #d0d9e0;
	}
}

/* Magnifier on step pictures */
.lwnls-modal .lwnls-walk__img.has-zoom {
	position: relative;
}
.lwnls-modal .lwnls-walk__img.has-zoom img {
	cursor: zoom-in;
}
.lwnls-modal .lwnls-zoombtn {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-start: 10px;
	z-index: 2;
	padding: 6px 12px;
	border: 0;
	border-radius: 999px;
	background: rgba(20, 52, 71, 0.88);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.lwnls-modal .lwnls-zoombtn:hover {
	background: var(--lwnlp-coral);
}
.lwnls-lens {
	position: absolute;
	z-index: 3;
	display: none;
	width: min(780px, 96%);
	height: 340px;
	border: 3px solid var(--lwnlp-coral);
	border-radius: 12px;
	background-color: #fff;
	background-repeat: no-repeat;
	box-shadow: 0 6px 22px rgba(20, 52, 71, 0.4);
	pointer-events: none;
}
.lwnls-viewer {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	background: rgba(10, 22, 30, 0.94);
}
.lwnls-viewer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 20px;
	color: #d0d9e0;
	font-size: 15px;
}
.lwnls-viewer__close {
	flex: none;
	padding: 8px 18px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #143447;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.lwnls-viewer__scroll {
	flex: 1 1 auto;
	overflow: auto;
	direction: ltr;
	padding: 0 20px 20px;
}
.lwnls-viewer__scroll img {
	display: block;
	max-width: none;
	width: auto;
	height: auto;
	margin: 0 auto;
	border-radius: 6px;
	background: #fff;
}
