/* Search field (searchform.php) */
.search-form[data-quick-search] { position: relative; }
.search-form[data-quick-search] label { position: relative; display: block; }
.search-form[data-quick-search] label::before { content: ""; position: absolute; top: 50%; left: 13px; z-index: 1; width: 15px; height: 15px; margin-top: -7.5px; pointer-events: none; background: #888; transition: background-color .15s;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='7'/%3E%3Cpath d='m16 16 5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='7'/%3E%3Cpath d='m16 16 5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.search-form[data-quick-search]:focus-within label::before { background: #e2001a; }
.search-form.wq-loading label::before { animation: wq-pulse .8s ease-in-out infinite alternate; }
@keyframes wq-pulse { to { opacity: .3; } }

.search-form[data-quick-search] .search-field,
.mh-header-search .search-form[data-quick-search] .search-field,
.mh-header-search .search-form[data-quick-search] .search-field:hover { box-sizing: border-box; width: 270px; min-width: 0; max-width: 100%; height: 36px; padding: 0 14px 0 36px; font-size: 14px; line-height: 36px; text-transform: none; color: #1f1e1e; cursor: text; background: #fff; border: 1px solid #d6d6d6; border-radius: 18px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06); transition: width .2s ease, border-color .15s, box-shadow .15s; }
.search-form[data-quick-search] .search-field:hover { border-color: #b5b5b5; }
.search-form[data-quick-search] .search-field:focus,
.mh-header-search .search-form[data-quick-search] .search-field:focus { width: 320px; outline: none; border-color: #e2001a; box-shadow: 0 0 0 3px rgba(226, 0, 26, .15); }
.search-form[data-quick-search] .search-field::placeholder { color: #8a8a8a; opacity: 1; }
.search-form[data-quick-search] .search-field::-webkit-search-cancel-button { -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer; background: #999;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; }
.search-form[data-quick-search] .search-field::-webkit-search-cancel-button:hover { background: #e2001a; }
.mh-header-search { padding: 0; }
.mh-header-bar-bottom-right .mh-header-search { padding: 2px 0; }

/* Quick search dropdown (js/quick-search.js) */
.wq-results { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000; width: 420px; max-width: calc(100vw - 20px); max-height: 70vh; overflow-y: auto; padding: 4px 0; text-align: left; background: #fff; border: 1px solid #e2e2e2; border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .06); }
.wq-results[hidden] { display: none; }
.wq-group + .wq-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid #f0f0f0; }
.wq-group-label { padding: 8px 16px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #777; }

.wq-option { display: flex; align-items: center; gap: 10px; margin: 0 6px; padding: 7px 10px; color: #1f1e1e; text-decoration: none; border-radius: 6px; }
.wq-option:hover, .wq-option.is-active { color: #1f1e1e; background: #fdecee; }
.wq-option.is-active { box-shadow: inset 3px 0 0 #e2001a; }
.wq-text { display: flex; flex-direction: column; min-width: 0; }
.wq-title { font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wq-title mark { padding: 0; color: inherit; font-weight: 700; background: none; }
.wq-subtitle { font-size: 12px; line-height: 1.3; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wq-thumb { flex: 0 0 36px; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: #eee url('../images/wormatia-header-background-archiv-min.png') center / cover; }
.wq-thumb img { width: 100%; height: 100%; object-fit: cover; }

.wq-empty { padding: 12px 16px; font-size: 14px; color: #777; }
.wq-footer { margin-top: 4px; padding-top: 4px; border-top: 1px solid #f0f0f0; }
.wq-option.wq-all { font-size: 13px; font-weight: 700; color: #e2001a; }

@media only screen and (max-width: 767px) {
	.mh-header-search .search-form[data-quick-search] .search-field,
	.mh-header-search .search-form[data-quick-search] .search-field:hover,
	.mh-header-search .search-form[data-quick-search] .search-field:focus { width: 100%; }
	.mh-header-search .search-form[data-quick-search] { padding: 0 16px; }
	.mh-header-search .wq-results { left: 50%; right: auto; transform: translateX(-50%); width: calc(100vw - 20px); }
}
@media (prefers-reduced-motion: reduce) {
	.search-form.wq-loading label::before { animation: none; }
	.search-form[data-quick-search] .search-field { transition: none; }
}

/* Search results page (search.php) */
.wq-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.wq-tab { padding: 6px 12px; font-size: 13px; color: #1f1e1e; background: #f4f4f4; border: 1px solid #e5e5e5; text-decoration: none; }
.wq-tab:hover { color: #1f1e1e; border-color: #e2001a; }
.wq-tab.is-active { color: #fff; background: #e2001a; border-color: #e2001a; }
.wq-tab-count { margin-left: 4px; font-size: 11px; opacity: .75; }
.wq-badge { display: inline-block; margin-right: 6px; padding: 1px 6px; font-size: 11px; text-transform: uppercase; color: #fff; background: #777; }
.wq-item-player .wq-badge { background: #e2001a; }
.wq-item .mh-posts-list-excerpt mark { padding: 0; font-weight: 700; color: inherit; background: #fff3b0; }
.wq-item-player .mh-posts-list-thumb img { width: 100%; max-height: 220px; object-fit: cover; }
