/* Help drawer (CT/CTHelpPanel.cfm): the KB viewer in a panel on the right half of any page.
   Closed, only the edge tab shows (a help icon); open, the tab turns into the collapse arrow. */

.kbp {
	--kbp-top: 46px;
	--kbp-width: clamp(440px, 50vw, 820px);
	--kbp-edge: #4a4a4a;
	--kbp-rule: #d5d9de;
	--kbp-link: var(--rs_link, #4682b4);
	position: fixed;
	top: var(--kbp-bar-top, var(--kbp-top));
	right: var(--kbp-bar, 44px);
	bottom: 0;
	z-index: 1040;
	width: var(--kbp-width);
	transform: translateX(calc(100% + var(--kbp-bar, 44px)));
	transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kbp[data-open="true"] {
	transform: translateX(0);
}

/* the drawer itself; the tab sits outside it, on its left edge */
.kbp-body {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-left: 1px solid var(--kbp-rule);
	background-color: #ffffff;
	box-shadow: -12px 0 32px rgba(20, 38, 63, 0.18);
}

.kbp:not([data-open="true"]) .kbp-body {
	box-shadow: none;
}

.kbp-head {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	height: 44px;
	padding: 0 16px;
	border-bottom: 1px solid var(--kbp-rule);
	background-color: #f3f3f3;
}

.kbp-title {
	letter-spacing: 0.1em;
	font-size: 16px;
	color: #222222;
}

.kbp-head-actions {
	display: flex;
	align-items: center;
	gap: 14px;
}

.kbp .kbp-collapse {
	padding: 2px 6px;
	border: 0;
	background-color: transparent;
	color: #555555;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}

.kbp .kbp-collapse:hover {
	background-color: #e2e8f0;
	color: #222222;
}

.kbp .kbp-collapse:focus {
	box-shadow: none;
}

.kbp .kbp-collapse:focus-visible {
	outline: 2px solid var(--kbp-link);
}

.kbp-full {
	color: #555555;
	font-size: 14px;
	text-decoration: none;
}

.kbp-full:hover {
	color: var(--rs_link_hover, #ff6633);
}

.kbp-frame-wrap {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.kbp-frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background-color: #ffffff;
}

/* CL 2026-11-29 (b559, issue 1045): Added. Bottom strip of the drawer with the link to help.rcampus.com. */
.kbp-foot {
	flex: 0 0 auto;
	padding: 10px 16px;
	border-top: 1px solid var(--kbp-rule);
	background-color: #f3f3f3;
	font-size: 13px;
}

.kbp-foot-link {
	color: var(--kbp-link);
	text-decoration: none;
}

.kbp-foot-link:hover {
	color: var(--rs_link_hover, #ff6633);
	text-decoration: underline;
}

.kbp-foot-ext {
	margin-left: 2px;
	font-size: 11px;
}

.kbp-loading {
	position: absolute;
	top: 18px;
	left: 20px;
	margin: 0;
	color: #777777;
	font-size: 13px;
}

/* vertical bar down the right edge, under the page header. It holds the help button and, on pages that have one,
   the quick post button, and the page content leaves room for it instead of running underneath.
   Buttons are selected by id/compound class because the site adds Bootstrap's btn/btn-light classes to every
   <button>, and those (two-class) rules would otherwise win. */
.kbbar {
	--kbp-link: var(--rs_link, #4682b4);
	position: fixed;
	top: var(--kbp-bar-top, var(--kbp-top, 46px));
	right: 0;
	bottom: 0;
	z-index: 1041;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	width: var(--kbp-bar, 44px);
	padding: 12px 0;
	gap: 8px;
	/* CL 2026-11-29 (b559, issue 1045): Removed -- the left border and white background; the buttons float free
	   beside the page, and the footer (which runs under the bar) shows through.
	border-left: 1px solid #d5d9de;
	background-color: #ffffff;
	*/
	/* CL 2026-11-29 (b559, issue 1045): Added. Clicks between the buttons reach the footer underneath. */
	pointer-events: none;
}

.kbbar .kbbar-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	width: 36px;
	padding: 10px 0;
	border: 0;
	border-radius: 6px;
	background-color: transparent;
	box-shadow: none;
	color: #3b4a5e;
	cursor: pointer;
	/* CL 2026-11-29 (b559, issue 1045): Added. The buttons take clicks; the bar around them lets them through. */
	pointer-events: auto;
}

.kbbar .kbbar-btn:hover,
.kbbar .kbbar-btn:active,
.kbbar .kbbar-btn:focus {
	background-color: #f0f2f5;
	box-shadow: none;
	color: #3b4a5e;
}

.kbbar .kbbar-btn[aria-expanded="true"] {
	background-color: #e2e8f0;
}

.kbbar .kbbar-btn:focus-visible {
	outline: 2px solid var(--kbp-link);
	outline-offset: -2px;
}

.kbbar-ico {
	font-size: 22px;
}

.kbbar-cap {
	position: fixed;
	right: 0;
	z-index: 1041;
	display: none;
	box-sizing: border-box;
	width: var(--kbp-bar, 44px);
	pointer-events: none;
}

/* CL 2026-11-30 (b559, issue 1045): Removed -- the page no longer leaves a column for the bar (--kbp-bar is 0 below),
   so the title bar, content and footer use the full width.
#ctpage-right-sidebar-wrapper .pagetitleframe {
	margin-right: calc(-1 * var(--kbp-bar, 44px));
}

#ctpage-right-sidebar-wrapper {
	margin-right: var(--kbp-bar, 44px);
}
*/

/* the page's quick post sidebar: no chevron of its own; the bar's button opens and closes it, and like the help
   drawer it slides out from the bar over the page, at a fixed width */
#ctpage-right-sidebar-menu-arrow {
	display: none;
}

#ctpage-right-sidebar-wrapper.active,
#ctpage-right-sidebar-wrapper.has-ctpage-right-sidebar-window:not(.active) {
	padding-right: 0;
}

#ctpage-right-sidebar-window,
#ctpage-right-sidebar-wrapper.active #ctpage-right-sidebar-window {
	top: var(--kbp-bar-top, var(--kbp-top, 46px));
	right: var(--kbp-bar, 44px);
	bottom: 0;
	z-index: 1039;
	box-sizing: border-box;
	width: 260px;
	margin: 0;
	overflow-y: auto;
	border: 0;
	border-left: 1px solid var(--kbp-rule, #d5d9de);
	border-radius: 0;
	box-shadow: -12px 0 32px rgba(20, 38, 63, 0.18);
	transform: translateX(0);
	transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#ctpage-right-sidebar-wrapper:not(.active) #ctpage-right-sidebar-window {
	box-shadow: none;
	transform: translateX(calc(100% + var(--kbp-bar, 44px)));
	/* the page script sets visibility inline; hidden once the slide-out ends so it cannot be tabbed to */
	visibility: hidden !important;
	transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.26s;
}

#ctpage-right-sidebar-window #ctpage-right-sidebar-window-toggle {
	margin-top: 8px;
}

/* the box inside (quick post card, or any right-panel include) fills the whole expanded sidebar: every wrapper
   between the sidebar and the card/iframe stretches, and the iframe takes the remaining height */
#ctpage-right-sidebar-window {
	display: flex;
	flex-direction: column;
}

#ctpage-right-sidebar-window #ctpage-right-sidebar-window-toggle,
#ctpage-right-sidebar-window .ctpage-right-sidebar-nav,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle > table,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle > table > tbody,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle > table > tbody > tr,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle > table > tbody > tr > td,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle .card,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle .card-body,
#ctpage-right-sidebar-window .ctpage-iconboxes-toggle .card-body > div {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 100%;
	min-height: 0;
}

