/**
 * PDF Viewer — structure only. Colour and radius are emitted inline per instance.
 *
 * @package Launchpad_Avada_Elements
 * @version 1.3.0
 */

.lp-pdf {
	overflow: hidden;
	background: #fff;
}

.lp-pdf * {
	box-sizing: border-box;
}

/* --------------------------------------------------------------- Toolbar */

.lp-pdf__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px;
}

.lp-pdf__meta {
	display: flex;
	align-items: center;
	gap: 16px;
}

.lp-pdf__pager {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.lp-pdf__pages {
	font-size: 0.9em;
	font-variant-numeric: tabular-nums;
	min-width: 3.5em;
	text-align: center;
}

.lp-pdf__zoom {
	display: inline-flex;
	gap: 4px;
}

.lp-pdf__icon-btn {
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1em;
	line-height: 1;
	background: rgba(0, 0, 0, 0.05);
	border: 0;
	border-radius: 4px;
	cursor: pointer;
}

.lp-pdf__icon-btn:hover {
	background: rgba(0, 0, 0, 0.1);
}

/* Zoom controls only matter for the canvas renderer. */
.lp-pdf:not(.is-enhanced) .lp-pdf__zoom {
	display: none;
}

.lp-pdf__actions {
	display: flex;
	gap: 8px;
}

.lp-pdf__btn {
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	font: inherit;
	font-size: 0.9em;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.lp-pdf__btn:hover {
	opacity: 0.88;
}

/* --------------------------------------------------------------- Document */

.lp-pdf__doc {
	padding: 14px;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/*
 * One-page mode centres the single visible page horizontally. Top-aligned, not
 * vertically centred: a page zoomed taller than the box must scroll from its top,
 * and align-items:center would clip it in an overflow container.
 */
.lp-pdf--paged .lp-pdf__doc {
	display: flex;
	align-items: flex-start;
	justify-content: center;
}

/* Native embed fallback: fills the viewer until JS takes over. */
.lp-pdf__fallback {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 60vh;
	border: 0;
}

/*
 * The page box is sized in real pixels by the script (width + height inline), so
 * the zoom controls resize it and the scrollbar stays honest. Centred, so a page
 * narrower than the viewer is not stranded against the left edge.
 */
.lp-pdf__page {
	position: relative;
	flex: 0 0 auto;
	margin: 0 auto 14px;
	background: #fff;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.14);
}

.lp-pdf--paged .lp-pdf__page {
	margin: 0 auto;
}

.lp-pdf__page:last-child {
	margin-bottom: 0;
}

.lp-pdf__page[hidden] {
	display: none;
}

.lp-pdf__canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.lp-pdf__error {
	padding: 28px 14px;
	text-align: center;
}

.lp-pdf__notice {
	padding: 14px;
	border: 1px dashed #c9ccd6;
	color: #6b7280;
	border-radius: 6px;
}

@media screen and (max-width: 767px) {
	.lp-pdf__toolbar {
		padding: 8px 10px;
	}

	.lp-pdf__doc {
		padding: 8px;
	}

	.lp-pdf__btn {
		padding: 6px 12px;
	}
}
