/**
 * 表头的筛选菜单
 * style.less
 * @author wangbo
 * @since 2019-02-20
 */
@import "../../css/mixins";

[grid-manager], .gm-dreamland-div{
    th[filter] .th-wrap {
        padding-right: 20px;
    }
}
.gm-filter-area{
    display: block;
    width: 14px;
    height: 18px;
    position: absolute;
    top: calc(50% - 9px);
    right: 5px;
    cursor: pointer;
    color: #444;
    .fa-icon {
        display: block;
        position: absolute;
        font-size: var(--gm-font-size);
        line-height: 18px;
        opacity: .7;
        &:hover{
            opacity: 1;
        }
        &.filter-selected{
            color: var(--gm-color-active);
        }
		// 解决window环境下未能居中的问题，todo 如后续发现其它图标存在同样的问题，需要抽离至图标样式文件内
		&:before{
			vertical-align: middle;
		}
    }
    .fa-con{
        display: none;
        min-width: 100px;
        position: absolute;
        top: 100%;
        background: var(--gm-bg);
        border: var(--gm-border-high);
        z-index: 4;
        &.direction-left{
            left: 0;
        }
        &.direction-right{
            right: 0;
        }
        .filter-list{
            overflow-y: auto;
            li{
                > .gm-radio-wrapper, > .gm-checkbox-wrapper{
                    display: flex;
                    cursor: pointer;
                    word-break: keep-all;
                    padding: 9px 12px;
					white-space: nowrap;
					.gm-checkbox{
						top: 0;
					}
                }
                &:hover{
                    background: #e6f7ff;
                }
            }
        }
        .filter-bottom{
            display: flex;
            border-top: var(--gm-border);
            padding: 7px 8px;
            text-align: center;
            .filter-button{
                display: block;
                width: 50%;
                height: 100%;
                cursor: pointer;
                color: #1890ff;
                &:hover{
                    color: #40a9ff;
                }
            }
        }
    }
}

// 表头的icon图标跟随文本
.gm-icon-follow-text{
    .gm-filter-area{
        display: inline-block;
        width: 18px;
        position: relative;
        top: 0;
        left: 0;
        vertical-align: middle;
        text-align: center;
        font-size: var(--gm-font-size);// icon跟随模式下 th-wrap的font-size是0，所以这里需要单独指定
        .fa-icon{
            right: 4px;
        }
    }
}
