/* RO Campus Jump Link Hotspots
 * --------------------------------------------------------------
 * Wrapper: .roc-jlh
 * Inner image-positioning context: .roc-jlh__inner
 * Hotspot anchors: .roc-jlh__hotspot
 *
 * Sticky-on-mobile is gated by --roc-jlh-sticky-top, which JS writes
 * to match the live #header-outer.bottom value (handles admin bar,
 * Salient's .scrolled-down state, resize, etc.).
 */

/* ---- Wrapper / map -------------------------------------------------- */

.roc-jlh {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	font-family: "PT Sans", sans-serif;
}

.roc-jlh__inner {
	position: relative;
	display: block;
	line-height: 0;
}

.roc-jlh__map {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.roc-jlh__sticky-sentinel {
	position: absolute;
	top: 0;
	left: 0;
	height: 1px;
	width: 1px;
	pointer-events: none;
	visibility: hidden;
}

/* ---- Mobile carousel ----------------------------------------------- */
/* Activated via JS when the parent has class .roc-jlh--mobile-carousel
 * and viewport < breakpoint. Wraps `.mux-stream-player-row` siblings
 * in an Owl Carousel (Salient bundles it). Goes full-viewport-width
 * via the negative-margin trick. Custom prev/next arrows positioned
 * on the left/right edges of the active row.
 */

/* Essential Owl Carousel structural CSS. Salient bundles owl.carousel.min.js
 * but does NOT autoload owl.carousel.min.css unless a Salient element using
 * Owl is on the page. Without these rules, all .owl-items stack at x=0 and
 * only the first slide is visible. We include the minimum viable subset.
 */
.roc-jlh-carousel.owl-carousel {
	display: none;
	-webkit-tap-highlight-color: transparent;
	z-index: 1;
}
.roc-jlh-carousel.owl-carousel.owl-loaded { display: block; }
.roc-jlh-carousel.owl-carousel .owl-stage {
	position: relative;
	-ms-touch-action: pan-Y;
	touch-action: manipulation;
	-moz-backface-visibility: hidden;
}
.roc-jlh-carousel.owl-carousel .owl-stage:after {
	content: ".";
	display: block;
	clear: both;
	visibility: hidden;
	line-height: 0;
	height: 0;
}
.roc-jlh-carousel.owl-carousel .owl-stage-outer {
	position: relative;
	overflow: hidden;
	-webkit-transform: translate3d(0, 0, 0);
}
.roc-jlh-carousel.owl-carousel .owl-item {
	position: relative;
	min-height: 1px;
	float: left;
	-webkit-backface-visibility: hidden;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

@media (max-width: 999px) {
	/* Tighten the player column when carousel mode is active so the
	 * carousel sits close to the map. Salient's column-margin and
	 * column-padding shortcode atts (e.g. `top_margin_tablet="40"`,
	 * `column_padding="padding-7-percent"`) generate classes that pad
	 * out the column on tablet/mobile — we override only top/bottom.
	 */
	.roc-jlh-carousel-host-column[class*="top_margin_tablet_"],
	.roc-jlh-carousel-host-column[class*="top_margin_phone_"] {
		margin-top: 0 !important;
	}
	.roc-jlh-carousel-host-column[class*="bottom_margin_tablet_"],
	.roc-jlh-carousel-host-column[class*="bottom_margin_phone_"] {
		margin-bottom: 0 !important;
	}
	.roc-jlh-carousel-host-column > .vc_column-inner {
		padding-top: 0 !important;
		padding-bottom: 10px !important;
	}

	.roc-jlh-carousel {
		width: 100vw;
		position: relative;
		left: 50%;
		right: 50%;
		margin-left: -50vw;
		margin-right: -50vw;
		padding: 0;
		max-width: 100vw;
	}

	/* Pre-init: hide all but the first row to prevent a flash of all
	 * rows stacked vertically while Owl bootstraps. */
	.roc-jlh--mobile-carousel ~ * .mux-stream-player-row,
	.roc-jlh--mobile-carousel + * .mux-stream-player-row {
		visibility: visible;
	}
	.roc-jlh-carousel:not(.owl-loaded) > .mux-stream-player-row + .mux-stream-player-row {
		display: none;
	}

	/* Each row inside the carousel: 50px horizontal padding so the 40px
	 * arrows fit in the gutter without overlapping the player UI. */
	.roc-jlh-carousel.owl-carousel .mux-stream-player-row {
		padding: 0 50px;
		box-sizing: border-box;
	}

	/* Nav arrows. .owl-nav contains both prev + next. Position them
	 * absolutely on the left/right edges of the slide area, vertically
	 * centered. Pointer-events on the wrapper get disabled so the
	 * arrows don't block clicks on the player row between them. */
	.roc-jlh-carousel .owl-nav {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		pointer-events: none;
		margin: 0;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev,
	.roc-jlh-carousel .owl-nav button.owl-next {
		pointer-events: auto;
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		width: 40px;
		height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgba(23, 57, 81, 0.85);
		color: #ffffff;
		border: none;
		border-radius: 50%;
		font-family: "PT Sans", sans-serif;
		font-size: 28px;
		font-weight: 400;
		line-height: 1;
		cursor: pointer;
		opacity: 0.95;
		transition: background 0.18s ease, opacity 0.18s ease;
		padding: 0;
		z-index: 5;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev:hover,
	.roc-jlh-carousel .owl-nav button.owl-next:hover {
		background: rgba(23, 57, 81, 1);
		opacity: 1;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev:focus-visible,
	.roc-jlh-carousel .owl-nav button.owl-next:focus-visible {
		outline: 2px solid #1cb0a2;
		outline-offset: 2px;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev {
		left: 5px;
	}

	.roc-jlh-carousel .owl-nav button.owl-next {
		right: 5px;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev > span,
	.roc-jlh-carousel .owl-nav button.owl-next > span {
		display: inline-block;
		line-height: 1;
		margin-top: -2px;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev > span:first-child,
	.roc-jlh-carousel .owl-nav button.owl-next > span:first-child {
		font-size: 28px;
	}

	.roc-jlh-carousel .owl-nav button.owl-prev.disabled,
	.roc-jlh-carousel .owl-nav button.owl-next.disabled {
		opacity: 0.35;
		cursor: not-allowed;
	}

	.roc-jlh-carousel .owl-nav button .screen-reader-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	/* Visible drag affordance — Salient's audio players are dark, so
	 * we add a tiny shadow under the active row to imply scrollable. */
	.roc-jlh-carousel .owl-stage-outer {
		overflow: hidden;
	}
}

@media (min-width: 1000px) {
	/* Belt-and-suspenders: should already be torn down by JS, but make
	 * sure the carousel wrapper has no leftover styles on desktop. */
	.roc-jlh-carousel {
		width: auto;
		left: auto;
		right: auto;
		margin-left: 0;
		margin-right: 0;
	}
}

/* ---- Sticky on mobile ----------------------------------------------- */
/* On mobile (<1000px), columns stack into separate flex tracks — so
 * pure-CSS `position: sticky` has no room to pin within the column's
 * own track. Salient's surrounding flex / overflow:hidden chain also
 * blocks sticky outright. We do it in JS instead (see roc-jlh.js):
 * pin the column with `position: fixed` while in window, then absolute-
 * release at the parent's bottom. The placeholder below holds layout.
 */
.roc-jlh-sticky-placeholder {
	display: none;
}

/* ---- Hotspot anchor -------------------------------------------------- */

.roc-jlh__hotspot {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-left: -15px;
	margin-top: -15px;
	border-radius: 50%;
	text-decoration: none !important;
	color: var(--roc-jlh-font-color, #ffffff);
	background: var(--roc-jlh-color, #1cb0a2);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	z-index: 2;
	transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.roc-jlh__hotspot:hover,
.roc-jlh__hotspot:focus {
	transform: scale(1.12);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
	outline: none;
	color: var(--roc-jlh-font-hover-color, var(--roc-jlh-font-color, #ffffff));
}

.roc-jlh__hotspot:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.roc-jlh__hotspot-inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	font-family: "PT Sans", sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	color: inherit;
}

.roc-jlh__num {
	display: inline-block;
	color: inherit;
	line-height: 1;
}

/* ---- Color variants — mapped to Salient's palette names ------------- */
/* Salient theme exposes its colors via CSS rules on body / .accent-color
 * etc. We pick safe defaults and let the wrapper class win.
 */

.roc-jlh--color-accent-color {
	--roc-jlh-color: var(--roc-jlh-accent-color, #1cb0a2);
}

.roc-jlh--color-extra-color-1 {
	--roc-jlh-color: var(--roc-jlh-extra-color-1, #1cb0a2);
}

.roc-jlh--color-extra-color-2 {
	--roc-jlh-color: var(--roc-jlh-extra-color-2, #89b33f);
}

.roc-jlh--color-extra-color-3 {
	--roc-jlh-color: var(--roc-jlh-extra-color-3, #3271b2);
}

/* ---- Icon variants -------------------------------------------------- */

.roc-jlh--icon-numerical .roc-jlh__num {
	display: inline-block;
}

.roc-jlh--icon-plus .roc-jlh__num {
	display: none;
}

.roc-jlh--icon-plus .roc-jlh__hotspot-inner::before {
	content: "+";
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.roc-jlh--icon-dot .roc-jlh__num {
	display: none;
}

.roc-jlh--icon-dot .roc-jlh__hotspot-inner::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	background: currentColor;
	border-radius: 50%;
}

/* ---- Size variants -------------------------------------------------- */

.roc-jlh--size-small .roc-jlh__hotspot {
	width: 22px;
	height: 22px;
	margin-left: -11px;
	margin-top: -11px;
}

.roc-jlh--size-small .roc-jlh__hotspot-inner {
	font-size: 11px;
}

.roc-jlh--size-medium .roc-jlh__hotspot {
	width: 30px;
	height: 30px;
	margin-left: -15px;
	margin-top: -15px;
}

.roc-jlh--size-medium .roc-jlh__hotspot-inner {
	font-size: 14px;
}

.roc-jlh--size-large .roc-jlh__hotspot {
	width: 40px;
	height: 40px;
	margin-left: -20px;
	margin-top: -20px;
}

.roc-jlh--size-large .roc-jlh__hotspot-inner {
	font-size: 16px;
}

/* ---- Pulse animation ------------------------------------------------ */

@keyframes roc-jlh-pulse {
	0% {
		box-shadow: 0 0 0 0 var(--roc-jlh-color, #1cb0a2);
		opacity: 0.65;
	}
	70% {
		box-shadow: 0 0 0 14px rgba(0, 0, 0, 0);
		opacity: 0;
	}
	100% {
		box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
		opacity: 0;
	}
}

.roc-jlh--animate .roc-jlh__hotspot::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 50%;
	background: var(--roc-jlh-color, #1cb0a2);
	z-index: -1;
	animation: roc-jlh-pulse 2.2s cubic-bezier(0.66, 0, 0, 1) infinite;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.roc-jlh--animate .roc-jlh__hotspot::after {
		animation: none;
	}
	.roc-jlh--sticky-mobile {
		transition: none;
	}
}

/* ---- Return-to-Map button ------------------------------------------ */
/* Visually mirrors the pkwy-mux transcript "chrome" toggle button so
 * the two read as part of the same UI family.
 */

.roc-rtm {
	margin: 6px 0 0;
}

.roc-rtm--align-left   { text-align: left; }
.roc-rtm--align-center { text-align: center; }
.roc-rtm--align-right  { text-align: right; }

.roc-rtm__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 8px;
	background: rgba(0, 0, 0, 0.05);
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 4px;
	font-family: "PT Sans", inherit, sans-serif;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none !important;
	color: inherit;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.roc-rtm__btn:hover {
	background: rgba(0, 0, 0, 0.1);
	border-color: rgba(0, 0, 0, 0.22);
	text-decoration: none !important;
}

.roc-rtm__btn:focus {
	outline: 2px solid rgba(0, 0, 0, 0.35);
	outline-offset: 1px;
}

.roc-rtm__btn:focus:not(:focus-visible) {
	outline: none;
}

.roc-rtm__icon {
	width: 14px;
	height: 14px;
	display: block;
	flex-shrink: 0;
}

.roc-rtm__label {
	line-height: 1;
}

/* When the Return-to-Map button has been moved into the pkwy-mux
 * transcript "chrome" wrap, JS also adds .roc-rtm-host to that wrap.
 * Convert it to a flex row so both buttons sit on the same line with
 * matched height and centered alignment, regardless of their default
 * inline / vertical-align differences.
 */
.pkwy-mux-transcript-wrap--chrome.roc-rtm-host {
	display: flex !important;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 6px;
}

.pkwy-mux-transcript-wrap--chrome.roc-rtm-host > .pkwy-mux-transcript-toggle--chrome,
.pkwy-mux-transcript-wrap--chrome.roc-rtm-host > .roc-rtm__btn {
	margin: 0;
	vertical-align: baseline;
	align-self: center;
}

.roc-rtm__btn--inline {
	margin: 0;
}

/* Hide the wrapper once the button has been relocated. */
.roc-rtm--attach-cc.roc-rtm--detached {
	display: none !important;
}
