﻿/*#region Variables */

:root {
    --height-top-bar: 56px;
    --dialog-max-height: 100vh;
    --dialog-vertical-spacing: 1rem;
    --table-max-height: 100vh;
    --table-vertical-spacing: 244px;
    --live-screen-status-panel-min-width: 425px;
    --live-screen-status-panel-max-width: 520px;
}

/*#endregion */

html {
    /*Root Font size that is used for rem units*/
    font-size: 16px !important;
    height: 100%;
}

/*#region Tables */

.mud-table .mud-table-toolbar {
    flex-wrap: wrap;
}

    .mud-table .mud-table-toolbar .mud-typography {
        margin-left: 8px !important;
    }

    .actionbar-popover{
        width: fit-content !important;
    }

/*#endregion */

/*#region index pages*/
.index-page {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0px;
}

/*.mud-table-container {
    max-height: calc(var(--table-max-height) - var(--table-vertical-spacing));
}*/

/*#region Old */

.floating_button {
    position: fixed;
    top: 70px;
    right: 30px;
    z-index: 999;
}

.menu_head {
    height: 180px;
    text-align: center;
    background-image: linear-gradient(to bottom, #33363D, rgba(255,255,255,0.1));
}

.mud-toolbar {
    max-height: 150px;
}

.full_height {
    height: 100%;
}

.fullscreen {
    width: 100vw;
    height: 100vh;
}

.overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    right: 0;
}

.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading_display {
    position: absolute;
    top: 20vh;
    width: 100%;
    text-align: center;
}

.mud-popover {
    justify-content: center;
}

.device_nav {
    display: flex;
    justify-content: center;
    text-align: center;
    position: fixed;
    top: 15px;
    z-index: 1300;
}

.progress {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: .75rem;
    background-color: #e9ecef;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    background-color: #33363D;
    transition: width .6s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    -webkit-animation: progress-bar-stripes 1s linear infinite;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }

    to {
        background-position: 0 0;
    }
}

.loader {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border: 16px solid silver;
    border-top: 16px solid #33363D;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1500ms linear infinite;
}

.icon_loader {
    animation: spin 1500ms linear infinite backwards;
}

.refresh-icon {
    animation: spin 1500ms linear infinite backwards;
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

@keyframes pulse {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: .25;
        transform: scale(.75);
    }
}

