/* WhatsApp chat widget (inc/whatsapp-chat.php). --wa = colour from the settings. */
.sa-wchat {
	--wa: #25D366; --wa-deep: color-mix(in srgb, var(--wa) 55%, #075E54); --ink: #0B1F66; --muted: #7B849C;
	position: fixed; z-index: 9985; right: 43px; bottom: 40px; font-family: Poppins, "Hind Siliguri", system-ui, sans-serif; line-height: 1.4;
}
.sa-wchat *, .sa-wchat *::before, .sa-wchat *::after { box-sizing: border-box; }
.sa-wchat [hidden] { display: none !important; }
.sa-wchat--left { right: auto; left: 24px; bottom: 24px; }

/* floating button */
.sa-wchat .sa-wchat__btn {
	display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer;
	flex-direction: row; font: inherit; color: inherit; text-transform: none; letter-spacing: normal;
}
.sa-wchat--left .sa-wchat__btn { flex-direction: row-reverse; }
.sa-wchat__fab {
	position: relative; flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; color: #fff;
	background: linear-gradient(145deg, color-mix(in srgb, var(--wa) 80%, #fff), var(--wa) 45%, var(--wa-deep));
	box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--wa) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.sa-wchat__fab::before, .sa-wchat__fab::after { /* pulse rings: always running (user), two rings half a beat apart */
	content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); opacity: 0; pointer-events: none; animation: sa-wchat-ring 2.4s ease-out infinite;
}
.sa-wchat__fab::after { animation-delay: 1.2s; }
.sa-wchat__fab svg { position: absolute; width: 30px; height: 30px; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.sa-wchat__fab-x { width: 24px !important; height: 24px !important; opacity: 0; transform: rotate(-90deg) scale(.6); }
.sa-wchat .sa-wchat__btn:hover .sa-wchat__fab { transform: translateY(-3px) scale(1.04); }
.sa-wchat .sa-wchat__btn:focus-visible .sa-wchat__fab { outline: 3px solid color-mix(in srgb, var(--wa) 45%, transparent); outline-offset: 3px; }
.sa-wchat.is-open .sa-wchat__fab-logo { opacity: 0; transform: rotate(90deg) scale(.6); }
.sa-wchat.is-open .sa-wchat__fab-x { opacity: 1; transform: none; }
/* label bubble next to the button (computers) */
.sa-wchat__label {
	position: relative; padding: 10px 16px; border-radius: 14px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap;
	box-shadow: 0 12px 30px -14px rgba(11, 31, 102, .45), 0 0 0 1px rgba(11, 31, 102, .06);
	animation: sa-wchat-label .6s cubic-bezier(.2, .8, .2, 1) 1.4s both; transition: opacity .25s, transform .25s;
}
.sa-wchat__label::after { content: ""; position: absolute; top: 50%; right: -5px; width: 10px; height: 10px; margin-top: -5px; background: #fff; transform: rotate(45deg); box-shadow: 2px -2px 3px -2px rgba(11, 31, 102, .15); }
.sa-wchat--left .sa-wchat__label::after { right: auto; left: -5px; }
.sa-wchat.is-open .sa-wchat__label { opacity: 0; transform: translateX(8px); pointer-events: none; }
@keyframes sa-wchat-ring { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.55); opacity: 0; } }
@keyframes sa-wchat-label { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

/* chat box */
.sa-wchat__panel {
	position: absolute; right: 0; bottom: calc(100% + 16px); width: 370px; max-height: calc(100vh - 150px); display: flex; flex-direction: column; overflow: hidden;
	border-radius: 22px; background: #fff; box-shadow: 0 34px 70px -26px rgba(11, 31, 102, .45), 0 0 0 1px rgba(11, 31, 102, .06);
	transform-origin: bottom right; animation: sa-wchat-open .35s cubic-bezier(.2, .8, .2, 1);
}
.sa-wchat--left .sa-wchat__panel { right: auto; left: 0; transform-origin: bottom left; }
@keyframes sa-wchat-open { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.sa-wchat__head { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 52px 20px 20px; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--wa), var(--wa-deep)); }
.sa-wchat__head::after { content: ""; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 26px solid rgba(255, 255, 255, .08); pointer-events: none; }
.sa-wchat__head-logo { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.sa-wchat__head-logo svg { width: 25px; height: 25px; }
.sa-wchat__head-t { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sa-wchat__head-t b { font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.sa-wchat__head-t small { font-size: 13px; line-height: 1.45; opacity: .9; }
.sa-wchat .sa-wchat__x {
	position: absolute; z-index: 2; right: 12px; top: 12px; display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50% !important;
	background: rgba(255, 255, 255, .16); box-shadow: none; color: #fff; cursor: pointer; transition: background .2s;
}
.sa-wchat .sa-wchat__x:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.sa-wchat__x svg { width: 16px; height: 16px; }
.sa-wchat__body { flex: 1; overflow-y: auto; padding: 14px 14px 16px; background: #F4F7F5 radial-gradient(rgba(7, 94, 84, .06) 1px, transparent 1.4px) 0 0 / 16px 16px; }
.sa-wchat .sa-wchat__reply { display: flex; align-items: center; gap: 8px; margin: 2px 4px 12px; font-size: 12.5px; color: var(--muted); }
.sa-wchat__reply i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.sa-wchat__list { display: grid; gap: 10px; }

/* agent card */
.sa-wchat .sa-wchat__agent {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none;
	box-shadow: 0 8px 20px -16px rgba(11, 31, 102, .5), 0 0 0 1px rgba(11, 31, 102, .06); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.sa-wchat .sa-wchat__agent::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--wa); opacity: 0; transition: opacity .25s; }
.sa-wchat .sa-wchat__agent:hover { transform: translateY(-2px); color: var(--ink); box-shadow: 0 14px 28px -18px rgba(11, 31, 102, .55), 0 0 0 1px color-mix(in srgb, var(--wa) 45%, transparent); }
.sa-wchat .sa-wchat__agent:hover::before { opacity: 1; }
.sa-wchat__av { position: relative; flex: none; width: 48px; height: 48px; }
.sa-wchat__av .sa-wchat__img, .sa-wchat__ini { display: grid; place-items: center; width: 48px; height: 48px; margin: 0; border-radius: 50%; object-fit: cover; }
.sa-wchat__ini { background: linear-gradient(135deg, #FF8A3D, #E31B3D); color: #fff; font-size: 16px; font-weight: 700; }
.sa-wchat__dot { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #A3ABC0; box-shadow: 0 0 0 2.5px #fff; }
.sa-wchat__agent.is-online .sa-wchat__dot { background: #22C55E; }
.sa-wchat__who { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.sa-wchat__who b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.sa-wchat__who small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.sa-wchat__st { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 3px; font-size: 11.5px; font-weight: 600; }
.sa-wchat__st-on { display: none; color: #16A34A; }
.sa-wchat__st-off { color: var(--muted); }
.sa-wchat__agent.is-online .sa-wchat__st-on { display: inline; }
.sa-wchat__agent.is-online .sa-wchat__st-off { display: none; }
.sa-wchat__st em { font-style: normal; font-weight: 500; color: #A3ABC0; }
.sa-wchat__go { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--wa-deep); background: color-mix(in srgb, var(--wa) 14%, #fff); transition: background .25s, color .25s, transform .25s; }
.sa-wchat__go svg { width: 19px; height: 19px; }
.sa-wchat .sa-wchat__agent:hover .sa-wchat__go { background: var(--wa); color: #fff; transform: rotate(-8deg) scale(1.05); }
/* consent */
.sa-wchat .sa-wchat__consent { display: flex; align-items: flex-start; gap: 9px; margin: 12px 4px 0; font-size: 12px; line-height: 1.5; color: #4B5675; cursor: pointer; }
.sa-wchat__consent input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--wa); }
.sa-wchat__consent.is-shake { animation: sa-wchat-shake .4s; color: #E31B3D; }
.sa-wchat.is-locked .sa-wchat__agent { opacity: .55; }
@keyframes sa-wchat-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* [sa_whatsapp] inline button */
.sa-wchat-inline {
	display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px 11px 16px; border-radius: 999px; background: #25D366; color: #fff !important; font-weight: 700; text-decoration: none !important;
	box-shadow: 0 12px 24px -12px rgba(37, 211, 102, .8); transition: transform .25s, box-shadow .25s;
}
.sa-wchat-inline svg { width: 20px; height: 20px; }
.sa-wchat-inline:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -12px rgba(37, 211, 102, .9); }

/* course pages: the course's own "back to top" sits in the corner */
.sa-cl-body .sa-wchat { right: 21px; bottom: 24px; }
.sa-cl-body .sa-wchat--left { left: 24px; right: auto; }

/* make room: scroll-to-top buttons go above the WhatsApp button, toasts keep clear of it */
@media (min-width: 768px) {
	body.sa-wchat-on--right .progress-wrap { bottom: 114px !important; }
	body.sa-wchat-on--right .sa-totop { bottom: 98px !important; }
	body.sa-wchat-on--left .sa-toasts--left { left: 104px !important; }
	.sa-wchat--no-desktop { display: none !important; }
}
@media (max-width: 767px) {
	.sa-wchat { right: 15px; bottom: 16px; }
	.sa-wchat--left { left: 15px; right: auto; }
	.sa-cl-body .sa-wchat { right: 12px; bottom: 93px; } /* above the course page's sticky "Enroll" bar */
	.sa-wchat__fab { width: 56px; height: 56px; }
	.sa-wchat__fab svg { width: 28px; height: 28px; }
	.sa-wchat__label { display: none; }
	.sa-wchat__panel { position: fixed; right: 12px; left: 12px; bottom: 84px; width: auto; max-height: calc(100vh - 110px); }
	.sa-cl-body .sa-wchat__panel { bottom: 161px; max-height: calc(100vh - 190px); }
	body.sa-wchat-on--right .progress-wrap { bottom: 84px !important; }
	body.sa-wchat-on--right .sa-totop { bottom: 161px !important; }
	body.sa-wchat-on--right .sa-toasts--left { right: 81px !important; }
	body.sa-wchat-on--left .sa-toasts--left { left: 81px !important; }
	.sa-wchat--no-mobile { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	.sa-wchat *, .sa-wchat *::before { animation: none !important; transition: none !important; }
	/* the pulse stays on (user wants it always) */
	.sa-wchat .sa-wchat__fab::before, .sa-wchat .sa-wchat__fab::after { animation: sa-wchat-ring 2.4s ease-out infinite !important; }
	.sa-wchat .sa-wchat__fab::after { animation-delay: 1.2s !important; }
}

/* admin preview: the box shown open, in place */
.sa-wchat--preview { position: relative; right: auto; bottom: auto; z-index: auto; }
.sa-wchat--preview .sa-wchat__panel { position: relative; bottom: auto; width: 100%; max-height: none; animation: none; }
.sa-wchat.sa-wchat--preview { position: relative; left: auto; right: auto; bottom: auto; }
.sa-wchat.sa-wchat--preview .sa-wchat__panel { position: relative !important; left: auto; right: auto; bottom: auto; }

/* the theme paints every <button> on hover / focus (red background, pill shape): keep the WhatsApp buttons clean */
.sa-wchat .sa-wchat__btn, .sa-wchat .sa-wchat__btn:hover, .sa-wchat .sa-wchat__btn:focus, .sa-wchat .sa-wchat__btn:active {
	padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; color: inherit !important; outline: 0;
}
.sa-wchat .sa-wchat__btn::before, .sa-wchat .sa-wchat__btn::after { content: none !important; display: none !important; }
.sa-wchat .sa-wchat__x, .sa-wchat .sa-wchat__x:focus { background: rgba(255, 255, 255, .16) !important; border: 0 !important; border-radius: 50% !important; box-shadow: none !important; color: #fff !important; }
.sa-wchat .sa-wchat__x:hover { background: rgba(255, 255, 255, .3) !important; color: #fff !important; }
.sa-wchat .sa-wchat__x::before, .sa-wchat .sa-wchat__x::after { content: none !important; display: none !important; }

/* button text "on mouse over" (setting): hidden, slides in while the pointer is on the button or it has keyboard focus */
.sa-wchat--label-hover .sa-wchat__label { opacity: 0; transform: translateX(10px); pointer-events: none; animation: none; transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.sa-wchat--left.sa-wchat--label-hover .sa-wchat__label { transform: translateX(-10px); }
.sa-wchat--label-hover .sa-wchat__btn:hover .sa-wchat__label, .sa-wchat--label-hover .sa-wchat__btn:focus-visible .sa-wchat__label { opacity: 1; transform: none; }
.sa-wchat--label-hover.is-open .sa-wchat__label { opacity: 0 !important; }
