/* MedPlus Seasons v1.0.0 */

/* ---------- theme tokens ---------- */
.mps-t-blackfriday { --mps-bg: linear-gradient(90deg, #050505, #161616 50%, #050505); --mps-acc: #f5c542; --mps-acc-ink: #111; --mps-tx: #fff; --mps-sub: #b8b8b8; --mps-chip: rgba(245, 197, 66, .12); --mps-line: rgba(245, 197, 66, .35); }
.mps-t-christmas   { --mps-bg: linear-gradient(90deg, #0b1f3a, #12305a 55%, #0f2a52); --mps-acc: #ef4444; --mps-acc-ink: #fff; --mps-tx: #fff; --mps-sub: #b9c7ea; --mps-chip: rgba(255, 255, 255, .1); --mps-line: rgba(255, 255, 255, .22); }
.mps-t-newyear     { --mps-bg: linear-gradient(90deg, #0b1f3a, #2a2470 55%, #3b2a8a); --mps-acc: #fbbf24; --mps-acc-ink: #1f1300; --mps-tx: #fff; --mps-sub: #c9c6f2; --mps-chip: rgba(255, 255, 255, .1); --mps-line: rgba(251, 191, 36, .4); }
.mps-t-ramadan     { --mps-bg: linear-gradient(90deg, #0b1f3a, #1b1d54 55%, #241c5e); --mps-acc: #fbbf24; --mps-acc-ink: #1f1300; --mps-tx: #fff; --mps-sub: #d6cfa8; --mps-chip: rgba(251, 191, 36, .12); --mps-line: rgba(251, 191, 36, .4); }
.mps-t-eid         { --mps-bg: linear-gradient(90deg, #0b1f3a, #0e4f63 55%, #0f766e); --mps-acc: #fcd34d; --mps-acc-ink: #1f1300; --mps-tx: #fff; --mps-sub: #bfe7e3; --mps-chip: rgba(255, 255, 255, .1); --mps-line: rgba(252, 211, 77, .4); }
.mps-t-doctors     { --mps-bg: linear-gradient(90deg, #2f51c4, #3e64de 45%, #0ea5e9); --mps-acc: #fff; --mps-acc-ink: #2f51c4; --mps-tx: #fff; --mps-sub: #dbe7ff; --mps-chip: rgba(255, 255, 255, .16); --mps-line: rgba(255, 255, 255, .35); }

.mps-bar svg, .mps-hero-card svg, .mps-offer svg { width: 1em; height: 1em; flex: none; display: block; }

/* ---------- top bar ---------- */
.mps-bar {
	position: relative; z-index: 9999; overflow: hidden;
	background: var(--mps-bg); color: var(--mps-tx);
	font-family: Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.3;
	border-bottom: 1px solid var(--mps-line);
	animation: mpsDrop .6s cubic-bezier(.2, .8, .2, 1) both;
	transition: max-height .35s ease, opacity .35s ease;
	max-height: 200px;
}
.mps-bar.is-closing { max-height: 0; opacity: 0; }
@keyframes mpsDrop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.mps-bar-in {
	position: relative; z-index: 2; max-width: 1240px; margin: 0 auto;
	display: flex; align-items: center; gap: 16px; padding: 10px 56px 10px 20px; min-height: 58px;
}
.mps-badge {
	display: inline-flex; align-items: center; gap: 8px; flex: none;
	padding: 7px 12px; border-radius: 999px; background: var(--mps-acc); color: var(--mps-acc-ink);
	font-family: "Encode Sans", Inter, sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .08em; white-space: nowrap;
}
.mps-badge svg { font-size: 15px; }
.mps-msg { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.mps-msg b { font-family: "Encode Sans", Inter, sans-serif; font-size: 16px; font-weight: 800; white-space: nowrap; color: var(--mps-tx); }
.mps-msg span { color: var(--mps-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mps-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.mps-cta {
	display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 12px;
	background: #fff; color: #0f172a !important; font-weight: 700; font-size: 14px; text-decoration: none !important; white-space: nowrap;
	transition: transform .2s, box-shadow .2s;
}
.mps-t-blackfriday .mps-cta { background: var(--mps-acc); color: #111 !important; }
.mps-t-doctors .mps-cta { color: #2f51c4 !important; }
.mps-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.mps-cta svg { font-size: 15px; }
.mps-x {
	position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; padding: 0 !important; border: 0 !important; border-radius: 50% !important;
	background: rgba(255, 255, 255, .1) !important; color: var(--mps-tx) !important; font-size: 20px !important; line-height: 1 !important;
	cursor: pointer; min-height: 0 !important; box-shadow: none !important;
}
.mps-x:hover { background: rgba(255, 255, 255, .2) !important; }

/* countdown */
.mps-cd { display: inline-flex; gap: 4px; font-variant-numeric: tabular-nums; }
.mps-cd > span { display: inline-flex; align-items: baseline; gap: 1px; padding: 5px 7px; border-radius: 8px; background: var(--mps-chip); border: 1px solid var(--mps-line); }
.mps-cd b { font-family: "Encode Sans", Inter, sans-serif; font-weight: 800; font-size: 15px; color: var(--mps-tx); min-width: 18px; text-align: center; }
.mps-cd i { font-style: normal; font-size: 11px; color: var(--mps-sub); }

/* coupon */
.mps-code {
	display: inline-flex !important; align-items: center; gap: 8px; height: 38px; padding: 0 12px !important;
	border: 1.5px dashed var(--mps-acc) !important; border-radius: 12px !important; background: var(--mps-chip) !important;
	color: var(--mps-tx) !important; cursor: pointer; font-family: inherit; min-height: 0 !important; box-shadow: none !important; text-transform: none !important;
}
.mps-code small { font-size: 10px; letter-spacing: .1em; color: var(--mps-sub); font-weight: 700; }
.mps-code b { font-family: "Encode Sans", Inter, sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .06em; }
.mps-code em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--mps-acc); }
.mps-code.is-copied { border-style: solid !important; }

/* per-theme bar decoration */
.mps-bar-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.mps-t-blackfriday .mps-bar-fx {
	background:
		linear-gradient(105deg, transparent 40%, rgba(245, 197, 66, .22) 50%, transparent 60%) -100% 0 / 60% 100% no-repeat,
		repeating-linear-gradient(-45deg, rgba(245, 197, 66, .06) 0 10px, transparent 10px 20px);
	animation: mpsShine 4.5s ease-in-out infinite;
}
@keyframes mpsShine { 0% { background-position: -100% 0, 0 0; } 60%, 100% { background-position: 250% 0, 0 0; } }
.mps-t-christmas .mps-bar-fx {
	background:
		radial-gradient(circle at 10px -2px, #fff 7px, transparent 8px) 0 0 / 26px 10px repeat-x,
		radial-gradient(circle, rgba(255, 255, 255, .5) 1px, transparent 1.5px) 0 0 / 22px 22px;
	opacity: .9;
}
.mps-t-newyear .mps-bar-fx, .mps-t-eid .mps-bar-fx {
	background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1px, transparent 1.6px), radial-gradient(circle, rgba(251, 191, 36, .6) 1px, transparent 1.6px);
	background-size: 38px 38px, 57px 57px; background-position: 0 0, 19px 11px;
	animation: mpsTwinkle 3s ease-in-out infinite alternate;
}
.mps-t-ramadan .mps-bar-fx {
	background:
		radial-gradient(circle at 92% 50%, rgba(251, 191, 36, .25), transparent 30%),
		radial-gradient(circle, rgba(253, 230, 138, .6) 1px, transparent 1.6px) 0 0 / 46px 46px;
	animation: mpsTwinkle 4s ease-in-out infinite alternate;
}
.mps-t-doctors .mps-bar-fx {
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='58' viewBox='0 0 240 58'%3E%3Cpath d='M0 29h70l8-14 10 30 10-34 8 18h134' fill='none' stroke='%23ffffff' stroke-opacity='.22' stroke-width='2'/%3E%3C/svg%3E") 0 50% / 240px 58px repeat-x;
	animation: mpsEcgMove 6s linear infinite;
}
@keyframes mpsTwinkle { from { opacity: .35; } to { opacity: .9; } }
@keyframes mpsEcgMove { to { background-position: -240px 50%; } }

/* ---------- effects canvas ---------- */
.mps-fx { position: fixed; inset: 0; z-index: 9998; pointer-events: none; }

/* ---------- hero card (home) ---------- */
.mps-hero-card {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap; width: fit-content; max-width: 100%;
	margin: 18px 0 0; padding: 12px 14px 12px 12px; border-radius: 18px;
	background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
	border: 1px solid var(--mps-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	color: #fff !important; text-decoration: none !important; font-family: Inter, sans-serif;
	box-shadow: 0 20px 40px rgba(0, 0, 0, .25); position: relative; overflow: hidden;
	animation: mpsPop .7s .3s cubic-bezier(.2, .8, .2, 1) both;
	transition: transform .25s, border-color .25s;
}
.mps-hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .14) 50%, transparent 65%) -150% 0 / 60% 100% no-repeat; animation: mpsShine 5s ease-in-out 1s infinite; pointer-events: none; }
.mps-hero-card:hover { transform: translateY(-2px); border-color: var(--mps-acc); }
@keyframes mpsPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.mps-hc-ic { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--mps-acc); color: var(--mps-acc-ink); font-size: 20px; flex: none; }
.mps-t-doctors .mps-hc-ic { color: #2f51c4; }
.mps-hc-txt { display: flex; flex-direction: column; line-height: 1.25; }
.mps-hc-txt small { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--mps-acc); }
.mps-t-doctors .mps-hc-txt small { color: #bfe3ff; }
.mps-hc-txt b { font-family: "Encode Sans", Inter, sans-serif; font-size: 16px; font-weight: 800; color: #fff; }
.mps-hc-go { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.mps-cd-sm > span { padding: 4px 6px; }
.mps-cd-sm b { font-size: 14px; }
.mps-code-sm { height: 34px; }
.mps-hero-card .mps-cd > span, .mps-hero-card .mps-code { --mps-chip: rgba(255, 255, 255, .08); }

/* lanterns (Ramadan / Eid, home hero) */
.mps-lanterns { position: absolute; top: 0; right: 4%; display: flex; gap: 26px; z-index: 0; pointer-events: none; }
.mps-lantern { position: relative; display: block; width: 46px; padding-top: var(--len); transform-origin: 50% 0; animation: mpsSwing 4.5s ease-in-out infinite; }
.mps-lantern::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: var(--len); background: linear-gradient(rgba(212, 160, 23, 0), #d4a017); }
.mps-lantern svg { display: block; width: 46px; height: auto; margin-top: -4px; filter: drop-shadow(0 0 18px rgba(251, 191, 36, .55)); }
.mps-l1 { animation-delay: -1.5s; animation-duration: 5.2s; }
.mps-l2 { animation-delay: -3s; animation-duration: 4s; }
.mps-l1 svg { width: 56px; }
@keyframes mpsSwing { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }

/* ---------- offer box (course pages) ---------- */
.mps-offer {
	display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center;
	margin: 0 0 18px; padding: 14px; border-radius: 16px;
	background: var(--mps-bg); color: var(--mps-tx); font-family: Inter, sans-serif;
}
.mps-offer-ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--mps-acc); color: var(--mps-acc-ink); font-size: 18px; }
.mps-offer-txt { display: flex; flex-direction: column; line-height: 1.3; }
.mps-offer-txt b { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--mps-acc); }
.mps-t-doctors .mps-offer-txt b { color: #fff; }
.mps-offer-txt span { font-size: 13px; color: var(--mps-sub); }
.mps-code-block { grid-column: 1 / -1; width: 100%; justify-content: center; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
	.mps-msg span { display: none; }
}
@media (max-width: 720px) {
	.mps-bar-in { flex-wrap: wrap; gap: 8px 10px; padding: 10px 46px 10px 14px; min-height: 0; }
	.mps-badge { padding: 5px 10px; font-size: 11px; }
	.mps-msg { flex: 1 1 auto; }
	.mps-msg b { font-size: 14px; white-space: normal; }
	.mps-actions { width: 100%; justify-content: flex-start; flex-wrap: nowrap; gap: 6px; }
	.mps-cta { height: 34px; padding: 0 11px; font-size: 13px; margin-left: auto; gap: 6px; }
	.mps-code { height: 34px; padding: 0 9px !important; gap: 0; }
	.mps-code small, .mps-code em { display: none; }
	.mps-code b { font-size: 13px; }
	.mps-cd b { font-size: 13px; min-width: 15px; }
	.mps-cd > span { padding: 4px 5px; }
	.mps-bar .mps-cd > span:last-child { display: none; }
	.mps-x { top: 10px; transform: none; right: 8px; width: 28px; height: 28px; font-size: 18px !important; }
	.mps-hero-card { gap: 10px; padding: 10px; }
	.mps-hc-txt b { font-size: 14px; }
	.mps-lanterns { right: 2%; gap: 14px; transform: scale(.72); transform-origin: top right; }
}

@media (prefers-reduced-motion: reduce) {
	.mps-bar, .mps-bar-fx, .mps-hero-card, .mps-hero-card::after, .mps-lantern { animation: none !important; }
}
