/**
 * @copyright 2026 Daniel McDonald, Daka Media KG
 * @author Daniel McDonald <info@daka-media.de>
 * @license MIT
 * @homepage https://daka-media.de/
 */

/* Container */
.acf-filelist {
	max-width: 100%;
}

/* Category filter */
.acf-filelist-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.acf-filelist-filter-btn {
	display: inline-block;
	padding: 6px 16px;
	border: 1px solid #ddd;
	border-radius: 20px;
	background: #fff;
	color: #555;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
}

.acf-filelist-filter-btn:hover {
	border-color: #0073aa;
	color: #0073aa;
}

.acf-filelist-filter-btn.active {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

/* File list */
.acf-filelist-files {
	list-style: none;
	padding: 0;
	margin: 0;
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden;
}

.acf-filelist-file {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 20px;
	border-bottom: 1px solid #eee;
	transition: background-color 0.2s ease;
}

.acf-filelist-file:last-child {
	border-bottom: none;
}

.acf-filelist-file:hover {
	background-color: #f9f9fb;
}

/* Icon */
.acf-filelist-file-icon {
	flex-shrink: 0;
	width: 40px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.acf-filelist-file-icon svg,
.acf-filelist-file-icon .acf-filelist-icon {
	width: 36px;
	height: 45px;
}

/* File info */
.acf-filelist-file-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.acf-filelist-file-title {
	font-weight: 600;
	font-size: 15px;
	color: #1d1d1f;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.acf-filelist-file-desc {
	font-size: 13px;
	color: #86868b;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* File size */
.acf-filelist-file-size {
	flex-shrink: 0;
	font-size: 13px;
	color: #86868b;
	white-space: nowrap;
}

/* Download button */
.acf-filelist-download {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	background: #0073aa;
	color: #fff !important;
	border-radius: 6px;
	text-decoration: none !important;
	font-size: 14px;
	font-weight: 500;
	transition: background-color 0.2s ease;
	line-height: 1.4;
}

.acf-filelist-download:hover {
	background: #005d8c;
	color: #fff !important;
}

.acf-filelist-download svg {
	flex-shrink: 0;
}

/* Hidden state for filter */
.acf-filelist-file.acf-filelist-hidden {
	display: none;
}

/* Responsive */
@media (max-width: 600px) {
	.acf-filelist-file {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px 14px;
	}

	.acf-filelist-file-info {
		flex-basis: calc(100% - 56px);
	}

	.acf-filelist-file-size {
		order: 4;
		flex-basis: auto;
	}

	.acf-filelist-download {
		order: 5;
		width: 100%;
		justify-content: center;
	}
}
