/* Live search window. Colours fall back to the plugin's own when the theme has no cs50 variables. */
.cs-search {
    --s-ink: var(--cs-ink, #23283a);
    --s-muted: var(--cs-muted, #6a7086);
    --s-primary: var(--cs-primary, #394260);
    --s-line: var(--cs-line, #e3e6ef);
    --s-soft: var(--cs-soft, #f1f2f6);
    position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
    color: var(--s-ink); font-size: 16px; line-height: 1.4;
}
.cs-search[hidden] { display: none; }
.cs-search *, .cs-search *::before, .cs-search *::after { box-sizing: border-box; }
html.cs-search-open { overflow: hidden; }
.cs-search__backdrop { position: absolute; inset: 0; background: rgba(35, 40, 58, .5); }
.cs-search__box { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: 76vh; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(20, 24, 38, .35); }
.cs-search__form { display: flex; align-items: center; gap: 12px; margin: 0; padding: 6px 16px 6px 20px; border-bottom: 1px solid var(--s-line); }
.cs-search__form::before { content: ""; flex: none; width: 20px; height: 20px; background: currentColor; color: var(--s-muted); -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.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.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.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.cs-search.is-loading .cs-search__form::before { animation: cs-search-pulse .8s ease-in-out infinite; }
@keyframes cs-search-pulse { 50% { opacity: .3; } }
.cs-search .cs-search__input { flex: 1; min-width: 0; height: 52px; margin: 0; padding: 0; border: 0; border-radius: 0; outline: none; background: none; box-shadow: none; color: var(--s-ink); font: inherit; font-size: 18px; -webkit-appearance: none; appearance: none; }
.cs-search .cs-search__input::placeholder { color: #9aa0b4; }
.cs-search .cs-search__input::-webkit-search-cancel-button { display: none; }
.cs-search kbd, .cs-search__esc, .cs-search-hotkey { padding: 3px 7px; border: 1px solid var(--cs-line, #e3e6ef); border-radius: 6px; background: #fff; box-shadow: none; color: var(--cs-muted, #6a7086); font: 600 12px/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; white-space: nowrap; }
.cs-search__esc { flex: none; cursor: pointer; }
.cs-search__esc:hover { border-color: var(--s-primary); color: var(--s-primary); }
.cs-search__status { padding: 28px 20px; color: var(--s-muted); font-size: 15px; text-align: center; }
.cs-search__status[hidden] { display: none; }
.cs-search__list { overflow-y: auto; padding: 6px 8px 8px; overscroll-behavior: contain; }
.cs-search__list:empty { display: none; }
.cs-search__group { padding: 12px 12px 6px; color: var(--s-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cs-search .cs-search__item { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 12px; color: var(--s-ink); text-decoration: none; }
.cs-search .cs-search__item.is-active { background: var(--s-soft); }
.cs-search__item--category::before { content: ""; flex: none; width: 8px; height: 8px; margin: 0 6px; border-radius: 50%; background: var(--s-primary); }
.cs-search__picture { flex: none; width: 56px; height: 40px; overflow: hidden; border-radius: 8px; background: var(--s-soft); }
.cs-search__picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-search__name { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 500; }
.cs-search mark { padding: 0; background: #ffe58a; color: inherit; border-radius: 3px; }
.cs-search__price { flex: none; color: var(--s-muted); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.cs-search__price.is-free { color: #2e9e5b; }
.cs-search .cs-search__item--all { justify-content: center; margin-top: 4px; color: var(--s-primary); font-size: 14.5px; font-weight: 600; }
.cs-search__foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 20px; border-top: 1px solid var(--s-line); background: #fafbfd; color: var(--s-muted); font-size: 12.5px; }

/* The shortcut shown in the theme's own search field */
.cs-search-field { position: relative; }
.cs-search-hotkey { position: absolute; top: 50%; right: 52px; transform: translateY(-50%); pointer-events: none; }

@media (max-width: 640px) {
    .cs-search { padding: 0; }
    .cs-search__box { max-width: none; max-height: 100%; height: 100%; border-radius: 0; }
    .cs-search__foot, .cs-search-hotkey { display: none; }
}
