.dsm-search-box {
	position: relative;
	width: 100%;
}

.dsm-search-results-container {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	min-width: 100%;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	max-height: 480px;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 999;
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

@media (max-width: 480px) {
	.dsm-search-layout-grid {
		grid-template-columns: 1fr;
	}
}

.dsm-search-form {
	display: flex;
	align-items: center;
	border: 1px solid #ccc;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.dsm-search-input {
	flex: 1;
	border: none;
	padding: 10px 12px;
	font-size: 15px;
	outline: none;
}

.dsm-search-submit {
	border: none;
	background: #111;
	color: #fff;
	padding: 10px 14px;
	cursor: pointer;
}

.dsm-search-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.dsm-search-filter {
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 12px;
	cursor: pointer;
	color: #333;
}

.dsm-search-filter.is-active {
	background: #111;
	border-color: #111;
	color: #fff;
}

.dsm-search-results-container.is-active {
	display: block;
}

.dsm-search-results-container.is-loading {
	opacity: 0.6;
}

.dsm-search-no-results {
	padding: 16px;
	margin: 0;
	color: #666;
}

/* Shared result link */
.dsm-search-result {
	display: flex;
	gap: 12px;
	padding: 10px 12px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #eee;
}

.dsm-search-result:hover {
	background: #f7f7f7;
}

.dsm-search-thumb img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.dsm-search-thumb-placeholder {
	width: 56px;
	height: 56px;
	border-radius: 4px;
	background: #222;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 20px;
	flex-shrink: 0;
}

.dsm-search-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.dsm-search-title {
	font-weight: 600;
	line-height: 1.3;
}

.dsm-search-type {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
}

.dsm-search-excerpt {
	font-size: 13px;
	color: #666;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Grid layout */
.dsm-search-layout-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 4px;
	padding: 8px;
}

.dsm-search-layout-grid .dsm-search-result {
	flex-direction: column;
	border-bottom: none;
	border-radius: 6px;
}

.dsm-search-layout-grid .dsm-search-thumb img {
	width: 100%;
	height: 100px;
}

.dsm-search-layout-grid .dsm-search-thumb-placeholder {
	width: 100%;
	height: 100px;
	font-size: 28px;
}

/* List layout (default flex rules above already apply) */

/* Text-only layout */
.dsm-search-layout-text .dsm-search-result {
	padding: 8px 12px;
}
