/* ============================================================
   Search Enhancements — suggestions dropdown + related chips
   ============================================================ */

/* ── Wrapper must be relative so the dropdown positions itself ── */
.search_input_icon {
    position: relative;
}

/* ── Dropdown shell ──────────────────────────────────────────── */
.qs-suggest-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 99999;
    list-style: none;
    margin: 0;
    padding: 6px 0 8px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    max-height: 380px;
    overflow-y: auto;
    min-width: 280px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}
.qs-suggest-dropdown::-webkit-scrollbar        { width: 5px; }
.qs-suggest-dropdown::-webkit-scrollbar-thumb  { background: #ddd; border-radius: 4px; }

.qs-suggest-dropdown.qs-suggest--open {
    display: block;
}

/* ── Group label ─────────────────────────────────────────────── */
.qs-suggest-group-label {
    padding: 10px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aaa;
    cursor: default;
    user-select: none;
    list-style: none;
}

/* ── Suggestion row ──────────────────────────────────────────── */
.qs-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    list-style: none;
    transition: background 0.1s ease;
}

.qs-suggest-item:hover,
.qs-suggest-item.qs-suggest-item--active {
    background: #f5f5f5;
}

/* ── Icons (inline SVG via background-image) ─────────────────── */
.qs-suggest-icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.45;
}

.qs-icon-doc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

.qs-icon-tag {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E");
}

.qs-icon-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.qs-icon-history {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
}

/* ── Recent searches (history shown on focus) ─────────────────── */
.qs-suggest-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qs-suggest-clear-all {
    border: 0;
    background: none;
    margin: 0;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #f7a70d;
    cursor: pointer;
}
.qs-suggest-clear-all:hover { text-decoration: underline; }

.qs-suggest-item--recent .qs-suggest-text { color: #444; }

.qs-suggest-remove {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    line-height: 1;
    text-align: center;
    border: 0;
    padding: 0;
    background: none;
    color: #bbb;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
}
.qs-suggest-remove:hover { background: #ececec; color: #555; }

/* ── Suggestion text + sub-label ─────────────────────────────── */
.qs-suggest-text {
    flex: 1;
    font-size: 14px;
    color: #1d1d1b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.qs-suggest-text strong {
    font-weight: 700;
    color: #000;
}

.qs-suggest-sub {
    flex-shrink: 0;
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* ============================================================
   Feature 3 — Related Searches chips
   ============================================================ */

.qs-related-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 20px 0 8px;
    border-top: 1px solid #efefef;
}

.qs-related-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-right: 4px;
    white-space: nowrap;
}

.qs-related-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1b;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.qs-related-chip::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.qs-related-chip:hover {
    background: #f7a70d;
    border-color: #f7a70d;
    color: #fff;
}

.qs-related-chip:hover::before {
    filter: brightness(10);
    opacity: 0.8;
}
