@import 'core/css/variables';

.project-questions-form-title {
    margin-bottom: 15px;
    line-height: 34px;
}
.project-questions-form {

    @media (min-width: $screen-sm-max) {
        min-height: 900px;
    }

    .questionset-head {
        margin-bottom: 20px;

        .help-block {
            margin-top: 10px;
        }
        .set-buttons {
            margin-top: 10px;
            margin-bottom: 30px;
        }
    }
    h2 {
        margin-top: 0;
    }
    .well {
        margin-top: 10px;
    }
    .help-text {
        margin-bottom: 10px;
    }
    .form-group {
        margin-bottom: 20px;
    }
    .add-field-button .help-block {
        margin: 0;
    }
    .add-set-button {
        margin-bottom: 20px;
    }

    a {
        &.add-valueset,
        &.add-valueset:hover {
            color: $success-color;
        }

        &.add-valueset:hover {
            color: white;
            background-color: $success-color;
        }
    }

    .questions-buttons {
        margin-top: 20px;
    }

    .questions-block {
        position: relative;

        border: 1px solid rgb(204, 204, 204);
        border-radius: 4px;

        padding: 20px 20px 0 20px;
        margin-bottom: 20px;

        .remove-set {
            opacity: 0.8;
            line-height: 20px;
            font-size: 14px;

            position: absolute;
            z-index: 5;
            top: 3px;
            right: 5px;

            &:hover {
                opacity: 1;
            }
            &:focus {
                outline: 0;
            }
        }
    }

    .collection {
        position: relative;
        margin-bottom: 10px;

        select {
            -webkit-appearance: none;
            -moz-appearance: none;
            -o-appearance: none;
            appearance: none;
        }
    }

    .default-value {
        color: #999;
    }

    input[type='radio'].default-value,
    input[type='range'].default-value {
        opacity: 0.5;
    }

    .options {
        position: absolute;
        top: 7px;
        right: 7px;
        z-index: 5;

        .unlock,
        .erase,
        .close {
            opacity: 0.8;
            line-height: 20px;
            font-size: 14px;
        }

        .close {
            margin-left: 2px;
        }

        .unlock:hover,
        .erase:hover,
        .close:hover {
            opacity: 1;
        }
        .unlock:focus,
        .erase:focus,
        .close:focus {
            outline: 0;
        }

        .badge-default-value {
            color: #999;
            border: 1px solid #999;
            background-color: white;
            margin-top: -2px;
        }
    }

    .form-label,
    label {
        margin-bottom: 10px;
    }

    .radio,
    .checkbox {
        margin: 0;

        label {
            margin-right: 10px;
            margin-bottom: 5px;
            padding-left: 25px;
            line-height: 30px;
        }
        &:last-child label {
            margin-bottom: 0;
        }
        input[type='checkbox'],
        input[type='radio'] {
            margin-top: 8px;
            margin-left: -25px;
        }
        input[type='text'] {
            display: inline-block;
            width: 200px;
        }
    }
    .radio {
        &.yesno {
            label {
                margin-bottom: 0;
                line-height: 20px;
            }
            input[type='radio'] {
                margin-top: 3px;
            }
        }
        a.remove-link {
            top: 2px;
        }
    }

    .radio-control,
    .checkbox-control,
    .file-control {
        border: 1px solid #ccc;
        border-radius: 4px;

        padding: 6px 12px;
        margin: 0;
    }

    .file-control {
        display: block;
        width: 100%;
        font-weight: normal;


        input[type="file"] {
            display: inline-block;
            outline: 0;
        }

        p:last-child,
        ul:last-child {
            margin-bottom: 0;
        }
    }

    .range-display {
        display: inline-block;
        min-width: 80px;
    }

    .autocomplete {
        position: relative;

        ul {
            position: absolute;
            z-index: 1030;
            margin-top: 4px;
            width: 100%;
            overflow-y: auto;
            background-color: white;
            border: 1px solid #ccc;
            border-radius: 4px;

            li {
                list-style: none;
                cursor: pointer;
                padding: 4px 15px;
                border-bottom: 1px solid #ccc;

                &.active,
                &.active:hover {
                    color: white;
                    background-color: $link-color;
                }

                &:hover {
                    background-color: $navigation-dropdown-hover-background-color;
                }
                &:last-child {
                    border-bottom: none;
                }
            }
        }

        .locked {
            cursor: default;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }
}

.project-questions-overview {
    line-height: 24px;

    h4 {
        line-height: 20px;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    a {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    ul {
        margin-left: 0;
    }
    li ul li {
        margin-left: 20px;
    }
    li.active {
        margin-left: 0;
    }
    li.active a:before {
        float: left;
        width: 20px;
        text-align: right;
        content: '\2192\0000a0'; /* right-arrow followed by a space */
    }
}

.project-progress {
    margin-bottom: 10px;
}
