/* Homepage search uses the exact surfaces of the featured catalogue: a useful
 * action in the page flow, not a second visual theme. */
.kiv-home-search {
    position: relative;
    z-index: 30;
    margin: 0 0 18px;
    overflow: visible;
    border: 1px solid #d9e8e0;
    border-top: 3px solid #15a96a;
    border-radius: 4px;
    background: linear-gradient(135deg, #f4fbf7 0%, #ffffff 58%, #f8fbfa 100%);
    box-shadow: 0 6px 18px rgba(29, 60, 48, .06);
    color: #30424c;
}

.kiv-home-search-topline,
.kiv-home-search-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    padding: 10px 16px 6px;
    color: #6d818b;
    font-size: 10px;
    line-height: 1.2;
}

.kiv-home-search-footer { padding-top: 7px; padding-bottom: 13px; }

.kiv-home-search-route,
.kiv-home-search-local,
.kiv-home-search-keys {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kiv-home-search-route {
    color: #168654;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.kiv-home-search-route i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4dc874;
    box-shadow: 0 0 0 3px rgba(77, 200, 116, .12);
}

.kiv-home-search-local { color: #7a8d95; }
.kiv-home-search-local .glyphicon { color: #5ba979; font-size: 10px; }

.kiv-home-search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    margin: 0 16px;
    padding: 0 14px;
    border: 1px solid #dfe9e3;
    border-radius: 3px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.kiv-home-search-input-row:focus-within {
    border-color: #86ce9f;
    box-shadow: 0 0 0 3px rgba(21, 169, 106, .10);
}

.kiv-home-search-prompt {
    color: #25a965;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
}

.kiv-home-search-input-row input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #30424c;
    caret-color: #16945a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.kiv-home-search-input-row input::placeholder { color: #92a0a4; opacity: 1; }

.kiv-home-search kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    padding: 2px 5px;
    border: 1px solid #d3e1d9;
    border-radius: 3px;
    background: #f7fbf8;
    color: #6d818b;
    box-shadow: none;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
}

.kiv-home-search-shortcut { display: inline-flex; gap: 3px; }
.kiv-home-search-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }

.kiv-home-search-suggestions button {
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid #d6e7dc;
    border-radius: 12px;
    background: #ffffff;
    color: #58706a;
    font-size: 11px;
    line-height: 1.3;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.kiv-home-search-suggestions button:hover,
.kiv-home-search-suggestions button:focus {
    border-color: #86ce9f;
    outline: 0;
    background: #eff9f2;
    color: #117346;
}

.kiv-home-search-keys { color: #819199; font-size: 10px; }
.kiv-home-search-keys kbd { min-width: auto; min-height: 18px; padding: 1px 4px; }

.kiv-home-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 31;
    width: 100%;
    max-height: 420px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #cce1d4;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(36, 72, 56, .16);
}

.kiv-home-search-result {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 13px;
    border-bottom: 1px solid #edf3ef;
    color: #30424c;
    text-decoration: none;
}

.kiv-home-search-result:last-child { border-bottom: 0; }
.kiv-home-search-result:hover,
.kiv-home-search-result:focus,
.kiv-home-search-result.is-active { background: #eff9f2; color: #176f48; outline: 0; text-decoration: none; }

.kiv-home-search-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #dcebe3;
    border-radius: 5px;
    background: #f1f8f4;
    color: #278659;
}

.kiv-home-search-result-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.kiv-home-search-result-copy { min-width: 0; }
.kiv-home-search-result-copy strong,
.kiv-home-search-result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kiv-home-search-result-copy strong { color: inherit; font-size: 13px; font-weight: 600; }
.kiv-home-search-result-copy small { margin-top: 2px; color: #71838b; font-size: 10px; }
.kiv-home-search-result-action { color: #5a9770; font-size: 10px; white-space: nowrap; }
.kiv-home-search-empty { padding: 20px; color: #71838b; font-size: 13px; text-align: center; }

@media (min-width: 768px) {
    body.kiv-home-search-active .kiv-shell-launch { display: none; }
}

html.kiv-shell-dark .kiv-home-search {
    border-color: #3a514a;
    border-top-color: #34ba77;
    background: linear-gradient(135deg, #263b35 0%, #24343e 58%, #22313a 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
    color: #dce8e3;
}

html.kiv-shell-dark .kiv-home-search-route { color: #8bd5a7; }
html.kiv-shell-dark .kiv-home-search-local,
html.kiv-shell-dark .kiv-home-search-keys { color: #aebdc1; }
html.kiv-shell-dark .kiv-home-search-input-row { border-color: #3b515a; background: #293b44; box-shadow: none; }
html.kiv-shell-dark .kiv-home-search-input-row:focus-within { border-color: #5b9b71; box-shadow: 0 0 0 3px rgba(91, 155, 113, .16); }
html.kiv-shell-dark .kiv-home-search-input-row input { color: #e2ece9; }
html.kiv-shell-dark .kiv-home-search-input-row input::placeholder { color: #9cacb2; }
html.kiv-shell-dark .kiv-home-search kbd { border-color: #4a5d62; background: #23323b; color: #b8c8c9; }
html.kiv-shell-dark .kiv-home-search-suggestions button { border-color: #3d5b4d; background: #263e35; color: #b8cfbf; }
html.kiv-shell-dark .kiv-home-search-suggestions button:hover,
html.kiv-shell-dark .kiv-home-search-suggestions button:focus { border-color: #70b88a; background: #2a493b; color: #e6f3e9; }
html.kiv-shell-dark .kiv-home-search-results { border-color: #3b5450; background: #24343e; }
html.kiv-shell-dark .kiv-home-search-result { border-color: #354b51; color: #dce8e3; }
html.kiv-shell-dark .kiv-home-search-result:hover,
html.kiv-shell-dark .kiv-home-search-result:focus,
html.kiv-shell-dark .kiv-home-search-result.is-active { background: #294038; color: #bde8c8; }
html.kiv-shell-dark .kiv-home-search-result-copy small,
html.kiv-shell-dark .kiv-home-search-empty { color: #aebdc1; }

@media (max-width: 767px) {
    .kiv-home-search { margin: 0 0 12px; border-radius: 4px; }
    .kiv-home-search-topline,
    .kiv-home-search-footer { padding-right: 12px; padding-left: 12px; }
    .kiv-home-search-input-row { min-height: 56px; gap: 9px; margin: 0 12px; padding: 0 10px; }
    .kiv-home-search-input-row input { font-size: 16px; }
    .kiv-home-search-shortcut { display: none; }
    .kiv-home-search-local,
    .kiv-home-search-keys { display: none; }
    .kiv-home-search-results { top: calc(100% + 6px); max-height: min(360px, 56vh); }
    .kiv-home-search-result { grid-template-columns: 30px minmax(0, 1fr); padding: 9px 10px; }
    .kiv-home-search-result-action { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .kiv-home-search-input-row,
    .kiv-home-search-suggestions button { transition: none; }
}
