/* PDF Viewer Widget — estilos base */

.pdfw-viewer {
	--pdfw-height: 800px;
	box-sizing: border-box;
	max-width: 100%;
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	flex-direction: column;
}

.pdfw-viewer * {
	box-sizing: border-box;
}

.pdfw-admin-notice {
	padding: 10px 14px;
	background: #fff3cd;
	border: 1px solid #ffe08a;
	border-radius: 6px;
	color: #664d03;
	font-size: 13px;
}

.pdfw-toolbar {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	background: #fff;
	border-bottom: 1px solid #e2e2e2;
	flex-wrap: wrap;
}

.pdfw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 8px;
	border: 1px solid #ddd;
	border-radius: 5px;
	background: #fff;
	color: #333;
	text-decoration: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
}

.pdfw-btn:hover {
	background: #f0f0f0;
}

.pdfw-page-info {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: #333;
	white-space: nowrap;
}

.pdfw-page-input {
	width: 46px;
	height: 28px;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
}

.pdfw-zoom-level {
	font-size: 13px;
	color: #333;
	min-width: 42px;
	text-align: center;
}

.pdfw-sep {
	width: 1px;
	height: 20px;
	background: #e2e2e2;
	margin: 0 2px;
}

.pdfw-canvas-wrap {
	position: relative;
	flex: 1 1 auto;
	/* "height" del shortcode es ahora un TOPE máximo, no un alto forzado:
	   el JS fija el alto exacto según la proporción real del PDF
	   (ver pdfw-viewer.mjs) y esto solo entra a tallar — con scroll
	   interno — si esa altura real supera el tope. */
	max-height: var(--pdfw-height);
	min-height: 200px;
	overflow: auto;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	background: #eaeaea;
	padding: 16px 0;
}

.pdfw-canvas {
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	max-width: 100%;
}

.pdfw-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 13px;
	color: #666;
	max-width: 80%;
	text-align: center;
}

.pdfw-loading.pdfw-error {
	color: #b32d2e;
}

.pdfw-viewer:fullscreen .pdfw-canvas-wrap {
	height: calc(100vh - 44px);
}
