/* 回放不同类型录像的颜色 */
@recordBox:{
    general:@general;
    alarm:@alarm;
    detect:@detect;
    detectalarm:@detectalarm;
    ivs:@ivs;
    jpg:@jpg;
    pos:@pos;
    card:@card;
}
.svgFont(@fontSize:30) {
    font-size: if((@fontSize = 0), inherit, @fontSize / @px-unit);
}
/**
Icon组件增加svg 大小设置， 增加hover处理
*@normalColor 默认纯色颜色， 不需要指定为0
*@lineStart 渐变起始颜色
*@lineStop 渐变停止颜色
*/
.svgOut
    (@normalColor:@iconColorN , @lineStart:@iconLinearStartColorN , @lineStop:@iconLinearStopColorN) {
    &:not(.disabled_icons) {
        svg {
            & + {
                path:first-child {
                    fill: if((@normalColor = 0), @iconColorN, @normalColor); // 默认图标颜色
                }
            }
            // 带渐变的默认图标颜色
            & + {
                linearGradient {
                    stop:first-child {
                        stop-color: @lineStart; // 起始渐变色
                    }
                    stop:last-child {
                        stop-color: @lineStop; // 渐变停止色
                    }
                }
            }
        }
    }
}
/* 悬浮后图标样式 */
.svgHover
    (@hoverColor:@--primary-5 , @lineHoverStart:@iconLinearStartColorA , @lineHoverStop:@iconLinearStopColorA) {
    &:not(.disabled_icons):not(.noHover) {
        &.active,
        &:hover {
            svg {
                & + {
                    path:first-child {
                        fill: if(
                            (@hoverColor = 0),
                            @--primary-5,
                            @hoverColor
                        ); // 纯色图标悬浮后的默认颜色
                    }
                }
                /* 悬浮后带渐变效果颜色 */
                linearGradient stop:first-child {
                    stop-color: @lineHoverStart; // 起始渐变色
                }
                linearGradient stop:last-child {
                    stop-color: @lineHoverStop; // 渐变停止色
                }
            }
        }
    }
}
/* 图标禁用颜色 */
.svgDisabled (@disableColor:@iconColorD) {
    svg {
        & + {
            path:first-child {
                fill: @disableColor;
            }
        }
    }
    cursor: not-allowed;
    // opacity: 0.5;
}
/* 设置图标的背景色和边框， 任何一项不需要则指定 0 */
.svgBoder (@borderColor:@buttonNormalBorderN , @bgColor:@buttonNormalBgN) {
    .bg (@color) when (isColor(@color)) {
        background-color: @color;
    }
    .border (@color) when (isColor(@color)) {
        border: 1 / @px-unit solid @color;
    }
    .bg(@bgColor);
    .border(@borderColor);
}
//设置透明度 (0-1)
.opacity (@opacity) {
    @IEOpacity: @opacity * 100;
    -moz-opacity: @opacity;
    opacity: @opacity;
    filter: alpha(opacity= @IEOpacity);
}

.colorSvg (@svgId, @hoverColor:@--primary-5) {
    &:not(.disabled_icons):not(.noHover) {
        &:hover {
            .@{svgId} {
                path {
                    fill: @hoverColor !important;
                }
            }
        }
    }
}
.lumaValue(@bg){
    @redV:red(@bg);
    @greenV:green(@bg);
    @blueV:blue(@bg);
    @lumaV:(@redV * 0.2126 + @greenV * 0.7152 + @blueV * 0.0722) / 255 * 100%;
}
/* 根据背景色亮度情况 返回指定状态的颜色文字 */
.lumaColor(@bg:@--bg, @state){
    /* 深色下的白色文字 */
    @deepFont:@--font-l,@--font-r,@--placeholder,@--font-s;
    /* 亮色下的黑色文字 */
    @lightFont:@--font-l-l,@--font-r-l,@--placeholder-l,@--font-s-l;
    @result:(if((.lumaValue(@bg)[] >= 60%),extract(@lightFont,@state),extract(@deepFont,@state)));
}
/* 根据背景色， 返回使用深色 或浅色 颜色色值 */
.lumaColorSelect(@bg:@--bg, @deepColor, @lightColor){
    @result:(if((.lumaValue(@bg)[] >= 60%),@lightColor,@deepColor));
}

