/* Bowtie blog search modal (assets/js/bowtie-search.js over the static Pagefind index) */
.bt-search-open { overflow: hidden; }

.bt-search-modal {
    width: min(680px, calc(100vw - 32px));
    max-height: min(80vh, 760px);
    margin: 10vh auto auto;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fff;
    color: #1d1d1f;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
    font-family: "Gilroy", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.bt-search-modal::backdrop { background: rgba(17, 24, 39, 0.55); }

.bt-search__panel { display: flex; flex-direction: column; max-height: inherit; }
.bt-search__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #ececec;
}
.bt-search__input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 999px;
    font: inherit;
    font-size: 1.6rem;
    outline: none;
}
.bt-search__input:focus { border-color: #73cdd6; }
.bt-search__close {
    flex: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f3f3f3;
    color: #333;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}
.bt-search__status { margin: 0; padding: 12px 20px 4px; color: #6b6b6b; font-size: 1.3rem; }
.bt-search__status:empty { display: none; }
.bt-search__results { margin: 0; padding: 0 8px; overflow-y: auto; list-style: none; }
.bt-search__result + .bt-search__result { border-top: 1px solid #f0f0f0; }
.bt-search__link {
    display: flex;
    gap: 14px;
    padding: 14px 12px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}
.bt-search__link:hover, .bt-search__link:focus-visible { background: #f2fafb; }
.bt-search__image {
    flex: none;
    width: 96px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f3f3;
}
.bt-search__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bt-search__result-title { font-size: 1.6rem; font-weight: 700; line-height: 1.4; }
.bt-search__excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: #555;
    font-size: 1.4rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.bt-search__excerpt mark { background: #d7f1f4; color: inherit; border-radius: 2px; }
.bt-search__more {
    margin: 8px 20px 20px;
    padding: 10px 16px;
    border: 2px solid #73cdd6;
    border-radius: 999px;
    background: #fff;
    color: #1d1d1f;
    font: inherit;
    font-size: 1.4rem;
    cursor: pointer;
}
.bt-search__results:empty + .bt-search__more { display: none; }

@media (max-width: 600px) {
    .bt-search-modal { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; border-radius: 0; }
    .bt-search__image { width: 72px; height: 48px; }
}
