/* LS Suche (ls_search_engine) - search panel under the search field. Colours from the theme (NOVA variables). */
.lsse-host { position: relative; }

/* spinner inside the field (left of the clear button) while an answer is loading */
.lsse-spin {
    position: absolute; top: 50%; right: 92px; width: 16px; height: 16px; margin-top: -8px; z-index: 5;
    border: 2px solid rgba(0, 0, 0, .12); border-top-color: var(--primary, #8b0000); border-radius: 50%;
    opacity: 0; visibility: hidden; transition: opacity .12s ease; pointer-events: none;
}
.lsse-busy .lsse-spin { opacity: 1; visibility: visible; animation: lsseSpin .7s linear infinite; }
@keyframes lsseSpin { to { transform: rotate(360deg); } }

.lsse-box {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1060;
    display: flex; flex-direction: column; min-width: 300px; max-height: 70vh;
    background: #fff; border: 1px solid #e3e3e3; border-radius: 10px; overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .16); text-align: left; font-size: 14px; line-height: 1.3;
}
.lsse-box[hidden] { display: none; }
.lsse-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }

/* thin progress bar while a newer answer is loading (the old list stays visible) */
.lsse-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; overflow: hidden; z-index: 2; }
.lsse-box.is-loading .lsse-progress::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--primary, #8b0000);
    animation: lsseBar 1s ease-in-out infinite;
}
@keyframes lsseBar { from { left: -35%; } to { left: 100%; } }
.lsse-box.is-loading[data-state="results"] .lsse-results { opacity: .7; transition: opacity .15s ease; }

