/* Biblioteca de Papers Odontologia - estilos frontend (linea grafica AROODE: negro / blanco / gris) */
.bpo-biblioteca {
	/* Hereda las variables del tema; con fallback si el shortcode se usa fuera de una pagina con ellas. */
	--bpo-font-head: var(--uicore-secondary-font-family, Georgia, "Times New Roman", serif);
	--bpo-font-label: var(--uicore-primary-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	--bpo-font-text: var(--uicore-text-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);

	--bpo-ink: var(--uicore-headline-color, #0c0d0e);
	--bpo-body: var(--uicore-body-color, #515962);
	--bpo-muted: #818a96;
	--bpo-line: #e6e8ea;
	--bpo-bg: #f1f2f3;
	--bpo-card: #ffffff;
	--bpo-accent: #0c0d0e; /* negro */

	--bpo-radius: 4px;
	--bpo-shadow: 0 1px 2px rgba(12,13,14,.04);
	--bpo-shadow-hover: 0 10px 30px rgba(12,13,14,.10);

	font-family: var(--bpo-font-text);
	color: var(--bpo-body);
	max-width: 1200px;
	margin: 0 auto;
}

.bpo-biblioteca *, .bpo-biblioteca *::before, .bpo-biblioteca *::after { box-sizing: border-box; }

/* Toolbar */
.bpo-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}
.bpo-search {
	position: relative;
	flex: 1 1 280px;
	min-width: 220px;
}
.bpo-search-icon {
	position: absolute;
	left: 14px; top: 50%;
	transform: translateY(-50%);
	width: 18px; height: 18px;
	fill: none; stroke: var(--bpo-muted);
	stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
	pointer-events: none;
}
.bpo-search-input {
	width: 100%;
	padding: 12px 16px 12px 42px;
	border: 1px solid var(--bpo-line);
	border-radius: var(--bpo-radius);
	background: var(--bpo-card);
	font-family: var(--bpo-font-text);
	font-size: 15px;
	color: var(--bpo-ink);
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.bpo-search-input::placeholder { color: var(--bpo-muted); }
.bpo-search-input:focus {
	border-color: var(--bpo-accent);
	box-shadow: 0 0 0 3px rgba(12,13,14,.10);
}
.bpo-month-select {
	padding: 12px 40px 12px 16px;
	border: 1px solid var(--bpo-line);
	border-radius: var(--bpo-radius);
	background: var(--bpo-card) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818a96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center;
	font-family: var(--bpo-font-text);
	font-size: 15px;
	color: var(--bpo-ink);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}
.bpo-month-select:focus {
	border-color: var(--bpo-accent);
	box-shadow: 0 0 0 3px rgba(12,13,14,.10);
}
.bpo-count {
	margin-left: auto;
	font-family: var(--bpo-font-label);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bpo-muted);
	white-space: nowrap;
}

/* Grid */
.bpo-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.bpo-biblioteca[data-columns="2"] .bpo-grid { grid-template-columns: repeat(2, 1fr); }
.bpo-biblioteca[data-columns="4"] .bpo-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
	.bpo-grid,
	.bpo-biblioteca[data-columns="4"] .bpo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.bpo-grid,
	.bpo-biblioteca[data-columns="2"] .bpo-grid,
	.bpo-biblioteca[data-columns="4"] .bpo-grid { grid-template-columns: 1fr; }
	.bpo-count { width: 100%; margin-left: 0; }
}

/* Tarjeta */
.bpo-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
	background: var(--bpo-card);
	border: 1px solid var(--bpo-line);
	border-radius: var(--bpo-radius);
	box-shadow: var(--bpo-shadow);
	text-decoration: none;
	color: inherit;
	position: relative;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bpo-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: var(--bpo-accent);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .18s ease;
}
.bpo-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--bpo-shadow-hover);
	border-color: #d5d8dc;
}
.bpo-card:hover::before { transform: scaleY(1); }
.bpo-card:focus-visible {
	outline: 2px solid var(--bpo-accent);
	outline-offset: 2px;
}

.bpo-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.bpo-badge {
	display: inline-block;
	font-family: var(--bpo-font-label);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bpo-ink);
}
.bpo-pdf-tag {
	font-family: var(--bpo-font-label);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bpo-muted);
	background: var(--bpo-bg);
	border-radius: var(--bpo-radius);
	padding: 3px 8px;
	white-space: nowrap;
}
.bpo-card-title {
	margin: 2px 0 0;
	font-family: var(--bpo-font-head);
	font-size: 19px;
	line-height: 1.28;
	font-weight: 700;
	color: var(--bpo-ink);
}
.bpo-card-authors {
	margin: 0;
	font-family: var(--bpo-font-text);
	font-size: 14px;
	color: var(--bpo-ink);
	font-weight: 600;
}
.bpo-card-subject {
	margin: 0;
	font-family: var(--bpo-font-text);
	font-size: 14px;
	line-height: 1.5;
	color: var(--bpo-body);
}
.bpo-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}
.bpo-chip {
	font-family: var(--bpo-font-label);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--bpo-body);
	background: var(--bpo-bg);
	border: 1px solid var(--bpo-line);
	border-radius: var(--bpo-radius);
	padding: 3px 8px;
}
.bpo-open {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: auto;
	padding-top: 10px;
	font-family: var(--bpo-font-label);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--bpo-ink);
}
.bpo-open svg {
	width: 14px; height: 14px;
	fill: none; stroke: currentColor;
	stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
	transition: transform .18s ease;
}
.bpo-card:hover .bpo-open svg { transform: translate(2px,-2px); }

/* Paginacion */
.bpo-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin-top: 32px;
}
.bpo-page-btn {
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--bpo-line);
	border-radius: var(--bpo-radius);
	background: var(--bpo-card);
	font-family: var(--bpo-font-label);
	font-size: 13px;
	font-weight: 700;
	color: var(--bpo-ink);
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.bpo-page-btn:hover:not(:disabled):not(.is-active) { border-color: var(--bpo-accent); }
.bpo-page-btn.is-active {
	background: var(--bpo-accent);
	border-color: var(--bpo-accent);
	color: #fff;
	cursor: default;
}
.bpo-page-btn:disabled { opacity: .4; cursor: default; }
.bpo-page-btn svg {
	width: 16px; height: 16px;
	fill: none; stroke: currentColor;
	stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.bpo-page-ellipsis {
	min-width: 24px;
	text-align: center;
	color: var(--bpo-muted);
	font-family: var(--bpo-font-label);
	font-weight: 700;
}

/* Estados vacios */
.bpo-empty, .bpo-noresults {
	text-align: center;
	padding: 48px 24px;
	color: var(--bpo-body);
	background: var(--bpo-bg);
	border: 1px dashed var(--bpo-line);
	border-radius: var(--bpo-radius);
	font-family: var(--bpo-font-text);
	font-size: 15px;
}
.bpo-card[hidden], .bpo-pagination[hidden] { display: none; }
