/* Structure Viewer 2.2 – Search & Filter Results */

.sv-search-results,
.sv-filter-results {
    background: var(--sv-surface);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius);
    margin-bottom: 20px;
    overflow: hidden;
}

/* ── Header strip ──────────────────────────────────────────── */
.sv-search-results-header,
.sv-filter-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--sv-border);
    background: var(--sv-surface-2);
}

.sv-search-results-header h3,
.sv-filter-results-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-text);
}

/* ── List ──────────────────────────────────────────────────── */
.sv-search-results-list,
.sv-filter-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sv-search-result,
.sv-filter-result {
    display: flex;
    align-items: center;
    padding: 10px 22px;
    border-bottom: 1px solid var(--sv-border);
    cursor: default;
    transition: background var(--sv-transition);
    gap: 10px;
}

.sv-search-result:last-child,
.sv-filter-result:last-child {
    border-bottom: none;
}

.sv-search-result:hover,
.sv-filter-result:hover {
    background: var(--sv-surface-2);
}

/* ── Icons ─────────────────────────────────────────────────── */
.sv-search-result .sv-folder-icon,
.sv-search-result .sv-file-icon,
.sv-filter-result .sv-file-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.sv-search-result .sv-folder-icon {
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3e%3cpath d='M10 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3e%3c/svg%3e") no-repeat center/15px;
}

.sv-search-result .sv-file-icon,
.sv-filter-result .sv-file-icon {
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3e%3cpath d='M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z'/%3e%3c/svg%3e") no-repeat center/15px;
}

/* Revert extension-specific icons */
.sv-file-icon-php,
.sv-file-icon-js,
.sv-file-icon-css {
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3e%3cpath d='M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z'/%3e%3c/svg%3e") no-repeat center/15px !important;
}

/* ── Result name links ─────────────────────────────────────── */
.sv-result-name {
    font-weight: 600;
    min-width: 200px;
    color: var(--sv-text);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--sv-transition);
    cursor: default;
}

a.sv-result-name,
.sv-result-name[href],
.sv-file-link,
.sv-image-link {
    cursor: pointer;
    color: var(--sv-accent);
    text-decoration: none;
}

a.sv-result-name:hover,
.sv-result-name[href]:hover,
.sv-file-link:hover,
.sv-image-link:hover {
    color: #a78bfa;
    text-decoration: underline;
}

/* ── Path ──────────────────────────────────────────────────── */
.sv-result-path {
    font-size: 11.5px;
    color: var(--sv-text-3);
    flex-grow: 1;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── File meta ─────────────────────────────────────────────── */
.sv-search-result .sv-file-info,
.sv-filter-result .sv-file-info {
    font-size: 11px;
    color: var(--sv-text-3);
    white-space: nowrap;
    margin-left: auto;
    padding-left: 10px;
    font-family: 'Courier New', monospace;
}

/* ── Clear buttons ─────────────────────────────────────────── */
#sv-clear-search,
#sv-clear-filter {
    height: 32px;
    line-height: 1 !important;
    padding: 0 14px !important;
    border: 1px solid var(--sv-border-2) !important;
    background: var(--sv-surface-3) !important;
    color: var(--sv-text-2) !important;
    border-radius: var(--sv-radius-sm) !important;
    font-size: 12px !important;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sv-transition);
    margin: 0 !important;
    box-shadow: none !important;
}

#sv-clear-search:hover,
#sv-clear-filter:hover {
    background: var(--sv-surface-hover) !important;
    border-color: var(--sv-border-2) !important;
    color: var(--sv-text) !important;
}