/* 下载块美化 —— 配色沿用 apex 主题(#333 / #6B6B6B / #E8E8E8,Open Sans),不突兀 */
.wp-block-file {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin: 18px 0;
	padding: 14px 16px;
	background: #FAFAFA;
	border: 1px solid #E8E8E8;
	border-radius: 6px;
	transition: border-color .15s ease, background .15s ease;
}

.wp-block-file:hover {
	background: #F5F5F5;
	border-color: #D0D0D0;
}

/* 下载图标(inline SVG,不依赖图标字体 —— 字体挂了也不会变黑块) */
.wp-block-file::before {
	content: "";
	order: 0;
	flex: none;
	width: 26px;
	height: 26px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 文件说明 + 文件名 */
.wp-block-file > a:not(.wp-block-file__button) {
	order: 1;
	flex: 1 1 220px;
	min-width: 0;
	color: #333;
	font-size: 14px;
	line-height: 1.55;
	text-decoration: none;
	word-break: break-word;
}

.wp-block-file > a:not(.wp-block-file__button):hover {
	color: #000;
	text-decoration: underline;
}

/* 文件大小(由 enhance-downloads.py 写进 data-size) */
.wp-block-file[data-size]::after {
	content: attr(data-size);
	order: 2;
	flex: none;
	color: #6B6B6B;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* 下载按钮(原来是 WP 默认的黑方块) */
.wp-block-file__button {
	order: 3;
	flex: none;
	display: inline-block;
	padding: 8px 20px;
	background: #333;
	color: #fff !important;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none !important;
	white-space: nowrap;
	transition: background .15s ease, transform .05s ease;
}

.wp-block-file__button:hover {
	background: #6B6B6B;
}

.wp-block-file__button:active {
	transform: translateY(1px);
}

@media (max-width: 480px) {
	.wp-block-file {
		gap: 10px;
	}
	.wp-block-file__button {
		order: 4;
		width: 100%;
		text-align: center;
	}
}