.subColor(@base6){
    @h:hue(@base6);
    @s:round(hsvsaturation(@base6));
    @v:round(hsvvalue(@base6));

    // @s-4:round(@s - (@s / 5)*3);
    // @v-4:round(@v + ((100%- @v) / 5)*3);

    /* hover */
    @s-5:round(@s - @s / 5);
    @v-5:round(@v + (100%- @v) / 5);

    /* click */
    @s-7:round(@s + (100% - @s) / 5);
    @v-7:round(@v - @v / 5);

    /* 8 是checkbox使用的勾勾  */
    @s-8:round(@s + ((100% - @s) / 5) * 2);
    @v-8:round(@v - (@v / 5) * 2);

    // @hover4:hsv(@h,@s-4,@v-4);
    @hover:hsv(@h,@s-5,@v-5);
    @click:hsv(@h,@s-7,@v-7);
    @deep:hsv(@h, @s-8 , @v-8);
}
.color_A(@bg:@--bg){
    .lumaColor(@bg, 1);
}

.color_N(@bg:@--bg){
    .lumaColor(@bg, 2);
}

.color_D(@bg:@--bg){
    .lumaColor(@bg, 3);
}

.color_S(@bg:@--bg){
    .lumaColor(@bg, 4);
}

.colorBox(@colorMap){
    each(@colorMap, {
            @base: extract(@value , 1);
            @base_H: if(length(@value) >= 2 ,extract(@value , 2) ,.subColor(@base)[@hover]);
            @base_C: if(length(@value) >= 3 ,extract(@value , 3) ,.subColor(@base)[@deep]);
            .sdd-checked-@{key} {
                &.ant-checkbox-wrapper:hover .ant-checkbox-inner{
                    /* 去掉通用蓝色 */  
                    border-color: @base_H !important;
                }
                .ant-checkbox-inner {
                    border-color: @base_C !important;
                    background-color: @base !important;
                    &:after{
                        /* 勾勾的颜色 */
                        border-color: @base_C;
                    }
                }
                .ant-checkbox-checked::after{
                    border-color: @base_C !important;
                }
            }
    });
}
@--primary-6:#009CFF; // 品牌色
@--primary-5:#33B0FF; // 品牌色-hover
@--primary-7:#007DCC; // 品牌色-click
// 预览视频底部工具栏背景
// 回放工具栏（播放、暂停、音量调节等）背景
// 时间刻度背景
@--toolbar-bg:#4C5054; // 工具类（视频播放器）背景

// 主界面背景色，时间轴背景色
// 回放日期选择器背景
// 回放通道列表背景
// 表格单数列背景
// 弹窗背景
// 二级菜单选中项背景
// 二级菜单展开菜单背景
@--bg:#2A2E33; 

// 下拉菜单背景
// 回放剪辑器背景
// 常规按钮背景
// checkbox背景
// 单选项背景
@--component-bg:#2a2e33; // 组件背景
@--component-border: #606366; //组件边框
// 表格偶数行背景
@--component-bg-disable:#32373C; // 组件置灰后的背景色

// 表格选中列背景
// 下拉菜单选中列背景
// 预览通道列表悬浮
@--option-bg-select: #55585D; //选中项背景

// 回放右侧功能区背景
// 预览右侧功能区背景
// 预览左侧功能区背景
@--menu-bg:#393c41;//二级菜单背景

// 预览右侧功能区标题栏背景
// 回放右侧功能区标题栏背景
// 表格标题栏背景
// 弹窗标题栏背景
// 顶部导航页签选中背景
@--navTitle-bg:#4c4f54; //标题栏背景
// 表格边框
// 设置页页签栏常规状态边框
// 设置页页签边框
// 设置页底部区域边框
// 预览右侧功能区边框
// 预览底部工具栏边框
// 预览左侧区边框
// 二级菜单边框
// 回放右侧功能区边框
// 回放日期选择器边框
// 回放通道列表边框
// 回放工具栏边框
// 回放时间轴功能区边框
// 顶部导航边框
// 顶部导航页签常规状态边框
// 分割线
// 弹窗边框
// 弹窗底部区域边框
@--split: #606366;//分割线、页面边框
// 浮窗背景
// 卡片背景
@--bg-card: #56585B;//浮窗背景、卡片背景
// 顶部导航页签常规状态
// switch背景常规状态
// 滑动条背景
@--block: #17181C;//覆盖背景

