/* NursingStudy Chat & Order Assist — scoped to #nsca so themes can't restyle it. */
#nsca {
	--nsca-c: #0f7a6e;
	--nsca-ink: #14213d;
	--nsca-muted: #5a6474;
	--nsca-line: #dce1e7;
	--nsca-soft: #f3f6f8;
	--nsca-ok: #22c55e;
	--nsca-away: #f59e0b;
	--nsca-lift: 0px;
	--nsca-gap: 20px;
	position: fixed;
	z-index: 9995;
	bottom: calc(var(--nsca-gap) + var(--nsca-lift) + env(safe-area-inset-bottom, 0px));
	right: var(--nsca-gap);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--nsca-ink);
	transition: bottom .25s ease;
	pointer-events: none;
}
#nsca > * { pointer-events: auto; }
#nsca.nsca--left { right: auto; left: var(--nsca-gap); align-items: flex-start; }
#nsca.is-unavailable { display: none; }
#nsca *, #nsca *::before, #nsca *::after { box-sizing: border-box; }
#nsca [hidden] { display: none !important; }
#nsca button, #nsca textarea, #nsca a { font: inherit; letter-spacing: normal; text-transform: none; }

/* ---------------------------------------------------------------- button */
#nsca .nsca-fab {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	margin: 0;
	padding: 0 22px 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--nsca-c);
	color: #fff;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 10px 28px -8px rgba(15, 42, 38, .55), 0 2px 6px rgba(15, 42, 38, .18);
	transition: transform .15s ease, box-shadow .15s ease;
}
#nsca .nsca-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(15, 42, 38, .6), 0 2px 6px rgba(15, 42, 38, .2); }
#nsca .nsca-fab:focus-visible { outline: 3px solid #93c5fd; outline-offset: 3px; }
#nsca .nsca-fab__icon { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; }
#nsca .nsca-fab__icon svg { width: 26px; height: 26px; }
#nsca .nsca-fab__label { white-space: nowrap; }
#nsca .nsca-fab__dot {
	position: absolute;
	top: 11px;
	left: 35px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--nsca-ok);
	box-shadow: 0 0 0 2.5px var(--nsca-c);
}
#nsca.is-away .nsca-fab__dot { background: var(--nsca-away); }
#nsca.is-open .nsca-fab__dot { display: none; }

/* ----------------------------------------------------------------- nudge */
#nsca .nsca-nudge {
	position: relative;
	display: flex;
	align-items: flex-start;
	max-width: 270px;
	margin: 0 4px 0 0;
	background: #fff;
	border: 1px solid var(--nsca-line);
	border-radius: 14px 14px 4px 14px;
	box-shadow: 0 12px 30px -10px rgba(20, 33, 61, .35);
	animation: nsca-in .3s ease both;
}
#nsca.nsca--left .nsca-nudge { margin: 0 0 0 4px; border-radius: 14px 14px 14px 4px; }
#nsca .nsca-nudge__text {
	flex: 1;
	margin: 0;
	padding: 12px 6px 12px 14px;
	border: 0;
	background: none;
	color: var(--nsca-ink);
	font-size: 14.5px;
	line-height: 1.4;
	text-align: left;
	cursor: pointer;
}
#nsca .nsca-nudge__x {
	flex: none;
	display: inline-flex;
	margin: 6px 6px 0 0;
	padding: 4px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--nsca-muted);
	cursor: pointer;
}
#nsca .nsca-nudge__x svg { width: 16px; height: 16px; }
#nsca .nsca-nudge__x:hover { background: var(--nsca-soft); color: var(--nsca-ink); }

