/*
 * Web24 MultiForum Suite - Forensuche Frontend
 * Uebernommen aus Web24-Forensuche. Minimalistische Basis, per Theme ueberschreibbar.
 */

.wfs-wrap { max-width: 800px; margin: 0 auto; font-family: inherit; }

.wfs-search-bar { position: relative; margin-bottom: 12px; }

.wfs-query {
	width: 100%;
	padding: 10px 40px 10px 14px;
	font-size: 1rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
	transition: border-color 0.2s;
}
.wfs-query:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba( 0, 115, 170, 0.2 );
}

.wfs-spinner {
	display: none;
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY( -50% );
	width: 18px;
	height: 18px;
	border: 2px solid #ccc;
	border-top-color: #0073aa;
	border-radius: 50%;
}
.wfs-spinner--active { display: block; animation: wfs-spin 0.7s linear infinite; }
@keyframes wfs-spin { to { transform: translateY( -50% ) rotate( 360deg ); } }

.wfs-autocomplete {
	position: absolute;
	top: calc( 100% + 2px );
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 0 0 4px 4px;
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.12 );
	list-style: none;
	margin: 0;
	padding: 0;
	z-index: 100;
	max-height: 260px;
	overflow-y: auto;
}
.wfs-autocomplete[hidden] { display: none; }
.wfs-autocomplete__item {
	padding: 9px 14px;
	font-size: 0.9rem;
	cursor: pointer;
	color: #333;
	transition: background 0.1s;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.wfs-autocomplete__item:hover,
.wfs-autocomplete__item--active { background: #f0f7ff; color: #0073aa; }
.wfs-autocomplete__item + .wfs-autocomplete__item { border-top: 1px solid #f0f0f0; }

.wfs-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.wfs-filters select,
.wfs-filters input[type="date"] {
	padding: 6px 10px;
	font-size: 0.875rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
}
.wfs-filters select:focus,
.wfs-filters input[type="date"]:focus { outline: none; border-color: #0073aa; }
.wfs-filter-forum { flex: 1 1 160px; }
.wfs-filter-date { flex: 0 0 140px; }
.wfs-filter-orderby { flex: 0 0 120px; }

.wfs-results { display: flex; flex-direction: column; gap: 12px; }
.wfs-result {
	padding: 14px 16px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.wfs-result:hover { border-color: #0073aa; box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.08 ); }
.wfs-result__header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.wfs-result__type {
	display: inline-block;
	padding: 1px 7px;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 3px;
	background: #e8f0f7;
	color: #0073aa;
	white-space: nowrap;
}
.wfs-result--post .wfs-result__type { background: #f0f7e8; color: #2e7d32; }
.wfs-result__title { margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.wfs-result__title a { text-decoration: none; color: inherit; }
.wfs-result__title a:hover { color: #0073aa; }
.wfs-result__snippet { margin: 6px 0 8px; font-size: 0.875rem; color: #555; line-height: 1.5; }
.wfs-result__snippet mark,
.wfs-result__title mark { background: #fff3a3; color: inherit; padding: 0 1px; }
.wfs-result__meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.78rem; color: #888; }

@keyframes wfs-shimmer {
	0% { background-position: -600px 0; }
	100% { background-position: 600px 0; }
}
.wfs-skeleton { padding: 14px 16px; border: 1px solid #e8e8e8; border-radius: 4px; background: #fff; }
.wfs-skeleton__badge,
.wfs-skeleton__title,
.wfs-skeleton__snippet,
.wfs-skeleton__meta {
	border-radius: 3px;
	background: linear-gradient( 90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75% );
	background-size: 600px 100%;
	animation: wfs-shimmer 1.4s ease-in-out infinite;
}
.wfs-skeleton__badge { width: 52px; height: 16px; margin-bottom: 8px; }
.wfs-skeleton__title { width: 70%; height: 18px; margin-bottom: 10px; }
.wfs-skeleton__snippet { width: 100%; height: 13px; margin-bottom: 6px; }
.wfs-skeleton__snippet--short { width: 55%; }
.wfs-skeleton__meta { width: 180px; height: 11px; margin-top: 10px; }

.wfs-message { padding: 12px 16px; background: #f7f7f7; border-radius: 4px; color: #666; font-size: 0.9rem; margin: 0; }

.wfs-load-more-wrap { margin-top: 16px; text-align: center; }
.wfs-load-more {
	display: inline-block;
	padding: 9px 24px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid #0073aa;
	border-radius: 4px;
	background: #fff;
	color: #0073aa;
	transition: background 0.15s, color 0.15s;
}
.wfs-load-more:hover { background: #0073aa; color: #fff; }

@media ( max-width: 480px ) {
	.wfs-filters { flex-direction: column; }
	.wfs-filter-forum,
	.wfs-filter-date,
	.wfs-filter-orderby { flex: 1 1 auto; width: 100%; }
}