.lsse-title {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #777;
}
.lsse-group + .lsse-group { border-top: 1px solid #efefef; margin-top: 4px; padding-top: 2px; }

/* results: one column (phones: products first), desktop with 2 columns: models + categories left, products right */
.lsse-col + .lsse-col { border-top: 1px solid #efefef; margin-top: 4px; padding-top: 2px; }
@media (min-width: 992px) {
    .lsse-cols.is-2col { display: grid; grid-template-columns: minmax(240px, 34%) 1fr; grid-template-areas: "c p"; }
    .lsse-cols.is-2col .lsse-col-c { grid-area: c; border-right: 1px solid #efefef; border-top: 0; margin-top: 0; padding-top: 0; }
    .lsse-cols.is-2col .lsse-col-p { grid-area: p; }
}

.lsse-item {
    display: flex; align-items: center; gap: 10px; padding: 7px 14px; color: var(--secondary, #222) !important;
    text-decoration: none !important; cursor: pointer;
}
.lsse-item:hover, .lsse-item.is-active { background: var(--secondary-light, #f3f5f8); }
.lsse-img { flex: 0 0 40px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.lsse-img img { max-width: 40px; max-height: 40px; object-fit: contain; }
.lsse-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.lsse-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lsse-name b { font-weight: 700; color: var(--primary, #8b0000); }
.lsse-sub { font-size: 12px; color: #888; }
.lsse-price { flex: 0 0 auto; font-weight: 700; white-space: nowrap; }
.lsse-empty { padding: 12px 14px; color: #777; }

/* footer: always visible, right aligned, normal weight, italic, underlined */
.lsse-foot { flex: 0 0 auto; padding: 9px 14px; border-top: 1px solid #efefef; background: #fff; text-align: right; }
.lsse-foot[hidden] { display: none; }
.lsse-all { font-weight: 400; font-style: italic; text-decoration: underline !important; color: var(--primary, #8b0000) !important; }

/* start area: history, popular terms, theme slot (finder), products, admin HTML */
.lsse-sec { padding: 2px 0 8px; }
.lsse-sec + .lsse-sec { border-top: 1px solid #efefef; padding-top: 4px; }
.lsse-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 14px 4px; }
.lsse-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border: 1px solid #dfe3e8;
    border-radius: 999px; background: #fff; color: var(--secondary, #222) !important; text-decoration: none !important;
    font-size: 13px; line-height: 1.2; cursor: pointer;
}
a.lsse-chip:hover, .lsse-chip .lsse-term:hover, .lsse-chip.is-active, .lsse-chip .is-active { border-color: var(--primary, #8b0000); color: var(--primary, #8b0000) !important; }
.lsse-chip-h { padding: 0 4px 0 0; }
.lsse-chip-h .lsse-term { display: inline-flex; align-items: center; gap: 6px; padding: 5px 4px 5px 10px; color: inherit !important; text-decoration: none !important; background: none; }
.lsse-chips .lsse-item { background: none; }
.lsse-hdel, .lsse-hclear { border: 0; background: none; padding: 0 4px; color: #999; cursor: pointer; font: inherit; }
.lsse-hdel { font-size: 16px; line-height: 1; }
.lsse-hdel:hover, .lsse-hclear:hover { color: var(--primary, #8b0000); }
.lsse-hclear { font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; text-decoration: underline; }
.lsse-ic { width: 12px; height: 12px; flex: 0 0 12px; opacity: .55; background: no-repeat center / contain; }
.lsse-ic-h { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-width='1.6' d='M8 2.5a5.5 5.5 0 1 1-5.2 3.7M8 5v3.3l2.2 1.4M1.5 2.5v3.7h3.7'/%3E%3C/svg%3E"); }
.lsse-ic-t { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-width='1.6' d='M1.5 11.5l4-4 3 3 6-6M10 4.5h4.5V9'/%3E%3C/svg%3E"); }
.lsse-grid { display: grid; grid-template-columns: 1fr; }
.lsse-slot:empty { display: none; }
.lsse-slot { padding: 6px 14px 10px; }
.lsse-html { padding: 6px 14px 10px; }
@media (min-width: 992px) {
    .lsse-grid { grid-template-columns: 1fr 1fr; }
}

/* placeholders while the first answer is on its way */
.lsse-sk { display: block; background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%); background-size: 400% 100%;
    animation: lsseSk 1.2s ease infinite; border-radius: 4px; }
.lsse-chip.lsse-sk { width: 90px; height: 26px; border: 0; border-radius: 999px; }
.lsse-sk-row { cursor: default; }
.lsse-sk-row:hover { background: none; }
.lsse-img.lsse-sk { border-radius: 6px; }
.lsse-sk-l { height: 12px; width: 85%; margin: 3px 0 6px; }
.lsse-sk-s { height: 10px; width: 40%; }
@keyframes lsseSk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

@media (max-width: 767.98px) {
    .lsse-box { min-width: 0; font-size: 15px; }
    .lsse-item { padding: 9px 12px; }
    .lsse-spin { right: 84px; }
}
@media (prefers-reduced-motion: reduce) {
    .lsse-busy .lsse-spin, .lsse-box.is-loading .lsse-progress::after, .lsse-sk { animation-duration: 2s; }
}

/* theme slot (LSTonerFast: printer finder in its tight "headersearch" style) */
.lsse-slot .lsf-finder { display: flex; justify-content: center; }
.lsse-slot .lsf-finder .ls-search-wrap { width: 100%; max-width: 760px; margin: 0 auto; float: none; flex: 0 1 760px; border-radius: 10px; }
.lsse-slot .lsf-finder .tab-btns-wrap { text-align: center; }
/* start area: short content - the finder's own dropdowns may reach beyond the panel instead of scrolling inside it */
.lsse-box[data-state="start"] { overflow: visible; }
.lsse-box[data-state="start"] .lsse-body { overflow: visible; }

/* 0.5.0: the spinner takes the place of the clear button (×) while an answer loads */
.lsse-busy .form-clear { visibility: hidden; }

/* 0.5.0: rotating placeholder - overlay over the empty field (the native placeholder stays for the first paint) */
.lsse-ph-on { position: relative; }
.lsse-ph-on > input::placeholder { color: transparent !important; }
.lsse-ph {
    position: absolute; top: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: .3em;
    overflow: hidden; white-space: nowrap; pointer-events: none;
    color: #9aa1ab; font-style: italic; font-weight: 700; line-height: 1.2;
}
.lsse-ph-on > .lsse-ph { visibility: visible !important; }
.lsse-ph-hide > .lsse-ph { visibility: hidden !important; }
.lsse-ph-w {
    display: inline-block; overflow: hidden; text-overflow: ellipsis;
    transition: transform .26s ease, opacity .26s ease;
}
.lsse-ph-w.is-out { opacity: 0; transform: translateY(-70%); }
.lsse-ph-w.is-in { opacity: 0; transform: translateY(70%); transition: none; }
@media (prefers-reduced-motion: reduce) { .lsse-ph-w { transition: none; } }

/* 0.5.0: full-screen panel on phones - form fixed on top with a close button, list fills the screen */
.lsse-close { display: none; }
.lsse-host-full {
    position: fixed !important; top: 0; left: 0; right: 0; z-index: 2147483000; display: flex; align-items: center; gap: 6px;
    margin: 0 !important; padding: 10px 10px 10px 4px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.lsse-host-full > :not(.lsse-close):not(.lsse-box):not(.lsse-spin) { flex: 1 1 auto; min-width: 0; }
.lsse-host-full .lsse-close {
    display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 40px; height: 44px;
    padding: 0; border: 0; background: none; color: var(--secondary, #222); cursor: pointer;
}
.lsse-host-full .lsse-close::before {
    content: ""; width: 12px; height: 12px; margin-left: 4px;
    border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg);
}
.lsse-host-full .lsse-box {
    position: fixed; left: 0; right: 0; width: auto !important; min-width: 0; max-height: none;
    border: 0; border-top: 1px solid #efefef; border-radius: 0; box-shadow: none;
}
.lsse-host-full .lsse-item { padding-top: 9px; padding-bottom: 9px; }
