.treatment-page-container {
    font-size: 12px;

    .dashboard-section-wrapper {
        position: static;
        display: flex;
        flex-direction: column;

        @media screen and (min-width: 769px) {
            flex-direction: row;
        }
    }

    .drug-details {
        line-height: 1.5em;
        padding-left: 10px;
        margin-top: 5px;
        width: 100%;
        box-sizing: border-box;

        @media screen and (min-width: 821px) and (max-width: 992px) {
            width: calc(100% - 215px);
            float: left;
            font-size: 14px;
        }

        @media screen and (min-width: 993px) {
            width: 58%;
            float: left;
            font-size: 14px;
        }
    }

    .drug-dosage {
        display: flex;
        margin-bottom: 5px;
        gap: 5px;
        justify-content: space-between;
        flex-direction: column;
        flex-wrap: wrap;
        align-items: flex-start;
        position: relative;

        @media screen and (min-width: 540px) and (max-width: 768px) {
            flex-direction: row;
        }

        @media screen and (min-width: 769px) {
            flex-direction: column;
        }

        @media screen and (min-width: 1200px) {
            flex-direction: row;
        }

        @media screen and (max-width: 300px) {
            font-size: 10px;
        }
    }

    .drug-name {
        width: auto;

        @media screen and (min-width: 1200px) {
            max-width: calc(100% - 310px);
        }
    }

    .dosage-details {
        display: flex;
        gap: 5px;
        width: calc(100% - 20px);
        font-size: 14px;
        font-family: $OpenSansFont;
        padding-left: 10px;
        line-height: 1.1;
        flex-wrap: wrap;
        padding-bottom: 10px;

        .footer-note {
            flex-grow: 1;
            padding-right: 20px;

            .provider {
                float: none;
            }
        }
    }

    .dosage-frequency {
        padding: 5px 8px;
        border-radius: 20px;
        background-color: #527a7a;
        color: #fff;
        box-sizing: border-box;
        width: fit-content;
        @media screen and (min-width: 1200px) {
            min-width: 300px;
            text-align: center;
        }
    }

    div.start-date span {
        line-height: 1em;
        padding-top: 7px;
        font-family: OpenSansSemiBold;
        font-size: 12px;
        color: $mediumGray;
        display: block;
        width: 130px;
        text-align: left;

        &.stop-date {
            padding-bottom: 7px;
        }
    }

    .table-mimic {
        font-size: 12px;

        li {
            padding-bottom: 0px;
        }
    }

    .footer-note .time-stamp {
        display: inline-block;
        padding-right: 5px;
    }

    .button-group-wrapper {
        padding: 3px 0;

        @media screen and (min-width:769px) {
            float: right;
            width: 255px;
        }

        button.toggle.has-notes {
            background: none !important;
        }

        .button-group {
            float: right;
        }

        button,
        button:hover {
            padding: 0;
            margin: 0;
            float: left;
            margin-right: 2px;

            i {
                font-size: 1.3em;
                color: $mediumGray;
                padding: 3px 0.2em;
            }
        }

        .refill-btn,
        .stop-drug-btn {
            padding: 6px !important;
            line-height: 0.8em;

            @media screen and (max-width: 1024px) {
                padding: 4px 6px !important;
                line-height: 1.2em;
            }
        }

        button.ipd-btn,
        button.dispense-btn {
            font-family: OpenSansBold;
            color: $bahmniTertiaryColor;
            padding: 0 7px;
            width: auto;
            height: 24px;

            &:hover {
                padding: 0 7px;
            }

            i {
                color: $bahmniTertiaryColor;
                font-size: 1.2em;
                padding: 0;
            }
        }
    }

    .add-drug-btn,
    .reset-drug-form {
        margin-top: 4px;
        margin-left: 5px;

        &.move-add-drug-btn {
            margin-top: 52px;
        }
    }

    @import "addNewDrug";

    .drug-orders-history {
        margin: 10px 0;

        .tabs {
            display: flex;
            flex-direction: column;

            @media screen and (min-width: 769px) {
                display: block;
            }

            .tab {
                order: 1;
                &.selected-tab {
                    order: 0;
                }
            }
        }
    }

    .drug-stop-container {
        font-size: 14px;
        width: 100%;
        padding-left: 10px;
        box-sizing: border-box;
        padding-right: 10px;
        padding-bottom: 10px;

        .field-attribute {
            &.stop-date-label {
                @media screen and (max-width: 768px) {
                    width: 100%;
                }
                .control-label {
                    width: auto;
                }
            }
        }

        .field-value {
            margin-right: 5px;

            textarea {
                height: auto;
                width: 540px;

                @media screen and (max-width: 768px) {
                    width: 80vw;
                    height: auto;
                }

                @media screen and (min-width: 769px) and (max-width: 992px) {
                    width: 400px;
                }
            }
        }
    }

    .new-drug-order {
        margin: 0px 0 10px;
    }

    #new-drug-orders {
        .treatmentChkBox {
            float: left;
            margin-left: revert;
            margin-top: 9px;
        }
    }

    .highlight {
        background: $clinicalHighlight;
        border: 1px solid darken($clinicalHighlight, 10%);
    }

    .active-drug {
        border-left: 5px solid orange;
    }

    .scheduled-drug {
        border-left: 5px solid green;
    }

    .refill-drugs-btn,
    .dispense-all-btn,
    .print-drugs-btn {
        font-size: 14px;
        margin-right: 0;
        display: none;

        i {
            padding: 0;
            font-size: 14px;
        }

        @media screen and (max-width: 768px) {
            padding: 6px 12px;
        }
    }

    .dispense-all-btn {
        margin-right: 5px;
    }

    .print-drugs-btn {
        margin-left: 5px;
    }

    .bulk-edit-options-container {
        padding: 10px 10px 10px 10px;
        background-color: $lightestGray;
        border-bottom: 1px $primarySectionGridBorder solid;
        margin-bottom: 4px;
        box-shadow: 1px 2px 7px $lightGray;

        .bulk-btn-container {
            .stepper__btn {
                height: 26px;
            }
        }

        .select-all-chkBox {
            top: 6px;
        }

        .duration.bulkDuration {
            min-width: 80px;
            display: inline-block;
            width: 80px;
            margin-top: 0;
        }

        select.bulk-duration-unit {
            min-width: 110px;
            display: inline-block;
            margin-top: 0;
            margin-right: 5px;
        }

        .bulk-update-btn {
            margin-left: 15px;
        }
    }

    .tabs .tab [type=radio]:checked~.dispense-all-btn,
    .tabs .tab [type=radio]:checked~.refill-drugs-btn,
    .tabs .tab [type=radio]:checked~.print-drugs-btn {
        display: inline-block;
        line-height: 14px;
    }


    .invalid {
        background: lightcoral;
        border: 1px solid #ff0000;
    }

    .show-invalid .ng-invalid:enabled {
        border: 2px solid darken($clinicalFormInvalid, 30%);
        background: $clinicalFormInvalid;
    }

    .revise-refill-modal-wrapper {
        outline: 0;
    }

    .treatment-section-left {
        width: 100%;

        @media screen and (min-width: 769px) {
            width: 24%;
            min-width: 312px;
        }

        .treatment-data-container,
        .order-set-container {
            background: #fff;
            border-radius: 3px;
            box-sizing: border-box;
            z-index: 999;
            @include box-shadow-for-section();
            width: 100%;
        }

        .order-set-container {
            margin: 20px 0;
        }

        .order-section-container {
            padding: 10px;
            box-sizing: border-box;

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

            .Order-section-orderDrug {
                margin: 0 0 30px;

                .unit-wrap {
                    position: relative;

                    .exchange-btn {
                        position: absolute;
                        padding: 4px 3px 3px;
                        line-height: initial;
                        margin-top: 5px;

                        @media (max-width: 1024px) {
                            padding: 7px 6px 6px;
                        }

                        @media screen and (max-width: 768px) {
                            top: -31px;
                            right: 0;
                            margin-top: 0;
                        }
                    }
                }

                .variable-frequency {
                    .dose-cell {
                        margin-left: 0px;
                    }
                }

                h2.section-title {
                    margin: 0 0 10px;

                    @media screen and (max-width: 1024px) {
                        font-size: 14px;
                    }

                    @media screen and (max-width: 768px) {
                        font-size: 13px;
                    }
                }
            }

            h3.orderSet-additional-info, h3.cdss-alerts {
                font-family: OpenSansBold;
                color: $darkGray;
                font-size: 13px;
                border-bottom: 1px solid $lightGray;
                padding: 20px 0 5px;
                margin: 0 0 10px;
            }

            .cdss-alert {
                position: relative;
                margin: 0 0 10px;
                padding: 10px;
                border-radius: 3px;
                box-sizing: border-box;
                font-size: 13px;
                color: $darkGray;
                line-height: 1.5em;
                display: flex;

                > i {
                    flex-shrink: 0;
                }
                > div {
                    margin-left: 0.75rem;
                    margin-right: 0.75rem;
                }

                .cdss-alert-text {
                    display: inline-block;
                    vertical-align: middle;
                }
                &.alert-danger {
                    background: #FFD6D8;
                    i {
                        color: #FF0000;
                    }
                }
                &.alert-warning {
                    background: #FEEAD6;
                    i {
                        color: #FFA500;
                    }
                }
                &.alert-info {
                    background: #D5F5FF;
                    i {
                        color: #00A3E0;
                    }
                }
                .cdss-alert-summary {
                    cursor: pointer;
                    position: relative;
                    i {
                        position: absolute;
                        right: -15px;
                        bottom: 0px;
                        line-height: 1;
                        color: $darkGray;
                        text-shadow: 0 1px 0 #fff;
                    }
                }

                .cdss-alert-details {
                    margin-top: 10px;
                    .fa {
                        cursor: pointer;
                        display: inline-block;
                        width: 18px;
                        height: 18px;
                        line-height: 18px;
                        text-align: center;
                        border-radius: 100%;
                        font-size: 20px;
                        color: #669999;
                        box-shadow: 1px 1px 1px #ccc;
                        background: #FFFFFF;
                        padding: 0;
                        margin-left: 5px;
                    }
                }

                .cdss-alert-close {
                    position: absolute;
                    right: 0;
                    top: 0;
                    font-size: 12px;
                    font-weight: bold;
                    line-height: 1;
                    color: #000;
                    text-shadow: 0 1px 0 #fff;
                    background: transparent;
                    width: 1.5rem;
                    height: 1.5rem;
                    text-align: center;
                    border-radius: 50%;
                    border: none;
                    padding: 0;
                    cursor: pointer;
                    transition: opacity .15s ease-in-out;
                }
            }

            .cdss-alert-close-reason {
                width: 100% !important;
            }

            #SOS {
                margin-right: 5px;
                line-height: .9em;
                margin-top: 4px;
                padding: 6px 20px 6px;

                @media screen and (max-width: 1024px) {
                    line-height: 1.3em;
                    padding: 7px 20px;
                }
            }

            #asNeededcheckbox {
                min-width: 0px;
                width: 20px;
                transform: scale(1);
                height: 20px;
           }
        }

        form .form-field,
        .form .form-field {

            input,
            select {
                padding: 4px 10px 3px;
                width: 185px;
                min-width: 185px;
                box-sizing: border-box;

                @media (max-width: 1024px) {
                    padding: 6px 10px;
                    width: 142px;
                    min-width: 142px;
                    height: 31px;
                }

            }

            .field-attribute label {
                width: 7.6em;

                @media screen and (max-width: 768px) {
                    float: none;
                    width: 11em;
                    clear: both;
                    text-align: left;
                }
            }
        }

        .edit-drug-order-container .accept-btn {
            margin-left: 5px;
            margin-top: 4px;
            padding: 7px 10px 7px;
            width: 77px;
            clear: both;
            float: right;

            @media screen and (max-width: 1024px) {
                padding: 8px 10px 7px;
            }

            @media screen and (max-width: 768px) {
                margin-right: 41px;
            }
        }

        input[type="date"] {
            padding: 2px 10px 3px !important;

            @media screen and (max-width: 1024px) {
                padding: 6px 10px !important;
            }
        }

        textarea {
            width: 185px;

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

        .operations {
            margin-top: 10px;
        }

        .dose-cell {
            margin-left: 5px;

            input[type="number"] {
                min-width: 59.6px;
                width: 59.6px;
                padding: 4px 0px 3px 8px !important;
                text-align: center;

                @media (max-width: 1024px) {
                    min-width: 45px;
                    width: 45px;
                    padding: 7px 0px 7px 8px !important;
                }

                @media (max-width: 768px) {
                    width: 44px;
                    min-width: 44px;

                }
            }
        }

        h3.orderSet-additional-info {
            font-family: OpenSansBold;
            color: $darkGray;
            font-size: 13px;
            border-bottom: 1px solid $lightGray;
            padding: 20px 0 5px;
            margin: 0 0 10px;
        }

        #SOS {
            margin-right: 5px;
            line-height: .9em;
            margin-top: 4px;
            padding: 6px 20px 6px;

            @media screen and (max-width: 1024px) {
                line-height: 1.3em;
                padding: 7px 20px;
            }
        }
    }

    .treatment-section-right {
        flex-grow: 1;

        @media screen and (min-width: 769px) {
            max-width: calc(100% - 332px);
        }

        .dashboard-section {
            position: relative;
            clear: both;
            margin-top: 0;
            border-radius: 3px 3px 0 0;
        }

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

    }

    .frequencyField {
        clear: both;
    }

    .cdss-icon-medication {
        color: #8e8e8e;
        padding: 0px !important;
        margin: 0px 2px;
    }

    .active-drug-alert {
        width: calc(100% - 22px);
        padding: 10px;
        font-size: 14px;
        cursor: pointer;
        display: grid;
        grid-template-columns: 2rem auto 4rem;
        > div {
            display: flex;
            &:first-child {
                align-items: flex-start !important;
            }
            &:not(:last-child) {
                flex-direction: column;
                justify-content: flex-start !important;
                margin-top: 5px !important;
            }
            
        }
        a {
            text-decoration: none;
            color: #000;
        }
        .cdss-alert-close {
            background: none;
            border: none;
            position: absolute;
            right: 0;
            top: 0;
            font-size: 12px;
            z-index: 1;
        }
        .summary {
            position: relative;
            .expand-details {
                position: absolute;
                right: 0;
                top: calc(100% - 5px);
                font-size: 12px;
                font-weight: bold;
                line-height: 1;
                color: #000;
                text-shadow: 0 1px 0 #fff;
                background: transparent;
                width: 1.5rem;
                height: 1.5rem;
                text-align: center;
                border-radius: 50%;
                border: none;
                padding: 0;
                cursor: pointer;
                transition: opacity .15s ease-in-out;
            }
        }
        .cdss-alert-details {
            margin-top: 10px;
            .operations, .field-value {
                margin-top: 10px;
            }

            .form-field {
                padding: 0px !important;
            }
        }



        .alert-controls {
            justify-content: space-between;
            align-items: flex-start;
            button, i {
                padding: 5px !important;
                position: relative !important;
                font-size: 16px;
                font-weight: 600;
            }
        }
    }

    .cdss-alert-audit-form {
        display: flex;
        align-items: center;
        > div {
            // width: calc(100% - 20px);
            select {
                width: 100%;
            }
            &:first-child {
                margin-right: 10px;
            }

        }
    }

    .bg-critical {
        background-color: #ffd6d8;
        border: 1px solid #ff0000;
        position: relative;
    }

    .bg-warning {
        background-color: #feead6;
        border: 1px solid #ffa500;
        position: relative;
    }

    .bg-info {
        background-color: #d5f5ff;
        border: 1px solid #00a3e0;
        position: relative;
    }

    .bg-inactive {
        background-color: #f5f5f5;
        border: 1px solid #ccc;
        position: relative;
    }

    i.critical {
        color: #ff0000;
    }

    i.warning {
        color: #ffa500;
    }

    i.info {
        color: #00a3e0;
    }
    i.inactive {
        color: #8e8e8e !important;
    }
}

@import "customDrugOrderHistory";
@import "treatmentOrderSet";