@import "variables";

._template-list-item {
    margin-top: 8px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border-left: solid 4px rgba($accent_blue, 0);
    &:not(._item-selected):hover {
        border-left-color: rgba($aspirin_orange, 0.54);
    }
}

._item-selected {
    border-left-color: rgba($aspirin_orange, 1);
}

._item-selected-border {
    border: solid 1px rgba($aspirin_orange, 1);
}

._template-item-container {
    background-color: #fff;
    border: solid 1px #eee;
    width: 100%;
    //max-width: calc(100% - 32px);
    outline: none;
    margin-right: 16px;
    margin-left: 16px;

    .handle {
        position: absolute;
        cursor: -webkit-grab;
        cursor: grab;
        left: 50%;
        & md-icon {
            font-size: 18px;
            text-align: center;
            color: rgba(0, 0, 0, 0.2);
        }
    }

    @media screen and (max-width: 480px) {
        margin-left: 0;
        margin-right: 4px;
        max-width: calc(100% - 4px);
    }
}

._item-properties {
    background-color: #efefef;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
}

._template-item {
    outline: none;
    cursor: default;
    padding: 0 10px;
}

._question {
    width: 100%;
    .md-input {
        font-weight: 500;
        //font-size: 18px;
        line-height: 16px;
        height: inherit;
    }
    .hint {
        font-weight: 300;
        font-size: 12px;
        opacity: 0.7;
    }
}

._file-upload {
  & .md-button {
    margin-bottom: 20px;
  }
  & #progress, & #done {
    margin-top: 15px;
  }
}

._select-option {
    height: 44px;
    margin-bottom: 0;
    margin-top: 0;
    & md-input-container .md-input:not(:focus) {
        border-width: 0;
    }
    & ._type-icon {
        margin-bottom: 20px;
        opacity: 0.7;
        outline: none;
    }
    & ._select-index {
        margin-bottom: 20px;
        opacity: 0.87;
        width: 24px;
        text-align: center;
    }
}

._small-button.md-button {
    //margin-bottom: 20px;
    min-height: 32px;
    height: 32px;
    min-width: 24px;
    margin-left: 0;
    margin-top: 0;
    opacity: 0.7;
}

._menu-item-selected {
    background-color: rgba($dark_blue, 0.1);
}

._media-file-link {
    margin-left: 20px;
    margin-top: 15px;
}

._short-input {
    width: 128px;
    margin-right: 16px;
}

._short-radio {
  width: 128px;
  margin-right: 16px;
  .md-container {
    margin-bottom: 25px;
  }
  label {
    font-size: 10.5px;
    color: #686868;
    margin-bottom: 25px;
  }
}

._tiny-text {
    width: 74px;
}

._short-text {
    width: 256px;
}

._long-text {
    width: 384px;
}

._text-input {
    //height: 44px;
    margin-bottom: 0;
    margin-top: 0;
}

.template-item-toolbar {
    float: right;
}

.template-item-toolbar .md-button {
    min-width: 24px;
    margin-left: 0;
    margin-right: 0;
}

.image-container {
    max-width: 500px;
    color: rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    margin-bottom: 20px;
}
._template-item {
    margin-top: 16px;
}
.template-item:focus {
    outline: none;
    min-width: 256px;
}

.rating-item:focus {
    outline: none;
    border: solid 1px #9ecaed;
    min-width: 40px;
}

.blue-border {
    border: solid 2px #9ecaed;
}

.template-container {
    .main-content {
        background-color: $background;
        max-height: none;

        .template-item {
            //padding-left:10px;
            padding-top: 8px;
            .handle {
                cursor: pointer;
                vertical-align: top;
            }

            &.md-whiteframe-z1 {
                background-color: white;
            }

            .template-item-toolbar {
                margin-left: auto;
                margin-right: 12px;
            }

            .template-item-toolbar .md-button {
                display: none;
                margin: 0;
            }

            &:hover {
                .template-item-toolbar .md-button {
                    display: flex;
                }
            }

        }
    }
    .properties {
        md-divider {
            border-top-color: $primary;
        }
    }
}

.dropdown-menu {
    background-color: white;
    border: 1px solid #ddd;
    list-style: none;
    padding: 0;
    margin: 0;
    li {
        border: 0;
        margin: 8px 0;
        padding: 15px;
        cursor: pointer;
        font-size: 15px;
    }
;
    li:first-child {
        border-top: none;
    }
;
    li:hover, .active {
        background-color: rgba(158, 158, 158, 0.2);
    }
}

._mturk {
    & .remote-content {
        min-height: 384px;
    }

    &.truthForm {
        border: 3px dashed green;
        padding: 0px 10px;
    }
}

.template-item a {
    color: $accent_blue;
    outline: none;
    text-decoration: none;
    word-wrap: break-word;
    &:hover {
        text-decoration: underline;
    }
    &:visited {
        color: $dark_blue;
    }
}

.switch-override {
    & md-switch.md-default-theme.md-checked .md-bar, md-switch.md-checked .md-bar {
        background-color: rgba($palette_primary, 0.5);
    }
    & md-switch.md-default-theme.md-checked .md-thumb, md-switch.md-checked .md-thumb {
        background-color: $palette_primary;
    }
}


._remote-content {
    border: solid 1px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