// 设置页页签栏背景
// 设置页页签常规背景
// 设置页底部区域背景
// 弹窗底部区域背景
@--title:#313439; //顶部导航背景

@--font-l:#FFFFFF; //高亮选中文字
@--font-r: #a6aab2; //主要(常规)文字 #FFFFFF,0.65
@--placeholder: #5d6263;//失效（置灰）文字
@--font-s: #7c8284; //次要（说明）文字

@--font-l-l:#000000; //亮色模式--高亮选中文字
@--font-r-l: #262626; //亮色模式--主要(常规)文字 #FFFFFF,0.85
@--placeholder-l: #BFBFBF;//失效（置灰）文字
@--font-s-l: #8C8C8C; //次要（说明）文字

//警告
@--warning-6:#ffd304;// 图标和文字的常规状态
@--warning-border: #B59914; //边框
@--warning-bg: #44422D; //背景
@--warning-5:#ffdc38; //hover
@--warning-7:#cca903; //click

//成功
@--success-6:#29d67d;
@--success-border: #299B64;
@--success-bg: #2A423C;
@--success-5:#4bd690; //hover
@--success-7:#21ab65; //click

//错误
@--error-6:	#ff4f4f;
@--error-border: #B54345;
@--error-bg: #443136;
@--error-5: #ff7272; // hover
@--error-7: #cc3f3f; // click

//页面滚动条
@scroll-bar:rgb(255, 255, 255);// 深色皮肤下页面的滚动条 normal状态透明度 25%， hover透明度 50%
@scroll-bar-l:rgb(0,0,0);// 亮色皮肤下页面的滚动条 normal状态透明度 25%， hover透明度 50%

.site-calendar-demo-card {
    // width: 290px;
    border: 1px solid @pageBorderN;
    border-radius: 2px;
    .calender-point {
        position: absolute;
        background-color: @pageTextN;
        width: 4px;
        height: 4px;
        border: 1px solid @pageTextN;
        border-radius: 100%;
        left: 46%;
        bottom: -1px;
        transform: translate(0, -50%);
    }
}
.ant-picker-calendar {
    background-color: @preview_center_bottom_Bg !important;
    .ant-picker-content {
        color: @pageTextN !important;
    }
    .ant-picker-panel {
        border-top: 1px solid @pageBorderN;
        background-color: @formInputBgN !important;
    }
    .ant-picker-cell {
        color: @pageTextD !important;
    }
    .ant-picker-cell-in-view {
        color: @pageTextN !important;
    }
    .ant-picker-content th {
        color: @pageTextN;
    }
    .ant-select-selector {
        width: 100 / @px-unit !important;
    }
    // .ant-picker-calendar-date-content {
    //   position: absolute !important;
    //   top: 12px !important;
    //   left: 6px !important;
    // }
}


._ChannelGroup_ {
    display: flex;
    .ant-space{
        gap:0 !important;
        .ant-space-item {
            .label-normal-wrapper {
                // DTS003617565 去掉自带的 line-height 属性
                line-height: 0 !important;
            }
        }
    }
    .checkbox {
        display: inline-block;
    }
    .label {
        display: inline-block;
        height: 40/@px-unit;
        line-height: 40/@px-unit;
    }
    .btn-link{
        padding-top: 10/@px-unit;
    }
    .chn_btn {
        color: @buttonNormalTextN;
        background-color: transparent;
        width: 35/@px-unit;
        height: 25/@px-unit;
        padding: 0;
        margin: 5/@px-unit;
        text-align: center;

        &.selected {
            color: @buttonNormalTextA;
            border-color: @formInputBgA;
            &:focus {
                color: @buttonNormalTextA;
                border-color: @formInputBgA;
            }
        }
        &.allbtn {
            width: 40/@px-unit !important;
            font-size: 10/@px-unit;
        }
        &[disabled] {
            opacity: .5;
            background-color: @buttonNormalBgN !important;
            color: @buttonNormalTextN !important;
            border: 1px solid @buttonNormalBorderN !important;

            &:hover,
            &:active,
            &.active{
                opacity: .5;
            }
        
        }
    }
}

