input[name='fields[keywords]'] {
    width: 100%;
}

textarea[name='fields[description]'],
textarea[name='fields[abstract]'],
textarea[name='fields[thumb]'],
textarea[name='fields[video]'] {
    width: 100%;
    height: 80px;
}

#text,
#text ~ .resize {
    display: none;
}

body.fullscreen {
    overflow: hidden;
}

.cm-container {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    height: 550px;
    box-sizing: border-box;
    z-index: 6666;
    content-visibility: auto;
    background: #222;
    &.fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    * {
        outline: none !important;
    }
    .cm-tools {
        display: flex;
        flex-wrap: wrap;
        background-color: #303133;
        padding: 5px 0 0 5px;
        .cm-tools-item {
            position: relative;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 2px;
            padding: 5px;
            margin: 0 5px 5px 0;
            transition: background 0.25s;
            &:hover {
                background: #393939;
                svg {
                    fill: #efefef;
                }
            }
            &.active {
                background: #393939;
                svg {
                    fill: #efefef;
                }
                .cm-tools__dropdown {
                    visibility: visible;
                    opacity: 1;
                    transform: translateX(-50%) rotateX(0);
                }
            }
            svg {
                vertical-align: middle;
                fill: #bfbfbf;
            }
        }
        &__dropdown {
            position: absolute;
            top: 42px;
            left: 50%;
            z-index: 1000;
            background: #393939;
            padding: 5px 0;
            border-radius: 4px;
            visibility: hidden;
            transform-origin: top;
            opacity: 0;
            transform: translateX(-50%) rotateX(-90deg);
            transition: visibility 0.25s, transform 0.25s, opacity 0.25s;
            &-item {
                padding: 0 20px;
                line-height: 32px;
                transition: background 0.25s;
                user-select: none;
                font-size: 15px;
                color: #bfbfbf;
                font-weight: 600;
                &:hover {
                    background: #444;
                }
            }
            &::before {
                content: '';
                position: absolute;
                top: -7px;
                left: 50%;
                transform: translateX(-50%);
                width: 0;
                height: 0;
                border-left: 7px solid transparent;
                border-right: 7px solid transparent;
                border-bottom: 7px solid #393939;
            }
        }
    }
    .cm-mainer {
        position: relative;
        flex: 1;
        min-height: 0;
        display: flex;
        width: 100%;
        .cm-wrap {
            flex-shrink: 0;
            height: 100%;
            flex: 1;
            min-width: 0;
            font-size: 14px;
            .cm-scroller {
                line-height: 1.5;
                font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
                overscroll-behavior: none;
                &::-webkit-scrollbar {
                    display: none;
                }
                ::selection {
                    background-color: rgba(221, 240, 255, 0.2);
                }
                .cm-content {
                    width: 100%;
                    white-space: normal;
                    overflow-wrap: break-word;
                    color: #ccc;
                    caret-color: #ccc;
                    padding: 15px 13px 15px 11px;
                    -webkit-user-modify: read-write-plaintext-only;
                }
                .cm-matchingBracket {
                    color: #8f938f;
                    border: 1px solid rgba(255, 255, 255, 0.25);
                    margin: -1px;
                }
                .cm-nonmatchingBracket {
                    color: #ff5627;
                }
            }
        }
        .cm-resize {
            flex-shrink: 0;
            height: 100%;
            position: relative;
            width: 16px;
            background: #303133;
            cursor: col-resize;
            &::before {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 4px;
                height: 40px;
                border-radius: 2px;
                background: #fff;
            }
        }
        .cm-preview {
            position: relative;
            flex-shrink: 0;
            width: 0;
            height: 100%;
            background: #fff;
            overflow: auto;
            box-sizing: border-box;
            overscroll-behavior: none;
            &.move {
                pointer-events: none;
            }
            &::-webkit-scrollbar-track {
                background: #fff;
            }
            &::-webkit-scrollbar {
                width: 6px;
                height: 6px;
            }
            &::-webkit-scrollbar-thumb {
                border-radius: 3px;
                background: #c0c4cc;
            }
            .cm-preview-content {
                padding: 20px;
                font-size: 14px;
                font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
                white-space: normal;
                overflow-wrap: break-word;
                color: #606266;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                h1,
                h2,
                h3,
                h4,
                h5,
                h6 {
                    color: #303133;
                    font-size: 18px;
                    line-height: 24px;
                    margin: 0;
                    margin-bottom: 15px;
                    position: relative;
                }
                h1 {
                    padding: 0 15px;
                    &::before {
                        content: '';
                        position: absolute;
                        top: 8.5px;
                        left: 0;
                        height: 7px;
                        width: 7px;
                        border-radius: 50%;
                        background: #409eff;
                    }
                }
                h2 {
                    padding: 0 15px;
                    &::before {
                        content: '';
                        position: absolute;
                        top: 10%;
                        bottom: 10%;
                        left: 0;
                        width: 4px;
                        border-radius: 2px;
                        background: #409eff;
                    }
                }
                h3 {
                    padding: 0 15px 0 20px;
                    &::before {
                        content: '#';
                        color: #409eff;
                        font-weight: 700;
                        position: absolute;
                        top: 0;
                        left: 0;
                        line-height: 24px;
                    }
                }
                h4 {
                    &::before {
                        content: '「';
                        color: #409eff;
                        font-weight: 600;
                        margin-right: 5px;
                    }
                    &::after {
                        content: '」';
                        color: #409eff;
                        font-weight: 600;
                        margin-left: 5px;
                    }
                }
                h5 {
                    padding: 0 15px 0 28px;
                    &::before {
                        content: '';
                        position: absolute;
                        top: 2px;
                        left: 0;
                        width: 20px;
                        height: 20px;
                        background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAC8klEQVRYR+3WP2gTURwH8O/vKnVRRHKXP52cBO3g4p/BqYNIhy4muajUQRBFKjQV1En6ZxJBcmlRCoJDRe3FDiJVwamLS3FwqbgIgss1l2ZQF5XeT3I1Z3NJ7u5dLlAwN9699/t97vfe7/EIO/yhHe5DD9jpCv3fFVTu856+Xzi62Y/35hj9CFPNrlUwWeRJAJfBGADwBcBNI0/PRZFdAdo4xlQLjCqKjBzogat7hZCRAgPghJGBgbFnxglAOvS7b/fLb+q+qnv5BHBCyEBAWTdnANy2IxOtWSC1qsY+1jOFwAVG+gIVvXyHQbcaKuZCxmf5iMQogXFQtEsBeO5JT6BcMu+Bcb1lUhcyqfExACUAB6JEtgUqi+U5JrrmmcyFHCjwSYtQO+tSUSFbAmXdnAdwJVASdyWLPAS2kbFA8xsHNS13EzCmlx8R6KJQcBcypfFpho3cKxRna3ADsgEo6+ZjAKMhgjZ1d2KWR2gTSyD0h4jnIB2gXDIXwciFCPZvSnMl0wwshYrJGDImaMUGKovlLBPVOrDjh8APzFx8zDkjNa7FzYoGZsKT9XEarQOHmei1aJA246cqOWW6/i2l8VMGzoWIPW/k6eq2Ja6UwCz8pw2JGZ8sS8pUz8fWau/jGp+SgLchcGBgZD1Py41NUuoI+ZloV8ZU93+ogZKzfBiWfXAPCgMJU8Y42avQdMzI4ZBfmSizocqrUeJaAmsvBZGGBCtTziXeRY1rCxRAViEhXckqK93AeQJ9kYTvlmVlqmcTdhNEtefc+9X3utVmuX+CkK6oyqtu4nwrWP8bF5IZdGYjJ79wDuMCz4D+XmhFWnZbt7ab5ltBB6mbkyAaBPFCJassuwMmNb4L4EZgXwBc4AoGTZrUeA6A9x1yK6tzzvnFDlxBv0D176kCP2TCpbbjBXCRV9DZk0VeAONCE1IQ1zWg3dlF1sFQHWQIXFeBNrLAw5BwHBZWjQl6E3SbbB8X+R4Mg/Ca0wN2WtFeBTut4B84mFI4VpekyAAAAABJRU5ErkJggg==');
                        background-size: 100% 100%;
                    }
                }
                h6 {
                    padding: 0 15px 0 28px;
                    &::before {
                        content: '';
                        position: absolute;
                        top: 2px;
                        left: 0;
                        width: 20px;
                        height: 20px;
                        background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEI0lEQVRYR+3Xb2wTZRwH8G/vL22RPy5GW8fK6rJpGeFFY9RO3TRRE1HfmEAammEyjZmOSEg1RrPZaTD6xjhU/Ndlf0CZgwmD+qcgZBRIETeqY0Vcnc7pGonhRY2l3m2t5upqjq693l2vcy+8N81zz/NcPvf75fd7rjos8ku3yH34HyjK0PqlDLPzD56vMNL0VHxmpgXAoUIZXKgI3sMSpK+cNTAbylaj/9IkprnLM3+mkg8XQi4EsJ4lSL+ZNbAfVd+JG/XLcSERg3M8IAtZauBtDEkeNdN6fX9NfR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agDC93dsoRFKimQx2dIWOV/U/yn6bx0WyDj8vgLOAAAAAElFTkSuQmCC');
                        background-size: 100% 100%;
                    }
                }
                hr {
                    margin: 0;
                    border: none;
                    height: 1px;
                    background-color: #e4e7ed;
                    margin-bottom: 15px;
                }
                p {
                    line-height: 26px;
                    margin: 0;
                    margin-bottom: 15px;
                }
                blockquote {
                    margin: 0;
                    line-height: 26px;
                    margin-bottom: 15px;
                    background: #ecf8ff;
                    border-left: 5px solid #50bfff;
                    color: #50bfff;
                    padding: 8px 15px;
                    border-radius: 0 4px 4px 0;
                    p {
                        margin: 0;
                    }
                }
                pre {
                    margin: 0;
                    margin-bottom: 15px;
                    &::-webkit-scrollbar-track {
                        background: #fff;
                    }
                    &::-webkit-scrollbar {
                        width: 6px;
                        height: 6px;
                    }
                    &::-webkit-scrollbar-thumb {
                        border-radius: 3px;
                        background: #c0c4cc;
                    }
                }
                p code {
                    display: inline-block;
                    min-height: 26px;
                    line-height: 26px;
                    border-radius: 4px;
                    font-size: 12px;
                    background: #fdf6ec;
                    padding: 0 8px;
                    color: #e6a23c;
                    vertical-align: top;
                }
                ol,
                ul {
                    margin: 0;
                    margin-bottom: 15px;
                    padding-left: 36px;
                    li {
                        line-height: 26px;
                    }
                }
                ol li {
                    list-style: decimal;
                }
                ul li {
                    list-style: disc;
                }
                table {
                    width: 100%;
                    max-width: 100%;
                    table-layout: fixed;
                    color: #909399;
                    margin-bottom: 15px;
                    font-size: 13px;
                    border-top: 1px solid #ebeef5;
                    border-left: 1px solid #ebeef5;
                    border-collapse: collapse;
                    td,
                    th {
                        padding: 8px;
                        border-bottom: 1px solid #ebeef5;
                        border-right: 1px solid #ebeef5;
                    }
                    thead {
                        th {
                            font-weight: 500;
                            background: #ebeef5;
                        }
                    }
                }
                img:not(.owo) {
                    display: block;
                    max-width: 100%;
                    border-radius: 4px;
                    transition: transform 0.35s, box-shadow 0.35s;
                    margin: 0 auto;
                }
                .owo {
                    max-height: 26px;
                    vertical-align: top;
                }
                a:not(.joe_detail__article-anote):not(.joe_detail__article-abtn) {
                    display: inline-block;
                    line-height: 26px;
                    color: #409eff;
                    position: relative;
                    text-decoration: none;
                }
            }
        }
        .cm-autosave {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 999;
            &::before,
            &::after {
                content: '';
                position: absolute;
                top: 0;
                width: 0;
                height: 3px;
                transition: width 0.5s;
            }
            &::before {
                border-radius: 0 1.5px 1.5px 0;
                left: 50%;
                background: linear-gradient(to right, #4cd964, #5ac8fa, #007aff);
            }
            &::after {
                border-radius: 1.5px 0 0 1.5px;
                right: 50%;
                background: linear-gradient(to left, #4cd964, #5ac8fa, #007aff);
            }
            &.active {
                &::before,
                &::after {
                    width: 50%;
                }
            }
        }
    }
    .cm-progress-left,
    .cm-progress-right {
        position: absolute;
        top: 0;
        width: 0;
        height: 3px;
        background-color: #ff5627;
        transition: width 0.5s;
        z-index: 1;
    }
    .cm-progress-left {
        right: 50%;
        border-radius: 1.5px 0 0 1.5px;
    }
    .cm-progress-right {
        left: 50%;
        border-radius: 0 1.5px 1.5px 0;
    }
}

.cm-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0);
    visibility: hidden;
    transition: background 0.25s, visibility 0.25s;
    will-change: background, visibility;
    &__wrapper {
        width: 380px;
        background: #fff;
        color: #606266;
        border-radius: 4px;
        opacity: 0;
        transform: translateY(-30%);
        transition: opacity 0.25s, transform 0.25s;
        &-header {
            padding: 10px 20px;
            border-bottom: 1px solid #e4e7ed;
            display: flex;
            align-items: center;
            justify-content: space-between;
            &--close {
                font-size: 20px;
                cursor: pointer;
            }
        }
        &-bodyer {
            padding: 20px;
            .fitem {
                display: flex;
                align-items: center;
                margin-bottom: 15px;
                &:last-child {
                    margin-bottom: 0;
                }
                label {
                    margin-right: 10px;
                }
                input,
                select {
                    width: auto;
                    flex: 1;
                    -webkit-appearance: none;
                    outline: none;
                    border: 1px solid #dcdfe6;
                    height: 34px;
                    box-sizing: border-box;
                    padding: 0 10px;
                    border-radius: 3px;
                    color: #606266;
                }
            }
            .tabbar {
                position: relative;
                width: 100%;
                overflow-x: auto;
                display: flex;
                margin-bottom: 20px;
                &::-webkit-scrollbar {
                    display: none;
                }
                &-item {
                    white-space: nowrap;
                    margin-right: 15px;
                    cursor: pointer;
                    user-select: none;
                    &:last-child {
                        margin-right: 0;
                    }
                    &.active {
                        color: #409eff;
                    }
                }
            }
            .lists {
                display: none;
                grid-template-columns: repeat(6, 1fr);
                font-size: 18px;
                border-left: 1px solid #e4e7ed;
                border-top: 1px solid #e4e7ed;
                font-family: 'Meiryo UI', 'Microsoft YaHei', 'Malgun Gothic', 'Segoe UI', 'Trebuchet MS', Helvetica, 'Monaco', monospace, Tahoma, STXihei, '华文细黑', STHeiti, 'Helvetica Neue', 'Droid Sans', 'wenquanyi micro hei', FreeSans, Arimo, Arial, SimSun, '宋体', Heiti, '黑体', sans-serif;
                max-height: 350px;
                overflow-y: auto;
                overscroll-behavior: none;
                &[data-show='颜文字'] {
                    grid-template-columns: repeat(2, 1fr);
                    font-size: 12px;
                }
                &::-webkit-scrollbar-track {
                    background: #fff;
                }
                &::-webkit-scrollbar {
                    width: 6px;
                    height: 6px;
                }
                &::-webkit-scrollbar-thumb {
                    border-radius: 3px;
                    background: #c0c4cc;
                }
                &.active {
                    display: grid;
                }
                &-item {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-right: 1px solid #e4e7ed;
                    border-bottom: 1px solid #e4e7ed;
                    cursor: pointer;
                    transition: background 0.25s;
                    user-select: none;
                    color: #888;
                    padding: 5px 0;
                    img {
                        max-width: 70%;
                    }
                    &:hover,
                    .active {
                        background: #e4e7ed;
                    }
                }
            }
        }
        &-footer {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding: 0 20px 10px;
            &--cancle,
            &--confirm {
                cursor: pointer;
                border: none;
                outline: none;
                margin-left: 5px;
                background: #fff;
                color: #606266;
                -webkit-appearance: none;
                padding: 7px 15px;
                border-radius: 3px;
            }
            &--confirm {
                color: #fff;
                background: #409eff;
            }
        }
    }
    &.active {
        visibility: visible;
        background: rgba(0, 0, 0, 0.75);
        .cm-modal__wrapper {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

.joe_detail__article-checkbox {
    -webkit-appearance: none;
    position: relative;
    border-radius: 2px;
    width: 15px;
    height: 15px;
    border: 2px solid #409eff;
    vertical-align: -3px;
    box-sizing: border-box;
    margin: 0;
    &:disabled {
        cursor: not-allowed;
    }
    &:checked {
        border: none;
        background: #409eff;
        &::after {
            content: '';
            width: 3px;
            height: 7px;
            position: absolute;
            top: 2px;
            left: 5px;
            border: 2px solid #fff;
            border-top: 0;
            border-left: 0;
            transform: rotate(45deg);
        }
    }
}

.joe_detail__article-mtitle {
    display: flex;
    justify-content: center;
    .text {
        position: relative;
        color: #909399;
        padding: 0 12px;
        transition: padding 0.35s;
        &::before,
        &::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 20px;
            height: 1px;
            background: #409eff;
        }
        &::before {
            left: -35px;
        }
        &::after {
            right: -35px;
        }
    }
}

.joe_detail__article-player {
    width: 100%;
    height: 180px;
    border: none;
}

.joe_detail__article-abtn {
    display: inline-block;
    color: #fff;
    height: 35px;
    line-height: 35px;
    padding: 0 15px;
    .icon {
        display: inline-block;
        vertical-align: top;
        text-align: center;
        .fa {
            color: #fff;
        }
        [class^='fa-'] {
            margin-right: 8px;
        }
    }
    .content {
        color: #fff;
        display: inline-block;
        vertical-align: top;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    &:hover {
        color: #fff;
    }
}

.joe_detail__article-anote {
    position: relative;
    display: inline-block;
    color: #fff;
    height: 35px;
    line-height: 35px;
    .icon {
        display: inline-block;
        vertical-align: top;
        width: 35px;
        height: 35px;
        text-align: center;
        background: rgba(0, 0, 0, 0.2);
        .fa {
            color: #fff;
        }
    }
    .content {
        display: inline-block;
        vertical-align: top;
        padding: 0 12px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #fff;
    }
    &.secondary {
        background: #34495e;
    }
    &.success {
        background: #27ae60;
    }
    &.warning {
        background: #f39c12;
    }
    &.error {
        background: #e74c3c;
    }
    &.info {
        background: #3498db;
    }
    &:hover {
        color: #fff;
    }
}

.joe_detail__article-dotted {
    width: 100%;
    height: 2px;
    background-size: 80px;
}

@media (max-width: 768px) {
    .cm-modal__wrapper {
        width: 90%;
    }
}
