* {
    // font-weight: normal !important;
}

#app {
    background-color: #fafafa;
}

#app,
.el-dialog__wrapper {
    canvas {
        width: 100%;
    }

    overflow: hidden;
    font-family: 'Source Han Sans CN';

    // 自定义的公共样式

    .user-tree-item {
        text-overflow: ellipsis;
        text-wrap: nowrap;
        overflow: hidden;
        width: 80%;
    }

    .flex-between {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .flex-center {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    // 覆盖组件的公共样式
    th.el-table__cell {
        // 表格头部的背景色
        background-color: #f5f7fa;
        color: #909399;
        font-size: 14px;
        font-weight: 500;
        line-height: 22px;
    }

    .el-table__body tr.hover-row > td.el-table__cell {
        background-color: #fff;
    }

    // 卡片和列表的切换组件
    .el-checkbox__input.is-active .el-checkbox__inner,
    .el-checkbox__input.is-checked .el-checkbox__inner {
        background-color: #0147eb;
        border-color: #0147eb;
    }

    .el-radio-button {
        .el-radio-button__inner {
            border-radius: 0;
        }
    }

    .el-radio-button__orig-radio:checked + .el-radio-button__inner {
        background-color: #0147eb;
        border-color: #0147eb;
    }

    .el-radio-button.el-radio-button--mini.is-active {
        color: #fff;
    }

    // 页面最外层盒子的padding 和card组件的间距
    .app-main {
        & > div {
            padding: 0 !important;

            & > .el-card {
                margin: 20px;
                border: 0;
                padding: 0 !important;
            }

            & > .device-detail-page > .el-card {
                margin: 20px;
                border: 0;
                padding: 0 !important;
            }
        }
    }

    // 改变多选框的label颜色
    .el-form-item {
        .el-checkbox__input.is-checked + .el-checkbox__label {
            color: #606266;
        }
    }

    // 去除卡片的阴影
    .el-card.is-always-shadow {
        box-shadow: none;
    }

    // 开关按钮去除圆角
    .el-switch {
        .el-switch__core {
            border-radius: 0;

            &::after {
                border-radius: 0;
            }
        }

        &.is-checked {
            .el-switch__core {
                background-color: #0147eb !important;
                border-color: #0147eb !important;
            }
        }
    }

    .device-switch {
        .el-switch {
            &.is-checked .el-switch__core::after {
                margin-left: -21px;
            }

            .el-switch__core {
                border-radius: 12.5px;

                &::after {
                    border-radius: 100%;
                }
            }
        }
    }

    // 二级路由去除icon
    // .svg-icon[aria-hidden="true"] {
    //     width: 0;
    //     margin: 0;
    // }
    // 按钮改背景色
    .el-button--primary.el-button--mini {
        background-color: #0147eb;
        color: #fff;
        border-color: #0147eb;

        &.is-disabled {
            cursor: not-allowed;
            background-color: #8cc8ff;
            border-color: #8cc8ff;
        }
    }

    // 按钮
    .el-button--primary.el-button--medium {
        background-color: #0147eb;
        border-color: #0147eb;
        color: #fff;

        &.is-disabled {
            cursor: not-allowed;
            background-color: #8cc8ff;
            border-color: #8cc8ff;
        }
    }

    // 去掉输入框，按钮的圆角

    .el-input__inner,
    .el-button,
    .el-tag,
    .el-card {
        border-radius: 0;
    }

    // 表格去除右边框
    .el-table .el-table__cell {
        border-right: 0;
        text-align: left;

        .cell.el-tooltip > div {
            margin: 0;
        }
    }

    // 分页器清空背景色
    .el-pagination {
        .btn-prev,
        .btn-next {
            color: #606266;
            border: 0;
            background: none;
        }

        .el-pager {
            li {
                min-width: unset;
            }

            .number {
                border: 0;
                background: none;

                &.active {
                    color: #0147eb;
                    background: none;
                }
            }
        }

        .el-pagination__editor.el-input .el-input__inner {
            height: 24px;
        }
    }

    // 公共样式end

    .release-task .el-divider {
        margin: 15px 0;
    }

    // 去除主页面的滚动条
    .main-container {
        height: 100%;
        overflow-y: auto;

        &::-webkit-scrollbar {
            width: 0;
        }
    }

    label,
    span {
        font-weight: normal !important;
    }

    // 去除表格的边框
    .el-table {
        border: 0;

        &.el-table--border {
            &::after {
                width: 0;
            }
        }

        .el-table__body tr:hover > td.el-table__cell {
            background-color: #fff;
        }
    }

    // 卡片里面表格样式
    .main-card.el-card {
        // margin-top: 20px;
        padding-bottom: 50px;
        border: 0;

        .card-toolbar {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
        }

        li.table-status {
            color: #999;
            text-align: left;

            &.primary {
                color: #0147eb;
            }

            &.success {
                color: #67c23a;
            }

            &.danger {
                color: #ff4949;
            }

            &.warning {
                color: #e6a23c;
            }

            &::marker {
                font-size: 20px;
            }

            .status-content {
                text-indent: -15px;
                display: inline-block;
            }
        }

        .base-table.el-table {
            .el-button--primary.el-button--mini {
                color: #0147eb;
                border-color: transparent;
                background: transparent;

                &.is-disabled {
                    cursor: not-allowed;
                    background-color: #8cc8ff;
                    border-color: #8cc8ff;
                }
            }

            .el-button--primary.el-button--medium {
                color: #0147eb;
                border-color: transparent;
                background: transparent;

                &.is-disabled {
                    cursor: not-allowed;
                    background-color: #8cc8ff;
                    border-color: #8cc8ff;
                }
            }

            &.none {
                background: none;
            }

            .el-tag {
                background: transparent;
            }

            .el-button {
                border-color: transparent;
                background: transparent;

                &.el-button--warning:hover,
                &.el-button--warning:active,
                &.el-button--warning:focus {
                    border-color: #e6a23c;
                    color: #e6a23c;
                }

                &.el-button--success:hover,
                &.el-button--success:active,
                &.el-button--success:focus {
                    border-color: #a1ebc2;
                    color: #13ce66;
                    background-color: #f0f9eb;
                }

                &.el-button--primary:hover,
                &.el-button--primary:active,
                &.el-button--primary:focus {
                    color: #0147eb;
                    background: #e8f4ff;
                    border-color: #a3d3ff;
                }

                &.el-button--danger:hover,
                &.el-button--danger:active,
                &.el-button--danger:focus {
                    color: #ff4949;
                    background: #ffeded;
                    border-color: #ffb6b6;
                }
            }
        }
    }

    .card-box-outer {
        padding: 0;
        --font-grey: #606266;
        --success-color: #67c23b;
        --primary-color: #0147eb;

        .el-card {
            .el-card__body {
                height: 100%;

                .card-image {
                    width: 100%;
                    height: 100%;
                    overflow: hidden;

                    .el-image {
                        width: 100%;
                        padding: 10px;
                        min-height: 200px;
                        max-height: 200px;

                        img {
                            width: 90%;
                            height: auto;
                        }
                    }
                }

                .card-name {
                    padding-left: calc(10% - 5px);
                    text-align: left;
                }

                .el-button {
                    &.el-button--small {
                        padding: 10px;
                    }

                    background: #f5f7fa;
                    border-color: #f5f7fa;
                    color: #333;
                    font-weight: bold;

                    &.detail-btn {
                        color: var(--primary-color);
                    }

                    &.delete-btn {
                        color: #ff6363;
                    }

                    &.success-btn {
                        color: var(--success-color);
                    }

                    &:hover {
                        border-color: var(--primary-color);
                        color: var(--primary-color);
                    }
                }
            }
        }
    }

    .device-detail-page {
        .product-things-outer > div {
            padding: 0 !important;
        }
    }
}

//覆盖页面样式
.iot-sip-mediaServer {
    .card-item .el-descriptions__body {
        background: none;
    }
}

.lf-control-clear {
    background-image: url('../../icon/clear.png');
}
.lf-control-save {
    background-image: url('../../icon/save.png');
}
.lf-control-download {
    background-image: url('../../icon/download.png');
}
