/*!
 * TT PDF Viewer v1.2.0 — Staffing Future — https://www.staffingfuture.com/
 * Selectors are scoped under .ttpv and slightly over-specified on purpose so
 * theme and page-builder styles (buttons, links, svg) can't break the viewer.
 */

.ttpv {
	--ttpv-accent: #f26b21;
	position: relative;
	width: 100%;
	max-width: var(--ttpv-max, none);
	margin: 1.5em auto;
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.2;
}
.ttpv.is-ready {
	background: #f4f4f4;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(63, 69, 81, .16);
	-webkit-user-select: none;
	user-select: none;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}
.ttpv.is-ready:focus-visible { box-shadow: 0 0 0 3px var(--ttpv-accent); }
.ttpv *, .ttpv *::before, .ttpv *::after { box-sizing: border-box; }

/* Reset theme/builder button styles inside the viewer. */
.ttpv button {
	all: unset;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

/* Frame keeps the PDF's proportions (set from page 1, or the ratio attribute). */
.ttpv__frame {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ttpv-rw, 16) / var(--ttpv-rh, 9);
}
@supports not (aspect-ratio: 1 / 1) {
	/* Safari < 15 */
	.ttpv__frame { height: 0; padding-top: calc(var(--ttpv-rh, 9) / var(--ttpv-rw, 16) * 100%); }
}

.ttpv__stage {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	display: -webkit-box;
	display: flex;
	overflow: hidden;
	touch-action: pan-y;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}
.ttpv.is-zoomed .ttpv__stage { overflow: auto; touch-action: auto; cursor: grab; }
.ttpv.is-dragging .ttpv__stage { cursor: grabbing; }

.ttpv__page {
	position: relative;
	flex: none;
	margin: auto; /* centers, and keeps overflow reachable when zoomed */
	background: #fff;
}
.ttpv .ttpv__page canvas {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	border: 0;
}

/* Clickable areas copied from the PDF's own links. */
.ttpv__links { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.ttpv .ttpv__link {
	position: absolute;
	display: block;
	border-radius: 3px;
	background: transparent;
	cursor: pointer;
	text-decoration: none;
	box-shadow: none;
}
.ttpv .ttpv__link:hover { background: rgba(242, 107, 33, .12); }
.ttpv .ttpv__link:focus-visible { outline: 2px solid var(--ttpv-accent); outline-offset: 2px; }

/* Loading spinner / error message */
.ttpv__status {
	position: absolute;
	top: 0; right: 0; bottom: 0; left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: #444;
	font-size: 14px;
	text-align: center;
}
.ttpv__status > * + * { margin-top: 10px; }
.ttpv__status[hidden] { display: none; }
.ttpv .ttpv__status p { margin: 0; }
.ttpv .ttpv__status a,
.ttpv .ttpv__page-error a { color: var(--ttpv-accent); text-decoration: underline; }
.ttpv__spinner {
	width: 28px;
	height: 28px;
	border: 3px solid rgba(0, 0, 0, .12);
	border-top-color: var(--ttpv-accent);
	border-radius: 50%;
	animation: ttpv-spin .8s linear infinite;
}
@keyframes ttpv-spin { to { transform: rotate(360deg); } }

.ttpv__page-error {
	margin: auto;
	padding: 16px;
	color: #444;
	font-size: 14px;
	text-align: center;
}
.ttpv .ttpv__page-error p { margin: 0 0 8px; }

/* Control bar — default "overlay" variant (auto-hides) */
.ttpv__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 32px 14px 8px;
	background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0));
	color: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.ttpv:hover .ttpv__bar,
.ttpv:focus-within .ttpv__bar,
.ttpv.is-active .ttpv__bar,
.ttpv.is-menu-open .ttpv__bar {
	opacity: 1;
	pointer-events: auto;
}
.ttpv.is-failed .ttpv__bar { display: none; }

