﻿/* 搜索下拉框样式 */
.ipt-wrap {
    position: relative;
}
.list-search-wrap {
    position: relative;
}
.ipt-wrap {
    background: #fff;
    border-radius: 6px;
    padding: 5px 0px 5px 12px;
    position: relative;
}

.lib-dropdown {
    margin-right: 12px;
}

    .lib-dropdown select {
        padding: 6px 10px;
        border-radius: 4px;
        /*border: 1px solid #e5e7eb;*/
        border: none;
        background: transparent;
        color: #333;
        font-size: 16px;
    }

        .lib-dropdown select:focus {
            outline: none;
            border-color: #e5e7eb;
            box-shadow: none;
        }

.title-only {
    margin-left: 12px;
    color: #333;
    font-size: 14px;
}

    .title-only input {
        vertical-align: middle;
        margin-right: 4px;
    }

/* search icon box keep existing size; ensure spacing */
.ipt-wrap .search {
    margin-left: 8px;
}


.search-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    z-index: 30;
}

    .search-dropdown.none {
        display: none;
    }

    .search-dropdown .section {
        padding: 10px 12px;
    }

    .search-dropdown .section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }

    .search-dropdown .section-title {
        font-size: 14px;
        color: #6b7280;
        margin: 0;
    }

    .search-dropdown .refresh-btn-small {
        padding: 4px 8px;
        background: none;
        color: #667eea;
        border: none;
        border-radius: 3px;
        font-size: 13px;
        cursor: pointer;
        transition: color 0.2s ease;
    }

        .search-dropdown .refresh-btn-small:hover {
            color: #5a6fd8;
        }

    .search-dropdown .tags {
        display: block;
    }

    .search-dropdown .tag {
        display: block;
        padding: 8px 12px;
        font-size: 13px;
        color: #374151;
        cursor: pointer;
        border-bottom: 1px solid #f0f0f0;
        transition: background-color 0.2s ease;
    }

        .search-dropdown .tag:last-child {
            border-bottom: none;
        }

        .search-dropdown .tag:hover {
            background: #f8f9fa;
        }

        .search-dropdown .tag:active {
            background: #e9ecef;
        }

    /* 最近搜索项样式 */
    .search-dropdown .recent-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        font-size: 13px;
        color: #374151;
        cursor: pointer;
        border-bottom: 1px solid #f0f0f0;
        transition: background-color 0.2s ease;
    }

        .search-dropdown .recent-item:last-child {
            border-bottom: none;
        }

        .search-dropdown .recent-item:hover {
            background: #f8f9fa;
        }

        .search-dropdown .recent-item:active {
            background: #e9ecef;
        }

    .search-dropdown .recent-text {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .search-dropdown .delete-btn {
        display: none;
        width: 16px;
        height: 16px;
        background: #ef4444;
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 10px;
        cursor: pointer;
        transition: background-color 0.2s ease;
        margin-left: 8px;
        flex-shrink: 0;
    }

        .search-dropdown .delete-btn:hover {
            background: #dc2626;
        }

    .search-dropdown .recent-item:hover .delete-btn {
        display: block;
    }

    .search-dropdown .empty {
        font-size: 13px;
        color: #9ca3af;
    }
