/* MW Campaign Widgets — matches morshedworx.com: Vazirmatn, green #1E8943, yellow #FFC501, 9–16px radii */
:root {
	--mwcw-green: #1E8943;
	--mwcw-green-d: #176B34;
	--mwcw-yellow: #FFC501;
	--mwcw-ink: #0F172A;
	--mwcw-text: #555;
	--mwcw-red: #D92D20;
	--mwcw-font: "Vazirmatn", "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

[class^="mwcw-"], [class*=" mwcw-"] { box-sizing: border-box; font-family: var(--mwcw-font); }
.mwcw-card svg, .mwcw-topbar svg, .mwcw-fab svg, .mwcw-hero svg, .mwcw-modal svg, .mwcw-side svg, .mwcw-auth svg { flex: none; display: inline-block; vertical-align: middle; }

/* Buttons — same as the site's green CTA */
.mwcw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--mwcw-green); color: #fff !important; text-decoration: none !important;
	font-size: 14px; font-weight: 600; line-height: 1.4;
	padding: 10px 20px; border-radius: 9px; border: 1px solid var(--mwcw-green);
	transition: background .15s ease, transform .15s ease; white-space: nowrap;
}
.mwcw-btn:hover { background: var(--mwcw-green-d); border-color: var(--mwcw-green-d); }
.mwcw-btn:active { transform: translateY(1px); }
.mwcw-btn:focus-visible, .mwcw-hero:focus-visible, .mwcw-fab__btn:focus-visible, .mwcw-x:focus-visible { outline: 2px solid var(--mwcw-ink); outline-offset: 2px; }
.mwcw-btn--ghost { background: transparent; color: var(--mwcw-green) !important; }
.mwcw-btn--ghost:hover { background: rgba(30,137,67,.08); }
.mwcw-btn--block { display: flex; width: 100%; }

