.wpfl-wrapper {
	--wpfl-bg: #2b2b2b;
	--wpfl-bg-alt: #333333;
	--wpfl-border: #4a4a4a;
	--wpfl-header-bg: #d9d9df;
	--wpfl-header-text: #1a1a1a;
	--wpfl-text: #cfcfcf;
	--wpfl-link: #e0468a;
	--wpfl-btn-bg: #565656;
	--wpfl-btn-text: #eaeaea;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 100%;
	overflow-x: auto;
}

.wpfl-title {
	color: var(--wpfl-text);
	margin-bottom: 0.75em;
}

.wpfl-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--wpfl-bg);
	color: var(--wpfl-text);
	font-size: 14px;
}

.wpfl-toolbar {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.wpfl-sort-select,
.wpfl-search {
	box-sizing: border-box;
	background: var(--wpfl-bg-alt);
	border: 1px solid var(--wpfl-border);
	color: var(--wpfl-text);
	border-radius: 4px;
	padding: 7px 10px;
	font-size: 13px;
}

.wpfl-search {
	width: 220px;
	max-width: 100%;
}

.wpfl-sort-select:focus,
.wpfl-search:focus {
	outline: none;
	border-color: var(--wpfl-link);
}

.wpfl-table thead th.wpfl-sortable {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}

.wpfl-table thead th.wpfl-sortable:hover {
	background: #c7c7cf;
}

.wpfl-sort-arrow {
	display: inline-block;
	margin-left: 4px;
	width: 0;
	height: 0;
	vertical-align: middle;
	opacity: 0.35;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-bottom: 5px solid currentColor;
}

th.wpfl-sorted-asc .wpfl-sort-arrow {
	opacity: 1;
	border-bottom: 5px solid currentColor;
	border-top: none;
}

th.wpfl-sorted-desc .wpfl-sort-arrow {
	opacity: 1;
	border-bottom: none;
	border-top: 5px solid currentColor;
}

.wpfl-cat-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.wpfl-cat-btn {
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background: var(--wpfl-bg-alt);
	border: 1px solid var(--wpfl-border);
	color: var(--wpfl-text);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.wpfl-cat-btn:hover {
	border-color: var(--wpfl-link);
}

.wpfl-cat-btn.wpfl-cat-active {
	background: var(--wpfl-link);
	border-color: var(--wpfl-link);
	color: #fff;
}

.wpfl-row-hidden {
	display: none !important;
}

.wpfl-no-results {
	color: #a9a9a9;
	padding: 12px 4px;
}

.wpfl-table thead th {
	background: var(--wpfl-header-bg);
	color: var(--wpfl-header-text);
	text-transform: uppercase;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.03em;
	text-align: left;
	padding: 10px 14px;
	border-bottom: 1px solid var(--wpfl-border);
}

.wpfl-table tbody tr {
	border-bottom: 1px solid var(--wpfl-border);
}

.wpfl-table tbody tr:nth-child(odd) {
	background: var(--wpfl-bg-alt);
}

.wpfl-table td {
	padding: 12px 14px;
	vertical-align: middle;
}

.wpfl-col-thumb {
	width: 64px;
}

.wpfl-thumb-img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 3px;
	display: block;
}

.wpfl-icon {
	width: 40px;
	height: 48px;
	display: block;
	border-radius: 3px;
	background: #555;
	position: relative;
}

.wpfl-icon::after {
	content: attr(title);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 700;
	color: #fff;
}

.wpfl-icon-pdf { background: #b3261e; }
.wpfl-icon-doc { background: #2b579a; }
.wpfl-icon-xls { background: #217346; }
.wpfl-icon-zip { background: #8a6d3b; }
.wpfl-icon-txt { background: #555555; }
.wpfl-icon-generic { background: #6b6b6b; }

.wpfl-col-name {
	min-width: 280px;
}

.wpfl-name-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

.wpfl-filename {
	color: var(--wpfl-link);
	text-decoration: none;
	font-weight: 600;
	word-break: break-word;
	flex: 1 1 auto;
	min-width: 120px;
}

.wpfl-filename:hover {
	text-decoration: underline;
}

.wpfl-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: nowrap;
	flex-shrink: 0;
	margin-left: auto;
}

.wpfl-btn {
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	background: var(--wpfl-btn-bg);
	color: var(--wpfl-btn-text);
	border: none;
	border-radius: 5px;
	width: 30px;
	height: 30px;
	padding: 0;
	font-family: inherit;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	flex-shrink: 0;
}

.wpfl-btn svg {
	width: 16px;
	height: 16px;
	display: block;
}

.wpfl-btn:hover {
	background: #6e6e6e;
	color: #fff;
}

.wpfl-btn-copy.wpfl-copied {
	background: #3a8a4a;
	color: #fff;
}

.wpfl-col-size,
.wpfl-col-date {
	white-space: nowrap;
	color: #a9a9a9;
}

.wpfl-empty,
.wpfl-error {
	color: #cfcfcf;
	padding: 12px;
}

.wpfl-error {
	color: #ff8b8b;
}

@media (max-width: 600px) {
	.wpfl-table thead {
		display: none;
	}

	.wpfl-table, .wpfl-table tbody {
		display: block;
		width: 100%;
	}

	/* Vsaka datoteka postane samostojna "kartica" z izmeničnim ozadjem,
	   neodvisno od tega, kako je vrstica prej dobila barvo. */
	.wpfl-table tbody tr {
		display: flex;
		align-items: flex-start;
		width: 100%;
		padding: 12px 14px;
		border-bottom: 1px solid var(--wpfl-border);
		background: var(--wpfl-bg);
	}

	.wpfl-table tbody tr:nth-child(odd) {
		background: var(--wpfl-bg-alt);
	}

	.wpfl-table td {
		padding: 0;
	}

	/* Stolpca Size in Date na mobilnem ne prikazujemo - prostor je omejen,
	   ta podatka pa nista ključna za hitro prepoznavo/prenos datoteke. */
	.wpfl-col-size,
	.wpfl-col-date {
		display: none;
	}

	.wpfl-col-thumb {
		width: auto;
		flex: 0 0 auto;
		margin-right: 12px;
	}

	.wpfl-col-name {
		flex: 1 1 auto;
		min-width: 0;
	}

	/* Dve vrstici: 1) ime datoteke, 2) gumbi (Copy Link je skrit na mobilnem). */
	.wpfl-name-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.wpfl-filename {
		width: 100%;
	}

	.wpfl-actions {
		width: auto;
		margin-left: 0;
		justify-content: flex-start;
	}

	/* Na mobilnem prostorska omejitev - prikažemo samo Odpri in Bot. */
	.wpfl-btn-download,
	.wpfl-btn-copy {
		display: none;
	}

	.wpfl-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.wpfl-sort-select,
	.wpfl-search {
		width: 100%;
	}
}
