/* HFL Transparencia — estilos del buscador, listas de documentos y visor.
   Colores alineados con el acordeón Divi de la página (#0066cc). */

.hfl-search,
.hfl-doclist,
.hfl-viewer {
	--hfl-blue: #0066cc;
	--hfl-blue-dark: #004f9e;
	--hfl-ink: #1b2a3d;
	--hfl-muted: #5b6b7f;
	--hfl-soft: #eef6ff;
	box-sizing: border-box;
}

.hfl-search *,
.hfl-doclist *,
.hfl-viewer * {
	box-sizing: border-box;
}

.hfl-icon {
	flex: none;
	vertical-align: middle;
}

/* ---------- Buscador ---------- */

.hfl-search {
	margin: 0 0 32px;
	padding: 24px;
	background: var(--hfl-soft);
	border-radius: 24px;
}

.hfl-search .hfl-search__title {
	margin: 0 0 14px;
	padding: 0;
	font-family: Lato, sans-serif;
	font-weight: 900;
	font-size: 20px;
	color: var(--hfl-ink);
}

.hfl-search__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hfl-search .hfl-search__input,
.hfl-search .hfl-search__select {
	min-height: 48px;
	border: 2px solid var(--hfl-blue);
	border-radius: 999px;
	background-color: #fff;
	color: var(--hfl-ink);
	font-size: 16px;
	line-height: 1.3;
}

.hfl-search .hfl-search__input {
	flex: 1 1 280px;
	min-width: 0;
	padding: 10px 18px 10px 46px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 16px center;
	background-size: 20px;
}

.hfl-search .hfl-search__select {
	flex: 0 1 300px;
	min-width: 0;
	padding: 10px 16px;
	cursor: pointer;
}

.hfl-search .hfl-search__input:focus,
.hfl-search .hfl-search__select:focus {
	outline: 3px solid rgba(0, 102, 204, .3);
	outline-offset: 1px;
}

.hfl-search__status {
	margin-top: 10px;
	font-size: 14px;
	color: var(--hfl-muted);
}

.hfl-search__status:empty {
	display: none;
}

.hfl-search ul.hfl-results {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.hfl-search ul.hfl-results li {
	margin: 0;
	padding: 0;
}

.hfl-search ul.hfl-results li::before {
	display: none;
}

.hfl-result {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 4px 16px;
	width: 100%;
	padding: 16px 18px;
	text-align: left;
	background: #fff;
	border: 1px solid #d6e6f7;
	border-radius: 14px;
	font: inherit;
	color: var(--hfl-ink);
	cursor: pointer;
	transition: box-shadow .15s, transform .15s;
}

.hfl-result:hover,
.hfl-result:focus-visible {
	box-shadow: 0 6px 18px rgba(0, 60, 130, .12);
	transform: translateY(-1px);
	outline: none;
}

.hfl-result__title {
	grid-column: 1;
	font-weight: 700;
	font-size: 16px;
}

.hfl-result__meta {
	grid-column: 1;
	font-size: 13px;
	color: var(--hfl-muted);
}

.hfl-result__snippet {
	grid-column: 1;
	font-size: 14px;
	color: #3d4b5c;
}

.hfl-result__cta {
	grid-column: 2;
	grid-row: 1 / span 3;
	align-self: center;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--hfl-blue);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
}

.hfl-result mark {
	background: #fff1a8;
	color: inherit;
	padding: 0 1px;
	border-radius: 2px;
}

/* ---------- Lista de documentos (dentro del acordeón azul) ---------- */

ul.hfl-doclist {
	list-style: none !important;
	margin: 12px 0 0 !important;
	padding: 0 !important;
}

ul.hfl-doclist li.hfl-doc {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 10px;
	padding: 12px 14px;
	list-style: none;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 14px;
	color: #fff;
}

ul.hfl-doclist li.hfl-doc::before {
	display: none;
}

.hfl-doc__icon {
	display: inline-flex;
	opacity: .9;
}

.hfl-doc__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.hfl-doc__title {
	font-weight: 700;
}