._ChannelGroupModal_ {}
.ChannelGroupModal_textlabel{
    user-select: none
}


._ColorCheckGroup_ {
    display: flex;
    flex-direction: row;
    // align-items: center;
    .color_checkbox_all_box {
        height: 28px;
        line-height: 28px;
    }
    // 'normal', 'alarm', 'detect', 'ivs', 'pos', 'card'
    &alarm {
        .ant-checkbox-inner {
            background-color: @alarm !important;
        }
    }
    &general {
        .ant-checkbox-inner {
            background-color: @general !important;
        }
    }
    &detect {
        .ant-checkbox-inner {
            background-color: @detect !important;
        }
    }
    &ivs {
        .ant-checkbox-inner {
            background-color: @ivs !important;
        }
    }
    &pos {
        .ant-checkbox-inner {
            background-color: @pos !important;
        }
    }
    &card {
        .ant-checkbox-inner {
            background-color: @card !important;
        }
    }
}



._TopTitleDivider_{
    height: 22px;
    line-height: 22px;
    margin: 0 0 8px;
    font-weight: bold;
}
._FirstTitleDivider_{
    height: 22px;
    line-height: 22px;
    margin: 0 0 8px;
    font-weight: bold;
    font-size: 18px;
}
._MidTitleDivider_  {
    height: 22px;
    line-height: 22px;
    margin: 36px 0 8px;
    font-weight: bold;
}
._HighDivider_{
    height: 28px;
    margin: 0 0;
}

.cus_icons {
    .svgFont();
    .svgOut();
    .svgHover();
    &.disabled_icons {
        .svgDisabled();
    }
    &.active_icons {
        .svgOut(@current, @iconLinearStartColorA, @iconLinearStopColorA);
    }

    .colorSvg(action_red, @errorColor);
}


