/* Modern compact search results */
#search_form {
position: relative;
}

ul.search_results,
ul.omls_search_results {
box-sizing: border-box;
right: 0;
left: auto;
top: 100%;
width: min(360px, calc(100vw - 32px));
max-height: min(520px, calc(100vh - 140px));
margin: 8px 0 0;
padding: 4px;
overflow-x: hidden;
overflow-y: auto;
list-style: none;
background: rgba(255, 255, 255, 0.98);
border: 1px solid rgba(15, 23, 42, 0.1);
border-top: 1px solid rgba(15, 23, 42, 0.1);
border-bottom: 1px solid rgba(15, 23, 42, 0.1);
border-radius: 10px;
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
backdrop-filter: blur(10px);
}

ul.search_results li,
ul.omls_search_results li {
box-sizing: border-box;
display: grid;
grid-template-columns: 42px minmax(0, 1fr) !important;
grid-template-rows: 1fr auto auto 1fr;
column-gap: 10px;
align-items: center;
width: 100%;
height: auto;
min-height: 54px !important;
margin: 0;
padding: 6px 10px !important;
overflow: hidden;
font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
font-size: 12px;
line-height: 1.28;
color: #475569;
background: transparent;
border: 0;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.16s ease, transform 0.16s ease;
}

ul.search_results li:not(.post_with_thumb)::before,
ul.omls_search_results li:not(.post_with_thumb)::before {
content: "";
grid-row: 1 / span 4;
grid-column: 1;
width: 42px !important;
height: 42px !important;
box-sizing: border-box;
background-color: #f3f6fb;
background-image: linear-gradient(135deg, rgba(148, 163, 184, 0) 0 68%, rgba(148, 163, 184, 0.22) 68% 100%);
border: 1px solid #e2e8f0;
border-radius: 7px;
}

ul.search_results li + li,
ul.omls_search_results li + li {
margin-top: 1px;
}

ul.search_results li:hover,
ul.omls_search_results li:hover {
background: #f5f7fb;
transform: translateY(-1px);
}

ul.search_results li a,
ul.search_results li a:visited,
ul.omls_search_results li a,
ul.omls_search_results li a:visited {
display: block;
grid-column: 2;
grid-row: 2;
height: auto;
margin: 0 0 4px;
padding: 0;
overflow: hidden;
color: #1f3b64;
font-size: 13px;
font-weight: 700;
line-height: 1.25;
text-decoration: none;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}

ul.search_results li.post_with_thumb,
ul.omls_search_results li.post_with_thumb {
min-height: 54px !important;
}

ul.search_results li.post_with_thumb img.post_thumb,
ul.omls_search_results li.post_with_thumb img.post_thumb {
grid-row: 1 / span 4;
grid-column: 1;
float: none;
width: 42px !important;
height: 42px !important;
margin: 0;
object-fit: cover;
background: #eef2f7;
border-radius: 7px;
}

ul.search_results li.post_with_thumb a,
ul.omls_search_results li.post_with_thumb a {
width: auto;
height: auto;
margin: 0 0 4px;
}

ul.search_results .excerpt,
ul.search_results .meta,
ul.omls_search_results .excerpt,
ul.omls_search_results .meta,
ul.search_results #om-live-search_author,
ul.search_results #om-live-search_date {
width: auto;
margin: 0;
color: #64748b;
font-size: 12px;
font-weight: 400;
line-height: 1.3;
}

ul.search_results .excerpt,
ul.omls_search_results .excerpt {
grid-column: 2;
grid-row: 3;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}

ul.search_results li:not(:has(.excerpt)) a,
ul.omls_search_results li:not(:has(.excerpt)) a {
grid-row: 1 / span 4;
align-self: center;
margin-bottom: 0;
}

ul.search_results p:empty,
ul.omls_search_results p:empty {
display: none;
}

ul.search_results .om-live-search_author,
ul.search_results .om-live-search_date,
ul.search_results #om-live-search_author,
ul.search_results #om-live-search_date,
ul.omls_search_results .om-live-search_author,
ul.omls_search_results .om-live-search_date,
ul.omls_search_results #om-live-search_author,
ul.omls_search_results #om-live-search_date {
display: none;
}

ul.search_results div.clearfix,
ul.omls_search_results div.clearfix {
display: none;
}

.search_footer {
box-sizing: border-box;
margin-top: 4px;
padding: 8px 10px;
text-align: right;
background: #f8fafc;
border-radius: 8px;
}

.search_footer a,
.search_footer a:visited {
margin: 0;
color: #31528b;
font-size: 12px;
font-weight: 700;
text-decoration: none;
}

.search_results_activity_indicator,
#search_results_activity_indicator {
z-index: 2147483647;
pointer-events: none;
}
