.touch {
    body.ngdialog-open {
        position: fixed;

        #ClinicalController {
            display: block !important;
            position: fixed;
            overflow: hidden;
            width: 100%;
            height: 100%;
        }

        &.show-controller-back {
            #ClinicalController {
                display: block !important;

            }

            .ngdialog {
                position: fixed !important;
            }
        }
    }

}


.ngdialog-close:before {
    display: none;
    content: "";
}

.template-header {
    height: 52px;
    background: #527A7A;
    border-radius: 0;
    margin-bottom: 15px;
    padding: 0 15px;
    box-sizing: border-box;
    position: fixed;
    width: 100%;

    h5 {
        display: inline-block;
        color: $lightestGray;
        line-height: 50px;
        padding: 0 0 0 10px;
        font-size: 16px;
        margin: 0;
    }

    h6 {
        display: inline-block;
        width: auto;
        float: right;
        margin: 17px 0px 13px;
        border-bottom: 0 !important;
        color: $white;
        font-size: 16px;
        clear: right;
    }
}

.template-container {
    padding: 65px 20px;
    position: relative;

    section {
        margin-bottom: 0;

        section,
        table {
            margin: 0;
        }

        &.treatment-section {
            @extend %section-grid;
        }
    }

    table {
        margin-top: 5px; 
    }

    .ipd-investigation tr th {
        background: $lightestGray;
    }

    td.value {
        width: 50%;
    }

    table.ipd-investigation td {
        display: block;
        height: 2.3em;
        text-align: left;
    }
}



.ngdialog-content {
    font-size: 14px !important;
    color: $darkGray;
    position: absolute;
    top: 10px;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: auto;
    clear: both;

    table {
        th {
            background: $lightestGray;
            background-image: none;
            color: $mediumGray;
            padding: 5px 10px;
        }

        tr:nth-child(even),
        tr:nth-child(odd) {
            background: $white;
        }

        tr th,
        tr td {
            font-size: 14px;
            color: $darkGray;
            border: 0;
        }

        td.toggle-btn {
            padding: 5px;
            width: 30px;
        }

        &.h-scroll,
        &.pivot-table {

            tr td,
            tr th {
                border-bottom: 1px solid $lighterGray;
            }
        }
    }

    .treatment-section {
        table tr {
            td.days {
                width: 150px;
            }

            td.dosage {
                width: 40%;
                font-size: 14px;
            }
        }
    }
}

.dialog-button-group {
    margin-top: 10px;
    clear: both;

    button:focus {
        outline: 2px solid $clinicalFormFocus;
    }
}

.ngdialog-theme-default {
    &.ng-dialog-all-details-page {
        padding-bottom: 10px;
        padding-top: 0px;
        top: 52px;

        @media (max-width :1024px) {
            overflow: hidden;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, .4);
        }

        .ngdialog-overlay {
            top: 52px;
            height: 100%;

            @media (max-width :1024px) {
                right: 0px;
                display: none;
            }
        }

        .ngdialog-close {
            border-radius: 5px;
            cursor: pointer;
            position: absolute;
            right: 0;
            top: 0;
            width: 30px;
            height: 30px;

            &:before {
                display: block;
                background: 0 0;
                border-radius: 3px;
                color: $primarySectionGridBorder;
                content: '\00D7';
                font-size: 26px;
                font-weight: 400;
                height: 30px;
                line-height: 26px;
                position: absolute;
                right: 3px;
                text-align: center;
                top: 3px;
                width: 30px;
            }
        }

        .ngdialog-content {
            max-width: 1180px;
            width: 100%;
            margin: 0 auto;
            height: calc(100% - 72px);
            padding: 0;
            overflow: hidden;
            top: 45px;

            @media (max-width :1024px) {
                margin-left: auto;
                margin-right: auto;
                max-width: 1000px;
                box-sizing: border-box;
                padding: 0 0 10px;
            }

            .template-container {
                padding: 10px 20px;
                width: 100%;
                margin-top: 25px;
                height: calc(100% - 50px);
                display: flex;
                flex-direction: column;

                @media (max-width :768px) {
                    padding: 10px 15px;
                    height: calc(100% - 25px);
                }

                .concept-set-container {
                    overflow-y: auto;
                    flex-grow: 1;

                    &:-webkit-scrollbar-track {
                        width: 10px;
                    }

                }

                section {
                    height: 100%;

                    &.form-field-inline {
                        height: auto;
                    }
                }

                .edit-bacteriology-section,
                .bacteriology-container,
                .bacteriology-container .sample-container,
                .bacteriology-container .sample-container,
                .bacteriology-container form {
                    height: 100%;
                    width: 100%;
                }

                .edit-bacteriology-section>div {
                    width: 100%;
                    height: 100%;
                    position: relative;
                }

                .section-grid {
                    position: absolute;
                    width: 100%;
                    height: 100%;
                }

                @media (max-width :1024px) {
                    position: static;
                }

                h6 {
                    font-size: 1.5em;
                    color: #009384;
                    font-family: openSansSemiBold;
                    margin-top: 0;
                }
            }
        }
    }
}

.ng-dialog-all-details-page .ngdialog-content .template-container .concept-set-container {
    width: 100%;
    flex-grow: 1;
}

.ng-dialog-view .ngdialog-content .template-container {
    overflow-y: auto;
    display: flex;
    flex-direction: column;

    section {
        height: auto !important;
    }

    .concept-set-container {
        flex-grow: 1;
    }
}

.ng-dialog-all-details-page.ng-dialog-edit .ngdialog-content .template-container .concept-set-container {
    width: 100%;
    height: calc(100% - 50px);

    section {
        height: auto;
    }

}

.ngdialog-theme-default.ng-dialog-all-details-page .ngdialog-content .template-container .concept-set-container-lab .section-grid {
    position: static !important;
    height: auto !important;
}

.auto-scrollable-dialog .ngdialog-content {
    height: auto !important;
}