.mwcw-badge {
	position: absolute; top: 12px; left: 12px;
	background: var(--mwcw-red); color: #fff; font-size: 11px; font-weight: 700;
	padding: 2px 9px; border-radius: 999px; line-height: 1.6;
}
.mwcw-badge--static { position: absolute; }
.mwcw-pill { display: inline-block; background: var(--mwcw-red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.mwcw-kicker { display: block; font-size: 12px; font-weight: 700; color: var(--mwcw-green); margin-bottom: 2px; }

.mwcw-x {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border-radius: 8px; border: 0; padding: 0;
	background: transparent; color: inherit; cursor: pointer; opacity: .7;
}
.mwcw-x:hover { opacity: 1; background: rgba(0,0,0,.06); }

/* ---------- Card (blog, pages, account, courses, thank-you) ---------- */
.mwcw-card {
	position: relative; display: flex; align-items: center; gap: 16px;
	margin: 28px 0; padding: 18px 20px;
	background: #fff; border: 1px solid rgba(15,23,42,.08); border-radius: 16px;
	box-shadow: 0 1px 2px rgba(15,23,42,.04);
	color: var(--mwcw-text); text-align: right; direction: rtl;
}
.mwcw-card::before { content: ""; position: absolute; inset-block: 14px; right: 0; width: 4px; border-radius: 4px 0 0 4px; background: var(--mwcw-yellow); }
.mwcw-card__icon {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; border-radius: 12px; background: #FFF4C7; color: var(--mwcw-ink);
}
.mwcw-card__body { flex: 1 1 auto; min-width: 0; }
.mwcw-card__title { display: block; color: var(--mwcw-ink); font-size: 18px; font-weight: 700; line-height: 1.5; margin: 0; }
.mwcw-card__text { display: block; font-size: 14px; line-height: 1.8; margin-top: 2px; }
.mwcw-card__actions { display: flex; flex-direction: column; gap: 8px; flex: none; }
.mwcw-card .mwcw-badge { top: -9px; left: 16px; }
.mwcw-card--band { max-width: 1000px; margin: 32px auto; }
.mwcw-card--end { background: #FFFBEA; border-color: #FFE58A; }
.mwcw-section { padding: 0 16px; }

@media (max-width: 680px) {
	.mwcw-card { flex-direction: column; align-items: stretch; text-align: right; }
	.mwcw-card__icon { width: 40px; height: 40px; }
	.mwcw-card__actions .mwcw-btn { width: 100%; }
}

/* ---------- Top bar ---------- */
.mwcw-topbar {
	position: relative; z-index: 99; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
	background: var(--mwcw-ink); color: #fff; font-size: 14px; line-height: 1.5;
	padding: 9px 48px; text-align: center; direction: rtl;
}
.mwcw-topbar__link { display: inline-flex; align-items: center; gap: 6px; color: var(--mwcw-yellow) !important; font-weight: 700; text-decoration: none !important; }
.mwcw-topbar__link:hover { text-decoration: underline !important; }
.mwcw-topbar .mwcw-x { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #fff; }
.mwcw-topbar .mwcw-x:hover { background: rgba(255,255,255,.12); }
@media (max-width: 680px) { .mwcw-topbar { font-size: 13px; gap: 6px 10px; padding: 8px 40px 8px 12px; } }

/* ---------- Floating button (bottom-right; the chat bubble lives bottom-left) ---------- */
.mwcw-fab { position: fixed; right: 20px; bottom: 20px; z-index: 9990; direction: rtl; }
.mwcw-fab__btn {
	display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px;
	background: var(--mwcw-green); color: #fff; border: 0; border-radius: 999px; cursor: pointer;
	font-family: var(--mwcw-font); font-size: 14px; font-weight: 700;
	box-shadow: 0 6px 20px rgba(15,23,42,.18); transition: background .15s ease, transform .15s ease;
}
.mwcw-fab__btn:hover { background: var(--mwcw-green-d); transform: translateY(-1px); }
.mwcw-fab__menu {
	position: absolute; right: 0; bottom: 60px; width: 290px;
	background: #fff; border-radius: 16px; padding: 8px;
	box-shadow: 0 12px 40px rgba(15,23,42,.18); border: 1px solid rgba(15,23,42,.06);
	opacity: 0; transform: translateY(8px) scale(.98); transform-origin: bottom right;
	pointer-events: none; transition: opacity .16s ease, transform .16s ease;
}
.mwcw-fab.is-open .mwcw-fab__menu { opacity: 1; transform: none; pointer-events: auto; }
.mwcw-fab__menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--mwcw-ink) !important; text-decoration: none !important; }
.mwcw-fab__menu a:hover, .mwcw-fab__menu a:focus-visible { background: #FFF4C7; outline: none; }
.mwcw-fab__menu a > svg { color: var(--mwcw-green); width: 22px; height: 22px; }
.mwcw-fab__menu b { display: block; font-size: 14px; font-weight: 700; }
.mwcw-fab__menu small { display: block; font-size: 12px; color: var(--mwcw-text); }
@media (max-width: 680px) { .mwcw-fab { right: 14px; bottom: 14px; } .mwcw-fab__btn span { display: none; } .mwcw-fab__btn { width: 52px; height: 52px; padding: 0; justify-content: center; } }

/* ---------- Exit popup ---------- */
.mwcw-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; direction: rtl; }
.mwcw-modal[hidden] { display: none; }
.mwcw-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); animation: mwcw-fade .18s ease; }
.mwcw-modal__box {
	position: relative; width: 100%; max-width: 440px; background: var(--mwcw-yellow);
	background: linear-gradient(180deg, #FFC501 0%, #FFD84D 100%);
	border-radius: 16px; padding: 32px 28px 24px; text-align: center; color: var(--mwcw-ink);
	box-shadow: 0 24px 60px rgba(15,23,42,.3); animation: mwcw-pop .2s ease;
}
.mwcw-modal__box .mwcw-x { position: absolute; top: 10px; left: 10px; }
.mwcw-modal__box .mwcw-badge { top: 14px; right: 14px; left: auto; }
.mwcw-modal__icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.45); margin-bottom: 10px; }
.mwcw-modal__icon svg { width: 28px; height: 28px; }
.mwcw-modal__box h3 { font-family: var(--mwcw-font); font-size: 22px; font-weight: 700; line-height: 1.5; margin: 0 0 8px; color: #000; }
.mwcw-modal__box p { font-size: 15px; line-height: 1.8; margin: 0 0 18px; color: rgba(0,0,0,.72); }
.mwcw-modal__alt { display: inline-block; margin-top: 12px; font-size: 13px; color: rgba(0,0,0,.7) !important; text-decoration: underline !important; }
@keyframes mwcw-fade { from { opacity: 0; } }
@keyframes mwcw-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Home hero strip (under the 4 path cards, same glass style) ---------- */
.mwcw-hero {
	position: relative; display: flex; align-items: center; gap: 16px; grid-column: 1 / -1;
	margin-top: 14px; padding: 16px 20px; width: 100%;
	background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.1); border-radius: 16px;
	color: var(--mwcw-ink) !important; text-decoration: none !important; text-align: right;
	transition: background .15s ease;
}
.mwcw-hero:hover { background: rgba(255,255,255,.3); }
.mwcw-hero__icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.55); flex: none; }
.mwcw-hero__body { flex: 1 1 auto; }
.mwcw-hero__body strong { display: block; font-size: 18px; font-weight: 700; color: var(--mwcw-ink); }
.mwcw-hero__body span { display: block; font-size: 14px; line-height: 1.8; color: rgba(0,0,0,.7); }
.mwcw-hero__cta { display: inline-flex; align-items: center; gap: 8px; flex: none; background: var(--mwcw-green); color: #fff; font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 8px; }
.mwcw-hero .mwcw-badge { top: -9px; left: 16px; }
@media (max-width: 680px) { .mwcw-hero { flex-direction: column; align-items: stretch; } .mwcw-hero__cta { justify-content: center; } }

/* ---------- Footer link ---------- */
.mwcw-footer-link { text-decoration: none; }

/* ---------- Blog sticky side card ---------- */
.mwcw-side {
	position: fixed; left: 24px; top: 50%; z-index: 90; width: 240px;
	transform: translate(-16px, -50%); opacity: 0; pointer-events: none;
	background: #fff; border-radius: 16px; padding: 18px; border: 1px solid rgba(15,23,42,.08);
	box-shadow: 0 10px 30px rgba(15,23,42,.12); text-align: right; direction: rtl;
	transition: opacity .2s ease, transform .2s ease;
}
.mwcw-side.is-in { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.mwcw-side .mwcw-x { position: absolute; top: 8px; left: 8px; }
.mwcw-side .mwcw-card__icon { margin-bottom: 10px; }
.mwcw-side strong { display: block; font-size: 16px; font-weight: 700; color: var(--mwcw-ink); line-height: 1.5; }
.mwcw-side span:not(.mwcw-card__icon) { display: block; font-size: 13px; line-height: 1.8; color: var(--mwcw-text); margin: 4px 0 12px; }

/* ---------- Blog auto-links ---------- */
a.mwcw-inline-link { color: var(--mwcw-green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }

/* ---------- Auth pages ---------- */
.mwcw-auth { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 18px auto; padding: 12px 16px; max-width: 520px; background: rgba(255,255,255,.6); border-radius: 12px; font-size: 14px; color: var(--mwcw-ink); text-align: center; }
.mwcw-auth a { color: var(--mwcw-green); font-weight: 700; }

/* Hide the floating button while the exit popup is open */
body.mwcw-modal-open .mwcw-fab { display: none; }

@media (prefers-reduced-motion: reduce) {
	.mwcw-fab__menu, .mwcw-side, .mwcw-modal__box, .mwcw-modal__backdrop, .mwcw-btn, .mwcw-fab__btn { transition: none; animation: none; }
}

/* Theme (Eduma) styles every <button>: reset ours */
.mwcw-x, .mwcw-fab__btn { box-shadow: none; text-transform: none; letter-spacing: 0; min-height: 0; line-height: 1; }
.mwcw-x { background: transparent !important; color: inherit !important; border: 0 !important; padding: 0 !important; width: 28px !important; height: 28px !important; }
.mwcw-x:hover { background: rgba(0,0,0,.06) !important; }
.mwcw-topbar .mwcw-x { color: #fff !important; }
.mwcw-topbar .mwcw-x:hover { background: rgba(255,255,255,.12) !important; }
.mwcw-fab__btn { background: var(--mwcw-green) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; }
.mwcw-fab__btn:hover { background: var(--mwcw-green-d) !important; }

/* Inside the blog's own sticky sidebar */
.mwcw-side.mwcw-side--inline { position: static; transform: none; opacity: 1; pointer-events: auto; width: auto; margin-top: 16px; box-shadow: none; }

/* Inside the LearnPress lesson viewer: keep only the in-lesson card (no bar / floating button over the player) */
body.course-item-popup .mwcw-topbar,
body.course-item-popup .mwcw-fab,
body.course-item-popup .mwcw-modal { display: none !important; }

/* Narrow columns (e.g. the booking funnel): stack the card */
.mwcw-section { container-type: inline-size; }
@container (max-width: 620px) {
	.mwcw-card { flex-direction: column; align-items: stretch; }
	.mwcw-card__actions .mwcw-btn { width: 100%; }
}
