/* Ask */
#ask {
    border-top: 2px solid #F6FAFF;

    @media (min-width: 768px) {
        border: none;
    }

    .ask-container {
        width: 100%;
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
        background-color: #ffffff;
        border-radius: 2rem;
        padding: 2rem 3rem;

        @media (max-width: 767px) {
            border-radius: 0;
            padding: 2rem 0 0;
            min-height: calc(100vh - 80px);
        }

        .ask-header {
            .visual-memory {
                display: flex;
                flex-wrap: wrap;
                padding: .75rem 0;

                @media (min-width: 768px) { justify-content: space-around; }

                .answer-visual-memory {
                    width: 50%;
                    margin-bottom: .25rem;
                    padding: .5rem;

                    @media (min-width: 768px) { 
                        width: 33%;

                        &:nth-child(odd) { background-color: #F6FAFF; }
                        &:last-child { background-color: transparent; }
                    }
                }
            }

            .drawing-hours,
            .mental-status {
                ul {
                    margin: 0;
                    padding: 0;

                    li {
                        list-style: none;
                        text-align: left;
                    }
                }
            }
        }

        .ask-body {
            min-height: 40vh;

            @media (max-width: 767px) { min-height: calc(100vh - 186px); }

            .form-number {
                max-width: 380px;
                max-height: 300px;

                .mnt {
                    span {
                        background-color: rgb(255, 255, 255);
                        border: 2px solid rgb(4, 80, 221);
                        border-radius: 50%;
                        width: 2rem;
                        height: 2rem;
                        font-family: monospace;
                        color: rgb(4, 80, 221);
                        font-size: 1.75rem;
                        line-height: .85;
                        display: flex;
                        -webkit-box-pack: center;
                        justify-content: center;
                        padding-left: 1px;
                        cursor: pointer;

                        &:hover {
                            background-color: rgb(4, 80, 221);
                            color: rgb(255, 255, 255);
                        }
                    }

                    #rangenumber {
                        width: calc(100% - 100px);
                        text-align: center;
                        padding: 0px;
                        font-size: 10rem;
                        font-weight: 100;
                        line-height: 0.75;
                        border: navajowhite;
                        margin-bottom: 1rem;

                        &::-webkit-outer-spin-button,
                        &::-webkit-inner-spin-button {
                            display: none;
                        }

                        &:focus,
                        &:focus-within,
                        &:focus-visible { outline: none; }
                    }
                }

                /*generated with Input range slider CSS style generator (version 20211225)
                https://toughengineer.github.io/demo/slider-styler*/
                input[type=range].styled-slider {
                  height: 2.2em;
                  -webkit-appearance: none;
                }

                input[type=range].styled-slider:focus {
                  outline: none;
                }

                /*webkit*/
                input[type=range].styled-slider::-webkit-slider-thumb {
                  -webkit-appearance: none;
                  width: 2em;
                  height: 2em;
                  border-radius: 1em;
                  background: #0450DD;
                  border: none;
                  box-shadow: 0 0 2px black;
                  margin-top: calc(2px * 0.5 - 2em * 0.5);
                }

                input[type=range].styled-slider::-webkit-slider-runnable-track {
                  height: 2px;
                  border: none;
                  border-radius: 0;
                  background: #0450DD;
                  box-shadow: none;
                }

                input[type=range].styled-slider::-webkit-slider-thumb:hover,
                input[type=range].styled-slider:hover::-webkit-slider-runnable-track,
                input[type=range].styled-slider::-webkit-slider-thumb:active,
                input[type=range].styled-slider:active::-webkit-slider-runnable-track {
                  background: #0450DD;
                }

                /*mozilla*/
                input[type=range].styled-slider::-moz-range-thumb {
                  width: 2em;
                  height: 2em;
                  border-radius: 1em;
                  background: #0450DD;
                  border: none;
                  box-shadow: 0 0 2px black;
                }

                input[type=range].styled-slider::-moz-range-track {
                  height: 2px;
                  border: none;
                  border-radius: 0;
                  background: #0450DD;
                  box-shadow: none;
                }

                input[type=range].styled-slider::-moz-range-thumb:hover,
                input[type=range].styled-slider:hover::-moz-range-track,
                input[type=range].styled-slider::-moz-range-thumb:active,
                input[type=range].styled-slider:active::-moz-range-track {
                  background: #0450DD;
                }
                
                /*ms*/
                input[type=range].styled-slider::-ms-fill-upper,
                input[type=range].styled-slider::-ms-fill-lower {
                  background: transparent;
                  border-color: transparent;
                }

                input[type=range].styled-slider::-ms-thumb {
                  width: 2em;
                  height: 2em;
                  border-radius: 1em;
                  background: #0450DD;
                  border: none;
                  box-shadow: 0 0 2px black;
                  margin-top: 0;
                  box-sizing: border-box;
                }

                input[type=range].styled-slider::-ms-track {
                  height: 2px;
                  border-radius: 0;
                  background: #0450DD;
                  border: none;
                  box-shadow: none;
                  box-sizing: border-box;
                }

                input[type=range].styled-slider::-ms-thumb:hover,
                input[type=range].styled-slider:hover::-ms-track ,
                input[type=range].styled-slider::-ms-thumb:active,
                input[type=range].styled-slider:active::-ms-track {
                  background: #0450DD;
                }

                input[type=range].styled-slider.slider-progress::-ms-fill-lower {
                  height: 2px;
                  border-radius: 0;
                  margin: -undefined 0 -undefined -undefined;
                  background: #0450DD;
                  border: none;
                  border-right-width: 0;
                }



            }

            .form-checkbox {

                .item-checkbox {
                    cursor: pointer;

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

                    i {
                        display: block;
                        width: 1.5rem;
                        height: 1.5rem;
                        background-color: #FFFFFF;
                        border: 1px solid #0450DD;
                        border-radius: .375rem;
                        position: relative;
                        margin-right: 1rem;

                        &:before,
                        &:after { 
                            position: absolute;
                            display: block;
                            background-color: #ffffff;
                            transform: rotate(45deg);
                            border-radius: .125rem;
                        }
                        &:before { 
                            width: .60rem;
                            height: .25rem;
                            top: .625rem;
                            left: .125rem;
                        }
                        &:after {
                            width: .25rem;
                            height: 1rem;
                            top: .125rem;
                            right: .4125rem;
                        }
                    }

                    span { 
                        display: block;
                        width: calc( 100% - 3.5rem);
                    }



                    /* Checked */
                    input:checked + i {
                        background-color: #0450DD;

                        &:before, &:after { content: ""; }
                    }

                    input:disabled + i { border: 1px solid #c5c5c5; }
                    input:disabled + i + span { color: #9d9d9d; }
                }
            }

            .form-radio {

                .row-radio {
                    border-bottom: 1px solid rgba(0, 109, 184, 0.2);

                    &:last-child { border-color: transparent; }

                    div { width: 40%; }
                }

                .item-radio {
                    cursor: pointer;

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

                    i {
                        display: block;
                        width: 1.5rem;
                        height: 1.5rem;
                        background-color: #FFFFFF;
                        border: 1px solid #0450DD;
                        border-radius: 50%;
                        position: relative;
                        margin-right: 1rem;
                    }

                    span { 
                        display: block;
                        width: calc( 100% - 3.5rem);
                    }

                    /* Checked */
                    input:checked + i {
                        background-color: #0450DD;

                        &:before { 
                            content: "";
                            display: block;
                            width: .75rem;
                            height: .75rem;
                            border-radius: 50%;
                            margin: .325rem;
                            background-color: #FFFFFF;
                        }
                    }
                }
            }

            .form-radio-button {
                margin-right: -1rem;
                margin-left: -1rem;

                .item-radio {
                    width: calc(50% - 2rem);
                    margin: 1rem;
                    cursor: pointer;

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

                    div {
                        border: 1px solid rgb(4 80 221 / 50%);
                        border-radius: .5rem;
                        height: 90px;
                        padding: 1rem;

                        i {
                            display: block;
                            width: 1.5rem;
                            height: 1.5rem;
                            background-color: #FFFFFF;
                            border: 1px solid #0450DD;
                            border-radius: 50%;
                            position: relative;
                            margin-right: 1rem;
                        }
                    }

                    /* Checked */
                    input:checked + div {
                        background-color:rgb(4 80 221);
                        color: #ffffff;

                        i {
                            background-color: #0450DD;
                            border: 1px solid #ffffff;
                            box-shadow: 0 0 0 1px #ffffff;

                            &:before { 
                                content: "";
                                display: block;
                                width: .75rem;
                                height: .75rem;
                                border-radius: 50%;
                                margin: .325rem;
                                background-color: #FFFFFF;
                            }
                        }
                    }
                }
            }

            .form-radio-icon {
                .item-icon {
                    cursor: pointer;

                    i { 
                        padding: 2.5rem;
                        border: 1px solid rgb(4 80 221 / 60%);
                        border-radius: 1rem;
                        margin-bottom: 1rem;

                        @media (max-width: 575px) { padding: 1.5rem; }

                        svg { fill: #0450DD; }
                    }

                    span { text-align:center; }
                    input:checked + i { 
                        background-color: #0450DD;

                        svg { fill: #FFFFFF; }
                    }
                }
            }

            .form-radio-block {
                .item-block {
                    cursor: pointer;
                    border: 1px solid rgb(4 80 221 / 20%);
                    border-radius: .5rem;
                    min-height: 100px;

                    @media (min-width: 768px) { width: calc(50% - 1rem); }

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

                    i {
                        display: block;
                        width: 1.5rem;
                        height: 1.5rem;
                        background-color: #FFFFFF;
                        border: 1px solid #0450DD;
                        border-radius: 50%;
                        position: relative;
                        margin-right: 1rem;
                    }

                    /* Checked */
                    input:checked + i {
                        background-color: #0450DD;

                        &:before { 
                            content: "";
                            display: block;
                            width: .75rem;
                            height: .75rem;
                            border-radius: 50%;
                            margin: .325rem;
                            background-color: #FFFFFF;
                        }
                    }

                    span {
                        display: inline-block;
                        width: calc(100% - 2.5rem - .25rem);
                    }
                }
            }

            /* АНАМНЕЗ - Симптомы */ 
            .info-message {
                display: flex;
                -webkit-box-pack: start;
                justify-content: flex-start;
                -webkit-box-align: center;
                align-items: center;
                padding: 1rem;
                background-color: rgba(4, 80, 221, 0.1);
                border-radius: 1.5rem;
                margin-top: 1rem;
                margin-bottom: 1rem;

                svg {
                    width: 24px;
                    height: 24px;
                    margin-right: 0.5rem;
                }
            }

            .search-symptoms {
                position: relative;


                .indicator-separator {
                    position: absolute;
                    top: 0;
                    right: 0;
                    z-index: 10;
                    width: 3rem;
                    height: 3rem;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }

                input {
                    padding: .75rem 1rem;
                    font-size: .875rem;
                    border-radius: .75rem;
                    border: 1px solid rgb(204, 204, 204);
                    font-weight: 500;
                    width: 100%;

                    &::-webkit-input-placeholder { color: #9BB9F1; font-weight: 400; }     /* WebKit, Blink, Edge */
                    &::-moz-placeholder { color: #9BB9F1; opacity: 1; font-weight: 400; }  /* Mozilla Firefox 19+ */
                    &::-ms-input-placeholder { color: #9BB9F1; font-weight: 400; }         /* Microsoft Edge */
                    &::placeholder { color: #9BB9F1; font-weight: 400; }                   /* Most modern browsers support this now. */
                }

                ul {
                    position: absolute;
                    z-index: 99;
                    top: 60px;
                    left: 0;
                    width: 100%;
                    background-color: white;
                    -webkit-box-shadow: 0px 4px 8px 0px rgba(34, 60, 80, 0.2);
                    -moz-box-shadow: 0px 4px 8px 0px rgba(34, 60, 80, 0.2);
                    box-shadow: 0px 4px 8px 0px rgba(34, 60, 80, 0.2);
                    max-height: 130px;
                    overflow: auto;
                    padding: 0;

                    i { display: block; padding: .5rem 1rem; }

                    li {
                        padding: .5rem 1rem;
                        list-style: none;

                        &:hover {
                            cursor: pointer;
                            background-color: rgba(4, 80, 221, 0.1);
                        }
                    }            
                }

            }

            #list-symptoms {
                padding: 0;

                li {
                    border-bottom: 1px solid rgba(0, 109, 184, 0.2);
                    padding: 0.5rem 1rem;
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    list-style: none;

                    &:last-child { border: none; }

                    button {
                        width: 24px;
                        height: 24px;
                        border-radius: 50%;
                        background-color: rgb(228, 228, 228);
                        border: none;
                        display: flex;
                        justify-content: center;
                        align-items: center;

                        svg { fill: #004472; }

                        &:hover { 
                            background-color: #FF1200; 
                            opacity: 1;

                            svg { fill: #ffffff; }
                        }

                    }
                }
            }
        }

        .btn {
            min-width: 200px;
            font-weight: 600;
            border-radius: 3rem;
            padding: .875rem 1.5rem;
    
            &.btn-blue {
                color: #FFFFFF;
                background-color: #0450DD;
                border-color: #0450DD;
            }

            &.btn-outline-blue {
                color: #0450DD;
                background-color: #FFFFFF;
                border-color: #0450DD;
            }
        }

        .ask-footer {
            @media (max-width: 767px) {
                position: sticky;
                bottom: 0;
                width: 100%;
            }
            .btn {
                @media (max-width: 767px) {
                    width: 50%;
                    border-radius: 0;
                    min-width: 150px;
                }
            }
        }
    }

    .loading {
        display: none;
        width: 100%;
        height: 100%;
        min-height: calc(100vh - 86px - 180px);
        background-color: rgb(246 250 255 / 50%);

        .spinner-border {
            width: 5rem;
            height: 5rem;
            border: .25em solid #0450DD;
            border-right-color: transparent;
        }
    }

    .analysis {
        display: none;
        width: 100%;
        height: 100%;
        min-height: calc(100vh - 86px - 180px);
        background-color: rgb(246 250 255);

        svg {
            text {
                font-size: 1.25rem;
                font-weight: bold;
            }
        }


        ul li {
            list-style: none;

            i {
                display: block;
                width: 1.5rem;
                height: 1.5rem;
                background-color: #FFFFFF;
                border: 1px solid #0450DD;
                border-radius: .375rem;
                position: relative;
                margin-right: 1rem;

                &.done { background-color: #0450DD; }

                &.done:before,
                &.done:after { 
                    content: "";
                    position: absolute;
                    display: block;
                    background-color: #ffffff;
                    transform: rotate(45deg);
                    border-radius: .125rem;
                }
                &.done:before { 
                    width: .60rem;
                    height: .25rem;
                    top: .625rem;
                    left: .125rem;
                }
                &.done:after {
                    width: .25rem;
                    height: 1rem;
                    top: .125rem;
                    right: .4125rem;
                }
            }
        }
    }
}
