.template-control {
    width: 100%;
    height: 42px;
    position: fixed;
    top: 94px;
    left: 0;
    right: 0;
    z-index: 999;
    box-sizing: border-box;
    text-align: right;
    box-shadow: 0px 3px 4px #9e9e9e inset;
    background: #fafafa;

    .template-control-wrapper {
        margin: 0 auto;
        max-width: $max-page-width;

        @media screen and (max-width: 1300px) {
            padding: 0 10px;
        }
    }

    .template-control-panel-right-wrap {
        float: right;
        width: 100%;
    }

    .template-control-panel-right {
        margin-left: 0;

        @media screen and (min-width: 850px) {
            margin-left: 240px;
        }

        @media screen and (min-width: 1025px) {
            margin-left: 290px;
        }
    }

    .template-control-panel-button {
        @include clearfix();
        padding: 7px 0 5px;

        button {
            @include button($bahmniSecondaryColor, darken($bahmniSecondaryColor, 10%), $white);
            font-size: 14px;
            border-color: darken($bahmniSecondaryColor, 15%);
        }
    }

    .patient-details {
        color: $black;
        text-shadow: 1px 1px 1px rgba($lightGray, 0.9);
    }
}

.template-control-panel {
    @include clearfix();

    .primary-section-grid {
        border: 1px solid $lightGray;
        background: $white;
        padding: 0 10px 10px;
    }

    .template-search-wrapper {
        @include clearfix();
        padding: 10px;

        .template-search-inner {
            width: auto;

            @media screen and (min-width: 360px) {
                width: calc(100% / 3);
                min-width: 200px;
            }
        }

        .search_field {
            padding: 5px 10px;
            font-size: 12px;
            max-width: 300px;
            box-sizing: border-box;
            float: left;
            width: 100%;

        }
    }

    ul.template-icons {
        max-height: calc(100vh - 275px);
        width: 100%;
        overflow-y: auto;
        overflow-x: hidden;

        li {
            padding: 2px;
            float: left;
            box-sizing: border-box;
            width: calc(50% - 2px);
            @media screen and (min-width: 768px) {
                width: calc(100% /3 - 2px);
            }

            button {
                width: 100%;
                display: inline-block;
                margin: 1px 3px;
                font-size: 12px;
                border: 1px solid $lightGray;
                padding: 5px 10px;
                color: $darkGray;
                text-align: left;
                line-height: 1.2;
                box-sizing: border-box;
                min-height: 40px;
                word-break: break-word;

                i {
                    font-size: 1.5em;
                    margin: 0 auto;
                    vertical-align: middle;
                }

                @media screen and (max-width: 768px) {
                    min-height: 57px;
                }
            }
        }
    }
}

ul.template-icons::-webkit-scrollbar {
    width: 10px;
}

ul.template-icons::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 7px;
}

ul.template-icons::-webkit-scrollbar-thumb {
    background-color: $mediumGray;
    border-radius: 7px;
}