@keyframes arcSlideUpIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 0.8;
    }
}
.iconDropBtn {
    background-color:@navBg;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: @navMenuLineHeight;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    
    &:hover{
        color:@navMenuTextA;
    }
    .cus_icons{
        margin: 0 5/@px-unit;
    }
    span{
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
}
.iconDropMenu {
    /* -webkit-animation-name: arcSlideUpIn;
    animation-name: arcSlideUpIn; */
    min-width: 200/@px-unit !important;
    border: 1px solid @dropMenuBorder;
    pointer-events:auto !important;
    .cus_icons{
        font-size: 30/@px-unit;
        vertical-align:middle;
        margin-right: 15/@px-unit;
    }
    .ant-dropdown-menu-item{
        padding:5/@px-unit 15/@px-unit;
    }
    .iconDropitem_name {
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
}
.iconDropitem {
    display: flex;
    align-items: center;
}
.centerItem{
    justify-content: center;
}



.DefaultImgClass{
    width: 100%;
    height: 100%;
    object-fit: fill;
}


.label-button {
    max-width: 150/@px-unit;
    min-width: 100/@px-unit;
    .ant-btn {
        padding: 4/@px-unit 4/@px-unit;
    }
}
.labelText-wrapper{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.label-date-picker {
    .ant-picker {
        width: 100%;
    }
}


.autoComplete {
    .ant-select-selector {
        &:hover {
            border-color: @current !important;
        }
    }
}

.autoComplete-error {
    .ant-select-selector {
        border: 1px solid @errorColor;
    }
}

.error-text {
    color: @errorColor;
}


.pageLine {
    display: flex;
    float: left;
    margin-top: 10 / @px-unit;
    width: 100%;
    min-width: 600 / @px-unit;
    justify-content: space-between;
    align-items: center;
    
    .pageLineLeft {
        .ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link,
        .ant-pagination-simple .ant-pagination-next .ant-pagination-item-link{
            height: 100%;
        }
        button,
        & span.anticon {
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .ant-btn-default{
            width: 46 / @px-unit;
            height: 32 / @px-unit;
        }
        display: flex;
        .ant-pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            .ant-pagination-prev,
            .ant-pagination-next,
            .ant-pagination-disabled {
                padding: 4 / @px-unit 4 / @px-unit;
                border: 1 / @px-unit solid @buttonNormalBorderD;
                width: 32 / @px-unit;
                height: 32 / @px-unit;
                margin: 0 10 / @px-unit;
            }
            .ant-pagination-disabled {
                border: 1 / @px-unit solid @buttonNormalBorderD;
                background-color: @buttonNormalBgD;
                svg {
                    & + {
                        path:first-child {
                            fill: @buttonNormalBorderD; // 纯色图标悬浮后的默认颜色
                        }
                    }
                }
            }
        }
        .anticon-left,
        .ant-pagination-simple-pager,
        .anticon-right {
            color: @pageTextA;
        }
        .ant-pagination-simple-pager input {
            background-color: @pageBodyBg;
            border-color: @pageBorderN;
        }
        .ant-pagination-simple-pager {
            height: 32 / @px-unit;
        }
    }
    .pageLineRight {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}



.popover_list {
    display: flex;
    &_item {
        cursor: pointer;
        &:hover {
            color: @preview_center_popover_ColorA;
        }
        &_active {
            color: @preview_center_popover_ColorA;
        }
    }
    &_separator {
        margin: 0 5 / @px-unit;
        color: @preview_center_separator_ColorN;
    }
}
.popover_icon {
    cursor: pointer;
    &:hover {
        .svgHover(@current);
    }
}



.similarity-progress{
    display: flex;
    height: 100%;
    align-items: center;
    .temp-picData-progress{
        height: 18/@px-unit;
        width: 100%;
        padding: 0/@px-unit 15/@px-unit;
        display: flex;
        .temp-progress-bar-swrap{
            width: 67%;
            display: flex;
            align-items: center;
            padding: 0/@px-unit 5/@px-unit 0/@px-unit 0/@px-unit;
            .temp-progress-bar{
                background-color: @progressBg;
                height: 8/@px-unit;
                width: 100%;
                border-radius: 5/@px-unit;
            }
        }

        .temp-progress-similar{
            display: flex;
            align-items: center;
            width: 33%;
        }
    }
    /* 人脸比对那的 */
    .picData-progress {
        // margin: 0 8/@px-unit 7/@px-unit 5/@px-unit;
        display: flex;
        width: 100%;
        align-items: center;
        background: @ai_progress_default;
        height: 14/@px-unit;
        position: relative;
        color: @pageTextA;

        .progress-item {
            display: inline-block;
            height: 100%;
        }

        .progress-red {
            background: @ai_progress_red;
        }

        .progress-orange {
            background: @ai_progress_orange;
        }

        .progress-blue {
            background: @ai_progress_blue;
        }

        .progress-label {
            position: absolute;
            right: 0;
            line-height: 14/@px-unit;
            top: 0;
        }
    }
}



.subtitle {
    margin: 0;
    font-weight: bold;
    color: @subtitleColor;
    width: 100%;
}
.native-tooltip{
    display: inline;
}


.virtual-table {
    .ant-table-header {
        th{
            border-right: 1/@px-unit solid;
        }
    }
    .ant-empty-normal {
        height: 180/@px-unit;
        margin: 0 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .ant-table-tbody { 
        height: 180/@px-unit;
    }
    .ZD-showZebraPattern-even {
        background-color: @tableOddBgN;
    }
    .ZD-showZebraPattern-odd {
        background-color: @tableEvenBgN;
    }
    .ZD-selected-row {
        background-color: @tableBgA;
    }
    .virtual-table-cell {
        display: flex;
        align-items: center;
        justify-content: center;
        color: @tableTextN;
    }
    .center {
        text-align: center;
    }
}