/* ----------------------------------------------------------------- panel */
#nsca .nsca-panel {
	width: 360px;
	max-width: calc(100vw - 2 * var(--nsca-gap));
	max-height: calc(100vh - 120px - var(--nsca-lift));
	overflow: auto;
	margin: 0;
	background: #fff;
	border: 1px solid var(--nsca-line);
	border-radius: 16px;
	box-shadow: 0 24px 60px -18px rgba(20, 33, 61, .45);
	animation: nsca-in .2s ease both;
}
#nsca .nsca-panel__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 14px 14px 16px;
	background: var(--nsca-c);
	color: #fff;
}
#nsca .nsca-avatar {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
}
#nsca .nsca-panel__who { flex: 1; min-width: 0; display: grid; gap: 2px; }
#nsca .nsca-panel__who strong { font-size: 15.5px; font-weight: 700; color: #fff; line-height: 1.25; }
#nsca .nsca-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255, 255, 255, .86); line-height: 1.3; }
#nsca .nsca-status i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--nsca-ok); }
#nsca.is-away .nsca-status i { background: var(--nsca-away); }
#nsca .nsca-panel__close {
	flex: none;
	display: inline-flex;
	align-self: flex-start;
	margin: 0;
	padding: 6px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: #fff;
	cursor: pointer;
}
#nsca .nsca-panel__close:hover { background: rgba(255, 255, 255, .14); }
#nsca .nsca-panel__close:focus-visible { outline: 2px solid #fff; }

#nsca .nsca-panel__body { display: grid; gap: 10px; padding: 16px; }
#nsca .nsca-greet { margin: 0; font-size: 15px; color: var(--nsca-ink); }
#nsca .nsca-about {
	margin: 0;
	padding: 9px 12px;
	border-left: 3px solid var(--nsca-c);
	border-radius: 0 8px 8px 0;
	background: var(--nsca-soft);
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--nsca-ink);
}
#nsca .nsca-about span { font-weight: 600; }
#nsca .nsca-about b { display: block; margin-top: 2px; font-weight: 500; color: var(--nsca-muted); }
#nsca .nsca-msg-label { margin: 4px 0 -4px; font-size: 13px; font-weight: 600; color: var(--nsca-muted); }
#nsca .nsca-msg {
	display: block;
	width: 100%;
	min-height: 84px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--nsca-line);
	border-radius: 10px;
	background: #fff;
	color: var(--nsca-ink);
	font-size: 14.5px;
	line-height: 1.45;
	resize: vertical;
	box-shadow: none;
}
#nsca .nsca-msg:focus { outline: none; border-color: var(--nsca-c); box-shadow: 0 0 0 3px rgba(15, 122, 110, .18); }
#nsca .nsca-send {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 16px;
	border-radius: 10px;
	background: var(--nsca-c);
	color: #fff;
	font-size: 15.5px;
	font-weight: 700;
	text-decoration: none;
	box-shadow: none;
}
#nsca .nsca-send:hover { filter: brightness(1.08); color: #fff; }
#nsca .nsca-send:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
#nsca .nsca-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13.5px; color: var(--nsca-muted); }
#nsca .nsca-alt a { color: var(--nsca-c); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#nsca .nsca-order {
	display: block;
	padding: 12px 16px;
	border-top: 1px solid var(--nsca-line);
	background: var(--nsca-soft);
	color: var(--nsca-ink);
	font-size: 13.5px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
#nsca .nsca-order:hover { text-decoration: underline; }

@keyframes nsca-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------- "Prefer to chat?" line */
.nsca-inline {
	margin: 10px 0 0;
	font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
	font-size: 13.5px;
	line-height: 1.4;
	text-align: center;
	color: #5a6474;
}
.nsca-inline a { color: #0f7a6e; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#nspe-app .nspe-qo .nsca-inline { margin: 6px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .78); }
#nspe-app .nspe-qo .nsca-inline a { color: #5eead4; }
#nspe-app .nspe-qo .nsca-inline a:hover { color: #fff; }

/* ----------------------------------------------------------------- sizes */
@media (max-width: 782px) {
	#nsca { --nsca-gap: 14px; }
	#nsca .nsca-fab { width: 56px; padding: 0; justify-content: center; }
	#nsca .nsca-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	#nsca .nsca-fab__dot { top: 12px; left: auto; right: 12px; }
	#nsca .nsca-panel { width: calc(100vw - 2 * var(--nsca-gap)); }
	#nsca.nsca--dev-desktop { display: none; }
}
@media (min-width: 783px) {
	#nsca.nsca--dev-mobile { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	#nsca, #nsca .nsca-fab, #nsca .nsca-panel, #nsca .nsca-nudge { transition: none; animation: none; }
}
@media print { #nsca, .nsca-inline { display: none !important; } }