.ttpv__progress { display: flex; margin-bottom: 6px; }
.ttpv__progress:empty { display: none; }
.ttpv .ttpv__seg {
	position: relative;
	flex: 1 1 0%;
	min-width: 2px;
	height: 3px;
	margin-right: 3px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .35);
	cursor: pointer;
	transition: background-color .15s;
}
.ttpv .ttpv__seg:last-child { margin-right: 0; }
.ttpv .ttpv__seg::before { content: ""; position: absolute; top: -7px; bottom: -7px; left: 0; right: 0; }
.ttpv .ttpv__seg:hover { background: rgba(255, 255, 255, .6); }
.ttpv .ttpv__seg.is-done { background: #fff; }
.ttpv .ttpv__seg:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ttpv__track { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.ttpv__fill { width: 0; height: 100%; background: #fff; transition: width .2s; }

.ttpv__controls { display: flex; align-items: center; justify-content: space-between; }
.ttpv__group { display: flex; align-items: center; }
.ttpv .ttpv__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0 1px;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	line-height: 0;
}
.ttpv .ttpv__btn:hover { background: rgba(255, 255, 255, .16); }
.ttpv .ttpv__btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ttpv .ttpv__btn[disabled] { opacity: .35; cursor: default; background: none; }
.ttpv .ttpv__btn svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}
.ttpv__counter {
	min-width: 58px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* "More" menu */
.ttpv__more { position: relative; }
.ttpv__menu {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	z-index: 2;
	min-width: 170px;
	padding: 6px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
	display: none;
}
.ttpv.is-menu-open .ttpv__menu { display: block; }
.ttpv .ttpv__menu a {
	display: block;
	padding: 8px 10px;
	border-radius: 6px;
	color: #1d1d1f;
	font-size: 14px;
	text-decoration: none;
	white-space: nowrap;
}
.ttpv .ttpv__menu a:hover,
.ttpv .ttpv__menu a:focus-visible { background: #f1f1f1; outline: none; }

/* "below" variant (default): one slim row under the slide, nothing covers content */
.ttpv--below .ttpv__bar {
	position: static;
	display: flex;
	align-items: center;
	padding: 4px 8px;
	opacity: 1;
	pointer-events: auto;
	background: #fff;
	border-top: 1px solid #ececec;
	color: #222;
}
.ttpv--below .ttpv__controls { display: contents; }
.ttpv--below .ttpv__group:first-child { order: 1; margin-right: 12px; }
.ttpv--below .ttpv__progress { order: 2; flex: 1 1 auto; margin: 0; }
.ttpv--below .ttpv__group:last-child { order: 3; margin-left: 12px; }
.ttpv--below.is-single .ttpv__group:last-child { margin-left: auto; }
.ttpv.ttpv--below .ttpv__btn { color: #222; }
.ttpv.ttpv--below .ttpv__btn:hover { background: rgba(0, 0, 0, .06); }
.ttpv.ttpv--below .ttpv__btn:focus-visible { outline-color: var(--ttpv-accent); }
.ttpv.ttpv--below .ttpv__seg { background: rgba(0, 0, 0, .14); }
.ttpv.ttpv--below .ttpv__seg:hover { background: rgba(0, 0, 0, .3); }
.ttpv.ttpv--below .ttpv__seg.is-done { background: var(--ttpv-accent); }
.ttpv.ttpv--below .ttpv__track { background: rgba(0, 0, 0, .14); }
.ttpv.ttpv--below .ttpv__fill { background: var(--ttpv-accent); }

@media (max-width: 480px) {
	.ttpv--below .ttpv__bar { flex-wrap: wrap; }
	.ttpv--below .ttpv__progress { order: 0; flex-basis: 100%; padding: 8px 4px 2px; }
	.ttpv--below .ttpv__group:first-child { margin-right: auto; }
	.ttpv--below .ttpv__group:last-child { margin-left: 0; }
}

/* Fullscreen — native (.is-fs) and the iPhone/iframe fallback (.is-pseudo-fs) */
.ttpv.is-fs,
.ttpv.is-pseudo-fs {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border-radius: 0;
	background: #1a1a1a;
}
.ttpv.is-pseudo-fs {
	position: fixed;
	top: 0; right: 0; bottom: 0; left: 0;
	z-index: 2147483000;
	height: 100vh;
	height: 100dvh;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.ttpv.is-fs .ttpv__frame,
.ttpv.is-pseudo-fs .ttpv__frame {
	flex: 1 1 auto;
	min-height: 0;
	height: auto;
	padding-top: 0;
	aspect-ratio: auto;
}
html.ttpv-lock,
html.ttpv-lock body { overflow: hidden; }

/* Touch devices: larger tap targets */
@media (hover: none) and (pointer: coarse) {
	.ttpv .ttpv__btn { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
	.ttpv__spinner { animation-duration: 2.4s; }
	.ttpv__bar, .ttpv .ttpv__seg, .ttpv__fill { transition: none; }
}

/* Windows high-contrast mode */
@media (forced-colors: active) {
	.ttpv .ttpv__btn, .ttpv .ttpv__seg { border: 1px solid ButtonText; }
	.ttpv .ttpv__seg.is-done { background: Highlight; }
	.ttpv .ttpv__link:focus-visible { outline: 2px solid Highlight; }
}

/* Printing: show only the current slide */
@media print {
	.ttpv__bar, .ttpv__status { display: none !important; }
	.ttpv.is-ready { box-shadow: none; background: none; }
}
