@import '../../util/mixin.less';

.responder {
    font-size: 12px;
    padding: 10px;

    @h: 28px;
    @margin: 8px;

    > div + div {
        margin-top: 20px;
    }

    .responder-action {
        > .form-btn {
            margin-left: 10px;
            padding: 4px;
        }
        > .import-btn {
            position: relative;
            [type=file] {
                position: absolute;
                left: 0;
                top: 0;
                bottom: 0;
                width: 100%;
                border: none;
                opacity: 0;
            }
        }
    }

    .responder-editor {
        position: relative;
        border: 1px solid #eee;
        padding: 10px;
        z-index: 1;
        .flex();

        &::before {
            content: 'Rule Editor';
            position: absolute;
            height: 18px;
            line-height: 18px;
            left: 10px;
            top: -9px;
            font-size: 12px;
            background-color: #fff;
            color: #ccc;
        }

        .responder-editor-input {
            width: 80%;
            margin-right: 20px;

            input {
                height: @h;
                line-height: @h;
            }

            .responder-editor-respond {
                margin-top: @margin;
                position: relative;
            }

            .icon-arrow {
                position: absolute;
                right: 10px;
                top: 4px;
                width: 20px;
                height: 20px;
                line-height: 20px;
                text-align: center;
                color: pointer;
                .transition(transform .4s);

                &::before {
                    content: '';
                    display: inline-block;
                    height: 0;
                    border: 4px solid #000;
                    border-color: #000 transparent transparent;
                }

                &:hover {
                    .transform(rotate(180deg));
                }
            }
        }

        .responder-editor-op {
            > button {
                display: block;
                height: @h;

                & + button {
                    margin-top: @margin;
                }
            }
        }
        .responder-editor-select {
            position: absolute;
            left: 0;
            right: 0;
            top: 28px;
            max-height: 200px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            background-color: #fff;
            box-shadow: 0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);

            > li {
                position: relative;
                padding: 6px 12px;
                color: #474a4f;
                .transition(all .4s);

                &:hover {
                    background-color: #efefef;
                }

                [type=file] {
                    position: absolute;
                    left: 0;
                    width: 100%;
                    top: 0;
                    opacity: 0;
                }
            }
        }
    }

    .responder-list {
        position: relative;
        border: 1px solid #eee;
        padding: 10px;

        &::before {
            content: 'Rule List';
            position: absolute;
            height: 18px;
            line-height: 18px;
            left: 10px;
            top: -9px;
            font-size: 12px;
            background-color: #fff;
            color: #ccc;
        }

        > ul {
            height: 400px;
            overflow: auto;
        }
    }

    .script-response-modal {
        width: 400px;

        textarea {
            display: block;
            width: 100%;
            min-height: 300px;
            resize: none;
        }
    }
}
