/* Download gate + search suggestions — shared by every theme. */

/* ---- Turnstile gate ---- */
.dl-gate {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 1rem 2rem; margin: .4rem 0 1.6rem; padding: 1rem 1.25rem;
	background: rgba(128, 128, 128, .09); border-radius: 12px;
}
.dl-gate[hidden] { display: none; }
.dl-gate-copy { flex: 1 1 15rem; min-width: 15rem; }
.dl-gate-title { margin: 0; font-weight: 600; font-size: .95rem; }
.dl-gate-sub { margin: .2rem 0 0; font-family: ui-monospace, Menlo, monospace; font-size: .72rem; opacity: .65; }
.dl-gate-widget { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.dl-gate-status { margin: 0; min-height: 1em; font-family: ui-monospace, Menlo, monospace; font-size: .72rem; opacity: .6; }
.dl-gate-status.is-error { color: #c0392b; opacity: 1; }
.dl-gate-retry {
	border: 1px solid currentColor; background: transparent; border-radius: 999px;
	padding: .35rem .8rem; font-size: .8rem; cursor: pointer;
}
.dl-locked { margin: 0; font-family: ui-monospace, Menlo, monospace; font-size: .74rem; opacity: .55; }
.rel-downloads .dl-gate + .dl-row,
.dl-gate + .dl-groups { margin-top: 0; }

/* ---- search suggestions ---- */
.mb-suggest {
	position: absolute; top: calc(100% + 6px); right: 0; left: auto; z-index: 9998;
	width: 380px; max-width: calc(100vw - 24px); max-height: 380px; overflow: auto;
	margin: 0; padding: 6px; list-style: none;
	background: var(--mb-suggest-bg, #fff); color: var(--mb-suggest-ink, #15171a);
	border: 1px solid rgba(128, 128, 128, .28); border-radius: 12px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, .16); text-align: left;
}
.mb-suggest[hidden] { display: none; }
.mb-suggest li {
	display: flex; align-items: center; gap: .6rem;
	padding: 6px 8px; border-radius: 8px; cursor: pointer;
}
.mb-suggest li:hover, .mb-suggest li.is-active { background: rgba(128, 128, 128, .13); }
.mb-suggest img, .mb-suggest-nocover {
	flex: 0 0 auto; width: 34px; height: 44px; object-fit: cover; border-radius: 4px;
	background: rgba(128, 128, 128, .18);
}
.mb-suggest-txt { display: flex; flex-direction: column; min-width: 0; }
.mb-suggest-title {
	font-size: .88rem; font-weight: 600; line-height: 1.3;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mb-suggest-meta { font-family: ui-monospace, Menlo, monospace; font-size: .68rem; opacity: .6; margin-top: 1px; }
.mb-suggest-empty { padding: 10px; font-size: .85rem; opacity: .55; cursor: default; }

@media (max-width: 560px) {
	.dl-gate { padding: .9rem; }
	.mb-suggest { width: 100%; right: 0; left: 0; }
}
