/* Overrides propias de OPMSP sobre el visor de pdf.js (no tocar
   viewer.css, que es del propio pdf.js): se cargan aparte para no entrar
   en conflicto si se actualiza pdf.js más adelante. */

/* Oculta las herramientas de edición del PDF (subrayar, texto, dibujar,
   añadir imagen): este visor es solo de lectura. */
#editorHighlight,
#editorFreeText,
#editorInk,
#editorStamp {
	display: none !important;
}

/* Fuerza el tema claro: pdf.js define casi todos sus colores con
   light-dark(claro, oscuro), resuelto según el "color-scheme" activo —
   aquí seguía el del sistema/navegador (oscuro en este caso). Con
   "only light" pdf.js ignora ese oscuro y usa siempre su variante clara
   (fondo de la zona de scroll, diálogos, etc.), pase lo que pase con las
   preferencias del sistema. */
:root {
	color-scheme: only light !important;
}

/* pdf.js fija un ancho mínimo de 350px: en un móvil estrecho el visor es más
   estrecho que eso, el propio iframe se desplaza en horizontal y aparece una
   segunda barra de scroll además de la del visor. */
#mainContainer {
	min-width: 0 !important;
}

/* Barra de herramientas nativa de pdf.js: oculta del todo, sustituida
   por #opmspCustomToolbar (solo 3 controles: primera página, zoom y
   pantalla completa). "--toolbar-height" también hay que pisarlo: no es
   solo la altura visual de la barra, #viewerContainer reserva ese hueco
   arriba usando esta variable, así que si se deja en el valor original
   de pdf.js queda un hueco vacío del tamaño de la barra que se oculta. */
:root {
	--toolbar-height: 44px !important;
}

.toolbar {
	display: none !important;
}

/* Color de marca de OPMSP (el mismo navy que el resto del plugin), con
   iconos y texto en blanco. */
#opmspCustomToolbar {
	position: absolute;
	inset-inline: 0;
	top: 0;
	height: 44px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 12px;
	background: #0a0a44;
	border-bottom: 1px solid #0a0a44;
	z-index: 10000;
}

#opmspCustomToolbar button {
	appearance: none;
	background: transparent;
	border: none;
	border-radius: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

#opmspCustomToolbar button[hidden] {
	display: none;
}

#opmspCustomToolbar button:hover {
	background: rgb(255 255 255 / 0.15);
}

#opmspZoomLevel {
	min-width: 44px;
	text-align: center;
	font-family: Archivo, sans-serif;
	font-size: 12px;
	color: #fff;
}

.opmsp-toolbar-icon {
	display: block;
	width: 16px;
	height: 16px;
	background-color: #fff;
}

.opmsp-toolbar-icon--zoom-out {
	-webkit-mask-image: var(--toolbarButton-zoomOut-icon);
	mask-image: var(--toolbarButton-zoomOut-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.opmsp-toolbar-icon--zoom-in {
	-webkit-mask-image: var(--toolbarButton-zoomIn-icon);
	mask-image: var(--toolbarButton-zoomIn-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.opmsp-toolbar-icon--index,
.opmsp-toolbar-icon--first-page,
.opmsp-toolbar-icon--fullscreen {
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Iconos Heroicons (outline): chevron-double-up, arrows-pointing-out y
   arrows-pointing-in (este último, en pantalla completa; la clase la
   pone viewer-custom.js). */
.opmsp-toolbar-icon--index {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z'/%3E%3C/svg%3E");
}

.opmsp-toolbar-icon--first-page {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 18.75 7.5-7.5 7.5 7.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 12.75 7.5-7.5 7.5 7.5'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 18.75 7.5-7.5 7.5 7.5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m4.5 12.75 7.5-7.5 7.5 7.5'/%3E%3C/svg%3E");
}

.opmsp-toolbar-icon--fullscreen {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15'/%3E%3C/svg%3E");
}

.opmsp-is-fullscreen .opmsp-toolbar-icon--fullscreen {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25'/%3E%3C/svg%3E");
}

