/**
 * Document list — frontend styling for the Manuals & Guides tab.
 *
 * Inline styles are stripped by wp_kses_post() when the rt-blocks/product-tabs
 * block renders tab content, so layout has to live in this file.
 */

.rsm-document-list {
	list-style: none;
	padding: 0;
	margin: 1em 0 0;
	display: flex;
	flex-direction: column;
}

.rsm-document-list__item {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.75em 0;
	border-bottom: 1px solid #e2e4e7;
}

.rsm-document-list__item:first-child {
	border-top: 1px solid #e2e4e7;
}

.rsm-document-list__item::before,
.rsm-document-list__item::marker {
	content: none;
	display: none;
}

.rsm-document-list__icon.dashicons {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	font-size: 22px;
	line-height: 1;
	color: #d63638;
}

.rsm-document-list__title {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	color: inherit;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

a.rsm-document-list__title:hover,
a.rsm-document-list__title:focus {
	color: #2271b1;
	text-decoration: underline;
}

.rsm-document-list__size {
	flex-shrink: 0;
	color: #646970;
	font-size: 0.85em;
	font-variant-numeric: tabular-nums;
}

.rsm-document-list__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-left: auto;
	color: #646970;
	text-decoration: none;
	transition: color 0.15s ease;
}

.rsm-document-list__download:hover,
.rsm-document-list__download:focus {
	color: #2271b1;
}

.rsm-document-list__download .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
	line-height: 1;
}

@media (max-width: 480px) {
	.rsm-document-list__item {
		flex-wrap: wrap;
		padding: 0.75em 0.875em;
	}

	.rsm-document-list__title {
		white-space: normal;
		flex-basis: 100%;
		order: 2;
	}

	.rsm-document-list__icon.dashicons {
		order: 1;
	}

	.rsm-document-list__size {
		order: 3;
	}

	.rsm-document-list__download {
		order: 4;
	}
}
