/**
 * Files (UI block): links to documents with a file icon showing the format.
 * Builds on .me-links-with-arrow / .me-link-with-arrow (style.css).
 *
 * @package medexpress
 */

.me-files {
	--me-files-icon-color: #D9E1EE;
}

a.me-files__item {
	display: flex;
	align-items: center;
	gap: 16px;
}

a.me-files__item:first-child {
	border-top: 1px solid var(--gray-border-color);
}

.me-files__icon {
	position: relative;
	flex: 0 0 auto;
	width: 36px;
	height: 45px;
}

.me-files__icon::before {
	content: '';
	position: absolute;
	inset: 0;
	background-color: var(--me-files-icon-color);
	-webkit-mask: url('images/file.svg') center / contain no-repeat;
	mask: url('images/file.svg') center / contain no-repeat;
	transition: background-color 0.2s ease;
}

.me-files__ext {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 7px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.02em;
	text-align: center;
	color: var(--primary-color);
}

.me-files__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.me-files__meta {
	margin-top: 6px;
	font-size: 16px;
	font-weight: 400;
	color: var(--font-color-muted);
}

.me-files__note {
	margin-top: 4px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--font-color-muted);
}

@media (min-width: 769px) {
	a.me-files__item:hover .me-files__icon::before {
		background-color: #C9D4E6;
	}
}

@media (max-width: 768px) {
	a.me-files__item {
		gap: 12px;
	}

	.me-files__icon {
		width: 32px;
		height: 40px;
	}

	.me-files__ext {
		bottom: 6px;
		font-size: 9px;
	}

	.me-files__meta {
		font-size: 14px;
	}
}