.hfl-doc__meta {
	font-size: 13px;
	opacity: .85;
}

.hfl-empty {
	opacity: .9;
	font-style: italic;
}

/* ---------- Botón «Ver documento» ---------- */

.hfl-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--hfl-blue, #0066cc);
	font: inherit;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.hfl-btn:hover,
.hfl-btn:focus-visible {
	background: #0b1d3a;
	color: #fff;
	outline: none;
}

.hfl-btn--inline {
	padding: 3px 12px;
	margin: 0 2px;
	font-size: 13px;
	vertical-align: baseline;
}

/* ---------- Móvil: botones solo con el icono del ojo ---------- */

@media (max-width: 767px) {
	.hfl-search {
		padding: 16px;
		border-radius: 18px;
	}
	.hfl-search .hfl-search__title {
		font-size: 18px;
	}
	.hfl-search .hfl-search__select {
		flex-basis: 100%;
	}
	.hfl-result {
		gap: 2px 12px;
		padding: 12px 14px;
	}
	.hfl-result__title {
		font-size: 15px;
	}
	.hfl-result__snippet {
		font-size: 13px;
	}
	.hfl-result__cta,
	ul.hfl-doclist .hfl-btn {
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
	}
	.hfl-result__cta span,
	.hfl-btn span {
		display: none;
	}
	ul.hfl-doclist li.hfl-doc {
		gap: 10px;
		padding: 10px 12px;
	}
	.hfl-doc__title {
		font-size: 15px;
		line-height: 1.35;
		word-break: normal;
		overflow-wrap: break-word;
		hyphens: auto;
	}
	.hfl-btn--inline {
		justify-content: center;
		width: 30px;
		height: 30px;
		padding: 0;
		vertical-align: middle;
	}
}

/* ---------- Visor ---------- */

html.hfl-viewer-open,
html.hfl-viewer-open body {
	overflow: hidden;
}

.hfl-viewer {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	flex-direction: column;
	background: rgba(9, 18, 34, .94);
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

.hfl-viewer[hidden] {
	display: none;
}

.hfl-viewer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 10px 16px;
	background: #0b1d3a;
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.hfl-viewer__heading {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 240px;
}

.hfl-viewer__title {
	font-weight: 700;
	font-size: 16px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hfl-viewer__note a {
	color: #fff;
	text-decoration: underline;
}

.hfl-viewer__note {
	font-size: 12px;
	opacity: .7;
}

.hfl-viewer__controls {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.hfl-viewer__btn {
	width: 38px;
	height: 38px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.hfl-viewer__btn:hover,
.hfl-viewer__btn:focus-visible {
	background: var(--hfl-blue);
	border-color: var(--hfl-blue);
	outline: none;
}

.hfl-viewer__zoom {
	min-width: 46px;
	text-align: center;
}

.hfl-viewer__pages {
	min-width: 86px;
	text-align: center;
	opacity: .85;
}

.hfl-viewer__close {
	margin-left: 6px;
}

.hfl-viewer__body {
	flex: 1;
	overflow-x: auto;
	overflow-y: scroll; /* reserva la barra vertical: el ancho medido no cambia al cargar las páginas */
	padding: 16px;
	-webkit-overflow-scrolling: touch;
}

.hfl-viewer__msg {
	margin: 15vh auto 0;
	color: #fff;
	text-align: center;
	font-size: 16px;
}

.hfl-viewer__msg[hidden] {
	display: none;
}

.hfl-viewer__page {
	position: relative;
	max-width: none;
	margin: 0 auto 16px;
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .4);
}

.hfl-viewer__page canvas {
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

@media (max-width: 600px) {
	.hfl-viewer__bar {
		padding: 8px 10px;
	}
	.hfl-viewer__pages {
		display: none;
	}
	.hfl-viewer__body {
		padding: 10px 8px;
	}
}

/* Nunca imprimir el documento desde el visor. */
@media print {
	.hfl-viewer {
		display: none !important;
	}
}
