@import 'init';

.title {
    margin-bottom: 2rem;
}
.sub-title {
    font-weight: 700;
    font-size: 2em;
    line-height: 1;
    margin-bottom: 1rem;
}
fieldset {
    display: block;
    margin-left: 2px;
    margin-right: 2px;
    padding-top: 0.35em;
    padding-bottom: 0.625em;
    padding-left: 0.75em;
    padding-right: 0.75em;
    border: 2px solid @green;
    border-radius: 1rem;
    margin-bottom: 1rem;
    legend {
        width: fit-content;
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 1.2rem;
        font-weight: 700;
    }
}
label {
    &.required {
        font-weight: bold;
        &::after { 
            content:"*";
            color:red;
            padding-left: 4px;
        }
    }
}
.input {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    label {
        margin-bottom: 0.5rem;
    }
    .row-input {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        label {
            margin-bottom: 0;
        }
    }
}
input:not([type="submit"]), textarea, select {
    border: 1px solid @grey;
    border-radius: 4px;
    padding: 10px 5px;
    background-color: white;
    &[type="file"] {
        padding: 7px 5px;
    }
}
.mce-combobox input, input.mce-textbox {
    padding: 0 4px;
}
input[readonly="1"] {
    background-color: #eee !important;
    color: #555;
    cursor: not-allowed;
}
.bg-grey {
    input:not([type="submit"]), textarea, select {
        border-color: @bg-grey;
    }
}
.radio {
    display: flex;
    align-items: center;
    gap: 1rem;
/*    margin-bottom: 1rem;*/
    label {
        margin-left: 0.5rem;
        margin-bottom: 0;
        line-height: 1;
    }
}
.radio > div {
    display: flex;
    align-items: center;
/*    direction: rtl;*/
    padding-top: 12px;
    padding-bottom: 12px;
}
.checkbox {
    display: flex;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 12px;
    label {
        margin-left: 0.5rem;
        margin-bottom: 0;
        line-height: 1;
        /*&.required {
            &::after { 
                content: unset;
            }
            &::before {
                content:"*";
                color:red;
                padding-left: 4px;
            }
        }*/
    }
}
@label-width: 160px;
@input-width: 400px;
form[action^="/time_tracking/default/"], 
form[action^="/support/"], 
form[action^="/discussion_board/default/"]
 {
    @label-mt: 12px;
    .input {
        flex-direction: row;
    }
    label {
        min-width: @label-width;
        margin-top: @label-mt;
        margin-bottom: 0;
    }
    input:not([type="submit"]), textarea, select {
        width: @input-width;
    }
    input[type="number"] {
        width: 100px;
    }
    .note {
        margin-top: @label-mt;
        margin-left: 8px;
        margin-right: 1rem;
    }
}
.submit-wrapper {
    width: ~'calc(@{label-width} + @{input-width})';
    text-align: right;
}
.btn-green {
    background-color: @green !important;
    border: 1px solid @green !important;
    &:hover {
        color: @green !important;
        background-color: white !important;
    }
}

@media only screen and (max-width: 767px) {
    fieldset legend {
        font-size: 1rem;
        line-height: 1.2;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* form evaluation */
#pre_post_survey {
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    p {
        background-color: @green;
        color: white;
        padding: 1rem;
        &:not(.sticky-top) {
            margin-bottom: 0;
            padding-bottom: 0;
        }
    }
    .hidden-label-wrapper {
        display: flex;
        padding-left: 1rem;
    }
    .hidden-label {
        visibility: hidden;
        width: 0;
        height: 0;
        padding: 0;
    }
    fieldset legend {
        font-size: 1em;
        font-weight: 400;
    }
}

.survey-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    margin-bottom: 1rem;
    /*&::after {
        content: '';
        width: 224px;
    }*/
    .title {
        margin-bottom: 0;
        text-align: center;
        font-size: 2.45vw;
        width: ~'calc(100% - 225px)';
        span {
            font-size: 0.4em;
            display: block;
        }
    }
    #survey-logo {
        /*position: absolute;
        top: 0;
        left: 0;*/
        height: 80px;
        img {
            max-height: 100%;
        }
    }
}
#form-evaluation {
    .row {
        margin-bottom: 0.5rem;
    }
    label {
        margin-bottom: 0;
    }
    .radio > div {
        padding-top: 0;
        padding-bottom: 0;
    }
    .input-col {
        padding-left: 1rem;
        .radio {
            margin-bottom: 0.5rem;
        }
    }
    .radio_explain {
/*        margin-top: 0.5rem;*/
        margin-left: 1rem;
        display: flex;
        flex-direction: column;
        margin-bottom: 1rem;
    } 
    .indent_textarea {
        margin-bottom: 1rem;
        textarea {
            margin-left: 1rem;
            display: flex;
            width: ~'calc(100% - 1rem)';
        }
        .validation-error {
            margin-left: 1rem;
        }
    }
}
@media only screen and (min-width: 768px) and (max-width: 1199px) {
    #form-evaluation {
        .radio {
            gap: 14px;
        }
    }
}

@media only screen and (min-width: 768px) {
    #form-evaluation {
        .input {
            margin-bottom: 0;
        }
        .col-12 {
            display: flex;
            align-items: center;
        }
    }
}
@media only screen and (max-width: 767px) {
    form[action^="/time_tracking/default/"],  
    form[action^="/support/"], 
    form[action^="/discussion_board/default/"] {
        input:not([type="submit"]), textarea, select {
            width: 100%;
        }
        .input {
            flex-direction: column;
        }
        label {
            margin-top: 0;
        }
    }
    .submit-wrapper {
        width: 100%;
    }
}