.spinner-box {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

.pulse-container {
    width: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.pulse-bubble {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #0094ff;
}

.pulse-bubble-1 {
    animation: pulse .4s ease 0s infinite alternate;
}

.pulse-bubble-2 {
    animation: pulse .4s ease .1s infinite alternate;
}

.pulse-bubble-3 {
    animation: pulse .4s ease .2s infinite alternate;
}

/*#endregion */

/*#region Buttons */

.button-loader {
    /* Hide the existing text */
    text-indent: 900%;
    white-space: nowrap;
    overflow: hidden;
}

    .button-loader::before {
        /* NOTE: ::after is used by mudbutton */
        content: "";
        position: absolute;
        top: calc(50% - 0.5em);
        left: calc(50% - 0.5em);
        width: 1em;
        height: 1em;
        border: 0.2em solid currentColor;
        border-top-color: #000000;
        border-radius: 50%;
        box-sizing: border-box;
        animation: spin 1500ms linear infinite;
    }

/*#endregion */

/*#region Mud Dialog */

.mud-dialog {
}

    .mud-dialog .mud-dialog-content {
        max-height: calc(var(--dialog-max-height) - ((var(--height-top-bar) + var(--dialog-vertical-spacing)) * 2));
        overflow-y: auto;
    }

        .mud-dialog .mud-dialog-content form {
            overflow: hidden;
        }

/*#endregion */

/*#region Device Dashboard */
.live-screen-status-panel {
    max-width: 100%;
}

.status-chip-size {
    min-width: 110px;
}
/*#endregion */

/*#region Validation Summary */
.validation-errors {
    list-style: inside;
}

    .validation-errors .validation-message {
        color: var(--mud-palette-error) !important;
    }

/*#endregion */

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

/*#region Media Queries */
/*Applied on any size bigger then mobile*/
@media(min-width: 600px) {
    :root {
        --height-top-bar: 64px;
    }

    .gateway-license-table .mud-toolbar {
        height: 55px !important;
    }
}

@media(min-width: 960px) {
}

@media(min-width: 1280px) {
    .live-screen-status-panel {
        min-width: var(--live-screen-status-panel-min-width);
        max-width: var(--live-screen-status-panel-max-width);
    }
}

@media(min-width: 1920px) {
    .live-screen-status-panel {
        max-width: calc(var(--live-screen-status-panel-max-width) + 200px);
    }
}

@media(min-width: 2560px) {
    .live-screen-status-panel {
        max-width: calc(var(--live-screen-status-panel-max-width) + 400px);
    }
}

/*#region Devices */
.devices-table .mud-table-cell {
    padding: 8px !important;
}

.shift-right {
    left: 10px;
}
/*#endregion */

/* typical phone screen resolution */
@media only screen and (max-width : 667px) {
    .xs-width-full {
        width: 100% !important;
    }

    .e-dashboardlayout.e-control.e-responsive {
        height: calc(100vh - 230px) !important;
        top: 120px;
    }

    .dashbaord-selector {
        padding: 0px 2px;
        margin: 4px;
        width: 100% !important;
    }

    .hide-on-mobile,
    .mud-tooltip.mud-tooltip-default {
        display: none !important;
    }    

    .please-note-text {
        font-size: 0.85rem !important;
    }

    .device-alert-enabled-td {
        padding-right: 8px !important;
    }

    .device-alerts-table .mud-table-cell {
        line-height: 2.6 !important;
    }

    .user-profile-notifications-div {
        flex-direction: column;
        gap: 16px;
    }
}
/*#endregion */

/*#region Login */
/*#remove blue background with input autocomplete */
input:-webkit-autofill,
input:-webkit-autofill:focus {
    transition: background-color 600000s 0s, color 600000s 0s;
}

input[data-autocompleted] {
    background-color: transparent !important;
}
/*#endregion */

/*#region Live Reports */
/*#applied on mobile */
@media(max-width:523px) {
    .full-width-on-mobile {
        width: 100%;
    }
}

@media (max-width: 600px) {
    #live-reports-table .mud-table-cell {
        text-align: end !important;
    }

    .dataset-alert .mud-alert-position {
        justify-content: center;
    }

    .date-info {
        text-align: center;
        gap: 0 !important;
    }
}

#live-reports-dataSets-table .mud-table-cell:first-of-type {
    padding-left: 8px !important;
}

.live-reports-parameters-div .input-width {
    width: 50% !important;
}

@media (max-width: 960px) {
    .live-reports-parameters-div {
        flex-direction: column !important;
    }

    #live-reports-dataSets-table .mud-table-cell {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .live-reports-parameters-div .input-width {
        width: 100% !important;
    }
}
/*#endregion */

/*#region Live Reports Date Range Picker */
/*#override MudDateRangePicker styles for custom look and feel */
.date-range-picker .mud-button-date {
    font-size: 1rem !important;
    font-weight: bold !important;
    letter-spacing: inherit !important;
    padding-left: 0 !important;
}

.date-range-picker .mud-picker-datepicker-toolbar {
    align-items: center !important;
    flex-direction: row !important;
}

.date-range-picker .mud-button-year {
    font-weight: bold !important;
    letter-spacing: inherit !important;
}

.date-range-picker-div {
    max-height: 500px;
    overflow-y: auto;
    margin-top: -7px
}

.date-picker-grid {
    width: 310px;
}

.date-range-picker .mud-picker-toolbar {
    height: 40px !important;
}

.date-range-picker .mud-picker-calendar-container {
    margin: 0 auto !important;
}

.date-range-picker .mud-picker-calendar-content {
    grid-column-gap: 0px !important;
}

.date-range-button {
    width: 50%;
}

.live-report-input .mud-input-root-outlined {
    padding: 14px !important;
}

.date-range-input .mud-input-root-outlined {
    display: flex !important;
    align-items: center !important;
    padding: 10px 0 9px 0 !important;
}