#ctpage-right-sidebar-window .ctpage-right-sidebar-nav {
	padding: 0;
}

#ctpage-right-sidebar-window .ctpage-iconboxes-toggle {
	margin: 0 !important;
	padding: 8px !important;
	width: 100% !important;
	max-width: none !important;
}

/* the page script shows/hides this box with bootstrap's display utilities (!important), so match that to keep it a flex column */
@media (min-width: 768px) {
	#ctpage-right-sidebar-window .ctpage-iconboxes-toggle {
		display: flex !important;
	}
}

#ctpage-right-sidebar-window .ctpage-iconboxes-toggle .card-header {
	flex: 0 0 auto;
}

#ctpage-right-sidebar-window .ctpage-iconboxes-toggle iframe {
	flex: 1 1 0;
	min-height: 0;
	height: auto !important;
}

/* the top-bar help icon shows it is on while the drawer is open */
#kbHelpToggle[aria-expanded="true"] {
	color: var(--kbp-link, #4682b4);
}

/* phone width: the drawer fills the space beside the bar, so its header carries its own collapse button */
@media (max-width: 768px) {
	.kbp {
		--kbp-width: calc(100vw - var(--kbp-bar, 44px));
	}
}

/* CL 2026-11-30 (b559, issue 1045): Added. No column down the right edge: the page, drawer and quick post use the full
   width. CTHelpPanel.cfm moves the bar's buttons into the page title bar; on pages without one, and on tablets and
   phones, they are a floating button at the bottom right. */
:root {
	--kbp-bar: 0px;
}

.kbbar {
	top: auto;
	right: 16px;
	bottom: 16px;
	width: auto;
	padding: 4px;
	gap: 4px;
	border-radius: 28px;
	background-color: #ffffff;
	box-shadow: 0 4px 16px rgba(20, 38, 63, 0.25);
	pointer-events: auto;
}

.kbbar .kbbar-btn {
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
}

/* the drawer has its own collapse button, so the floating button doesn't cover the drawer's bottom strip */
.kbp-is-open .kbbar {
	display: none;
}

/* desktop: the buttons sit at the right end of the page title bar; the drawer opens below the title bar, so they stay
   visible while it is open */
@media (min-width: 992px) {
	.pagetitlebox .kbbar,
	.kbp-is-open .pagetitlebox .kbbar {
		position: static;
		display: flex;
		flex-direction: row;
		align-self: center;
		margin: 0 8px 0 auto;
		padding: 0;
		border-radius: 0;
		background-color: transparent;
		box-shadow: none;
	}

	.pagetitlebox .kbbar .kbbar-btn {
		width: 36px;
		height: 36px;
	}

	.pagetitlebox .kbbar-ico {
		font-size: 20px;
	}

	.pagetitlebox .kbbar .kbbar-btn:hover,
	.pagetitlebox .kbbar .kbbar-btn[aria-expanded="true"] {
		background-color: #e2e8f0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kbp,
	.kbbar-btn {
		transition: none;
	}
}

@media print {
	.kbp {
		display: none;
	}
}