.last-grid-item {
    align-self: center !important;
}

@media (max-width: 600px) {
    .date-range-picker .mud-picker-calendar-content, .date-picker-grid {
        grid-template-columns: 1fr !important;
    }

        .date-picker-grid .mud-grid-item {
            width: 300px;
        }

    .mud-popover.mud-popover-open {
        width: 92% !important;
    }

    .last-grid-item {
        padding-bottom: 40px !important;
    }

    .date-picker-grid .mud-select {
        margin-top: -680px;
    }

    .date-range-picker .mud-picker-calendar-container:first-of-type {
        padding-top: 80px;
    }

    .first-grid-item {
        padding: 0 !important;
    }
}
/*#endregion */

/*#region Gateway Setup - Find Gateway page */
.gateway-arrow-img {
    display: block;
    position: absolute;
    vertical-align: middle;
}

@keyframes pulseIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@-webkit-keyframes pulseIn {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.gateway-arrow-img {
    translate: 215px -160px;
    animation: 1500ms pulseIn 0ms ease-in-out infinite;
    -webkit-animation: 1500ms pulseIn 0ms ease-in-out infinite
}

.gateway-img {
    display: block;
}

.gateway-mobile-img {
    display: none;
}

@media (max-width: 599px) {
    .gateway-img {
        display: none;
    }

    .gateway-mobile-img {
        display: block;
    }

    .gateway-arrow-img {
        translate: 175px -135px;
    }
}
/*#endregion */

/*#region Device - Alerts page */
.title-bold {
    font-weight: bold;
}

.mud-tab-active {
    background-color: var(--mud-palette-dark-hover);
}

.device-alert-header {
    background-color: var(--mud-palette-dark-hover);
    height: 45px;
    box-shadow: 0px 0px 4px #999;
    align-items: center;
    margin-top: 1px;
}

.device-alert-enabled-td .mud-checkbox,
.device-notifications-table .mud-checkbox {
    margin: 0;
}

.sub-header-text {
    font-size: 0.9rem;
    line-height: 1.1rem;
    font-style: italic;
}
/*#endregion */

/*#region Live Scheduled Reports */
/*#applied on mobile */
@media(max-width:700px) {
    .live-scheduled-report-grid-tabs {
        margin-top: 0px !important;
    }
}
/*#endregion */

/*#region Gateways page + Device page + Subscription page  + Users page + Reports page + Active Alerts page + Alert Groups page*/
.reports-table .mud-table-cell,
.subscriptions-table .mud-table-cell,
.users-table .mud-table-cell,
.user-activity-table .mud-table-cell,
.devices-table .mud-table-cell,
.alert-groups-table .mud-table-cell,
.active-alerts-table .mud-table-cell,
.gateways-table .mud-table-cell {
    padding: 5px !important;
}

.reports-table th,
.reports-table td,
.subscriptions-table th,
.subscriptions-table td,
.users-table th,
.users-table td,
.user-activity-table th,
.user-activity-table td,
.devices-table th,
.devices-table td,
.alert-groups-table th,
.alert-groups-table td,
.active-alerts-table th,
.active-alerts-table td,
.gateways-table th,
.gateways-table td,
.device-alerts-table th,
.device-alerts-table td {
    text-align: center;
}

.reports-table .mud-input,
.subscriptions-table .mud-input,
.users-table .mud-input,
.devices-table .mud-input,
.alert-groups-table .mud-input,
.active-alerts-table .mud-input,
.gateways-table .mud-input {
    margin-top: 0 !important;
}

.gateways-table .mud-chip-content {
    font-size: 0.7rem;
}

.gateways-table-licenses-div {
    max-width: 250px;
    text-align: center;
}

.gateways-table .max-width-95 {
    max-width: 95px;
}

.alert-groups-table .width-70,
.users-table .width-70,
.user-activity-table .width-70,
.subscriptions-table .width-70,
.reports-table .width-70 {
    width: 70px !important;
}

.alert-groups-table .alert-groups-button {
    margin: 0 !important;
}

@media only screen and (max-width : 667px) {
    .gateways-table-licenses-div, .reports-table-subscriptions-div, .reports-table-roles-div, .users-table-subscriptions-div, .users-table-roles-div {
        display: flex;
        flex-direction: column;
        max-width: none;
        align-items: end;
    }

    .gateways-table-licenses-div .mud-chip,
    .reports-table-subscriptions-div .mud-chip,
    .reports-table-roles-div .mud-chip,
    .users-table-roles-div .mud-chip,
    .users-table-subscriptions-div .mud-chip,
    .active-alerts-table-roles-div .mud-chip {
        margin-right: 0 !important;
    }

    .gateways-table .mud-table-cell,
    .subscriptions-table .mud-table-cell,
    .user-activity-table .mud-table-cell,
    .users-table .mud-table-cell,
    .devices-table .mud-table-cell,
    .reports-table .mud-table-cell,
    .active-alerts-table .mud-table-cell,
    .alert-groups-table .mud-table-cell {
        padding: 5px 16px !important;
    }

    .gateways-table tr td:first-child,
    .subscriptions-table tr td:first-child,
    .users-table tr td:first-child,
    .devices-table tr td:first-child,
    .reports-table tr td:first-child,
    .active-alerts-table tr td:first-child,
    .alert-groups-table tr td:first-child {
        padding-top: 12px !important;
    }

    .gateways-table tr td:last-child,
    .subscriptions-table tr td:last-child,
    .users-table tr td:last-child,
    .devices-table tr td:last-child,
    .reports-table tr td:last-child,
    .active-alerts-table tr td:last-child,
    .alert-groups-table tr td:last-child {
        padding-bottom: 12px !important;
    }

    .gateways-table-toolbar,
    .gateways-statistics-toolbar,
    .subscriptions-table-toolbar,
    .users-table-toolbar,
    .devices-table-toolbar,
    .reports-table-toolbar,
    .active-alerts-table-toolbar,
    .alert-groups-table-toolbar {
        flex-direction: column !important;
    }

    .gateways-table .mud-toolbar,
    .subscriptions-table .mud-toolbar,
    .users-table .mud-toolbar,
    .devices-table .mud-toolbar,
    .reports-table .mud-toolbar,
    .active-alerts-table .mud-toolbar,
    .alert-groups-table .mud-toolbar {
        height: 85px;
    }

    .gateways-table-header,
    .gateways-statistics-header,
    .subscriptions-table-header,
    .users-table-header,
    .devices-table-header,
    .reports-table-header,
    .active-alerts-table-header,
    .alert-groups-table-header {
        margin-top: 12px;
    }

    .gateways-table-search,
    .subscriptions-table-search,
    .users-table-search,
    .devices-table-search,
    .reports-table-search,
    .active-alerts-table-search,
    .alert-groups-table-search {
        width: 100%;
    }

    .devices-table .mud-table-row:nth-of-type(odd) td,
    .gateways-table .mud-table-row:nth-of-type(odd) td,
    .subscriptions-table .mud-table-row:nth-of-type(odd) td,
    .users-table .mud-table-row:nth-of-type(odd) td,
    .user-activity-table .mud-table-row:nth-of-type(odd) td,
    .reports-table .mud-table-row:nth-of-type(odd) td,
    .active-alerts-table .mud-table-row:nth-of-type(odd) td,
    .alert-groups-table .mud-table-row:nth-of-type(odd) td {
        background: var(--mud-palette-dark-hover);
    }

    .mud-chip {
        max-width: 230px !important;
        /*overflow-x: auto !important;*/
    }
}
/*#endregion */

/*#region Gateways Setup - License page */
.license-key-input .mud-input.mud-input-underline:before,
.license-key-input .mud-input.mud-input-underline:after,
.license-key-input:hover {
    border: none !important;
}

.license-key-input .mud-input {
    margin: 0 !important;
}

.license-key-input .mud-input-root {
    text-align: center;
    padding: 0 !important;
    font-size: .875rem !important;
}

.license-key-input {
    margin-top: 0 !important;
}
/*#endregion */