﻿/* Header */
@media only screen and (max-width: 720px) {
    #header-userinfo {
        display: none;
    }
}



/* Blazor server reconnect dialog */
#components-reconnect-modal {
    color: black;
}

iframe {
    background-color: white;
}

.order-item.backorder {
    color: red;
    font-weight: bolder
}

/* HTML Editor */
.html-editor-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.html-editor {
    flex-grow: 1;
    display: flex;
    height: 300px;
    width: 100%;
}
/* /HTML Editor */


/* Syncfusion RTE overrides */
.e-richtexteditor  .e-toolbar .e-toolbar-item {
    min-height: 20px !important;
}

.e-richtexteditor .e-toolbar .e-toolbar-item:not(.e-separator):not(.e-spacer) {
    min-width: 20px !important;
}

.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-tbar-btn.e-btn {
    min-height: 20px !important;
    min-width: 20px !important;

}
.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-rte-dropdown-menu {
    min-height: 20px !important;
}
.e-richtexteditor .e-toolbar .e-toolbar-item:not(.e-separator):not(.e-spacer) {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}
.e-richtexteditor .e-rte-toolbar .e-hor-nav.e-expended-nav {
    min-height: 20px !important;
    height: 30px !important;
}
.e-richtexteditor .e-toolbar .e-toolbar-item.e-separator {
    margin: 0px !important;
}

.e-split-btn-wrapper .e-split-btn.e-icon-btn {
    padding: 4px !important;
}
.e-richtexteditor .e-rte-toolbar .e-btn .e-btn-icon.e-icon-left {
    width: 1em !important;
}
.e-richtexteditor .e-rte-dropdown-btn-text-wrapper {
    font-size: 12.5px;
}
.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-rte-dropdown-menu {
    padding: 4px !important;
}
.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-rte-dropdown-menu .e-rte-dropdown-btn-text-wrapper {
    width: unset !important;
}
    /*.e-richtexteditor .e-rte-toolbar .e-toolbar-item .e-rte-dropdown-menu .e-rte-dropdown-btn-text {
    padding: 0px !important;
}*/
    /* /Syncfusion RTE overrides*/
    /* Preview */
    .image-container {
        width: 100%;
        height: 100%;
        overflow: hidden;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: zoom-in;
        background-color: #000;
    }

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.image-container.zoomed {
    cursor: zoom-out;
    overflow: auto;
}

.image-container.zoomed img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
}

/* Planner */
:root {
    --planner-subelement-margin-left: 2em;
    --planner-item-height: 30px;
}
.planner-attachment-icon {
    width: 100%;
    max-width: 1.5rem;
    max-height: 1.5rem;
    margin: 0.5em;
    object-fit: scale-down;
}

.planner-header-sticky {
    position: sticky !important;
    top: 0;
    background-color: inherit;
    z-index: 1;
}

.planner-item-container {
}

.planner-item-container.subelement {
    /*margin-top: 4px;*/
    margin-left: var(--planner-subelement-margin-left);
    background-color: rgba(66, 165, 245, 0.1);
}

.planner-list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: var(--planner-item-height);
    gap: 2px;
}

.planner-list-item-status .mud-input-slot.mud-input-root.mud-input-root-outlined.mud-input-root-margin-dense.mud-select-input {
    padding: 0px !important;
    height: 100%;
}
.planner-list-item-status .mud-select-input {
    height: var(--planner-item-height) !important;
}
/*.planner-list-item-status .mud-input-control.mud-input-control-margin-dense {
    margin: 0px !important;
}*/

.planner-list-item:hover {
    /*background-color: rgba(0, 0, 0, 0.2);*/
    background-color: var(--mab-primary-hover);
}

.add-new-planner-item-row {
    margin-left: var(--planner-subelement-margin-left);
}

.planner-list-item-expand {
    min-width: 20px;
}

.planner-list-item-expand.haschildren button {
    color: currentColor;
    visibility: visible !important;
}

.planner-list-item-expand button {
    visibility: hidden !important;
    /*color: var(--mud-palette-gray-dark);*/
}

/*.planner-list-item-expand button:has(:hover) {
    color: white !important;
    visibility: visible !important;
}*/

.planner-list-item-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    height: 20px;
    margin-right: -24px; /* Expand/contract icon */
    font-size: 12px;
    /*position: sticky;
    top: 48px;
    z-index: 9;
    background-color: var(--mud-palette-surface);*/
}
/* To show the sticky status header */
/*.planner .mud-collapse-wrapper {
    overflow: visible !important;
}*/


.planner-list-item.sidebar {
    min-width: 8px;
}

.planner-list-item-leftmenu {
    min-width: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
    text-align: center
}
.planner-list-item:hover .planner-list-item-leftmenu {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.planner-list-item-icon {
    min-width: 20px;
    cursor: pointer;
    height: 20px;
}

.planner-list-item-icon .mud-icon-root.mud-svg-icon {
    fill: var(--mud-palette-gray-dark);
}

.planner-list-item-icon:hover .mud-icon-root.mud-svg-icon {
    fill: white !important;
}

.planner-list-item-work {
    min-width: 32px;
}

.planner-list-item-comment {
    min-width: 32px;
}

.planner-list-item-name {
    width: 100%;
    min-width: 200px;
}

.planner-list-item-reference {
    min-width: 150px;
    text-align: center;
}

.planner-list-item-assignedto {
    min-width: 180px;
    text-align: center;
}

.planner-list-item-assignedto .inherited .mud-input {
    color: dimgrey !important;
}
.planner-list-item-assignedto .assignedtome {
    background-color: #524d85C0 !important;
}
/*.planner-list-item-assignedto .inherited.assignedtome {
    background-color: #524d8540 !important;
}
.planner-list-item-assignedto .assignedtome:not(.inherited) {
    background-color: #524d85C0 !important;
}*/
    .planner-list-item-status {
        min-width: 180px;
        text-align: center;
    }

.planner-list-item-menu {
    min-width: 30px;
}

.planner-list-item-deadline {
    min-width: 150px;
    text-align: center;
}

/* Drag-drop */
.drag-drop-item {
    cursor: grab;
}
/* /Drag-drop */

/* Multi search */
.multi-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.multi-search > .multi-search-panel {
    order: 2;
}

.multi-search > .multi-search-panel.loading {
    order: 1;
}

.multi-search > .multi-search-panel.has-results {
    order: 0;
}
/* /Multi search */


/* HTML preview */
.html-preview-container {
    margin-top: 0.1em;
    border: none;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0.5rem;
    height: 100px;
    overflow: auto;
}

.html-preview-container.shadow {
    background-color: #ffffff;
    color: #000000;
    line-height: initial;
}

/* Email client */
.template-variable {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px 2px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 500;
    background-color: #e0f2f1; /* Light teal */
    border: 1px solid #26a69a; /* Teal border */
    color: #00695c; /* Teal text */
    cursor: default;
    user-select: none;
    white-space: nowrap;
}

.email-address-box {
    background-color: rgba(173, 173, 177, 0.06);
    display: flex;
    gap: 8px;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 2px;
}
/* Evil hack */
.email-address-box .mud-select button.mud-icon-button {
    padding-right: 16px !important;
}

.email-address-field {
    margin: 0px !important;
}

.email-address-field .mud-input-slot {
    padding: 0px !important;
}

.email-preview-headers-panel {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1em;
}

.email-preview-headers {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.email-preview-headers .email-preview-table {
    width: 100%;
    table-layout: fixed;
}

/* First column: label */
.email-preview-headers .email-preview-table td:first-child {
    width: 100px;
    white-space: nowrap;
}

/* Second column: ellipsis */
.email-preview-headers .email-preview-table td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Because MudTooltip/MudMenu wrap the text, apply to inner span too */
.email-preview-headers .email-preview-table td:nth-child(2) span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-attachment-container {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    padding: 0em 1em;
    min-height: 65px;
    overflow: auto;
    flex-wrap: wrap;
}

.email-attachment-info-container {
    display: flex;
    flex-direction: row;
    border-radius: 5px;
    border: 1px solid var(--mab-datagrid-selected-background);
}

.email-attachment-icon {
    width: 100%;
    max-width: 1.5rem;
    max-height: 1.5rem;
    margin: 0.5em;
    object-fit: scale-down;
}

.email-folderstructure-folder {
    display: flex;
    width: 100%;
    align-items: center;
}

.email-attachment {
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    flex: 0 0 auto;
    white-space: nowrap;
}

.email-folder-unread-endtext {
    font-weight: bold;
    margin-right: 8px;
}

.email-attachment-text-container {
    display: flex;
    flex-direction: column;
    padding-right: 0.75em;
    max-width: 200px;
}

.email-attachment-text-container p {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.email-preview-body {
    margin-top: 0.1em;
    border: none;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.email-preview-body iframe {
    min-height: 100px;
    flex-grow: 1;
}

.email-preview-container {
    display: flex;
    flex-direction: column;
    width: 100px;
    flex-grow: 1;
    height: 100%;
}

.email-list-item {
    display: flex;
    flex-direction: row;
    height: 60px;
    padding-top: 4px;
    padding-bottom: 4px;
}
.email-list-item p {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.email-list-item-header-line {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.email-list-item.unread .email-list-item-header-line {
    color: white;
    font-weight: bold;
}
.email-list-item.unread .email-list-item-subject-line {
    color: var(--mud-palette-primary);
    font-weight: bold;
}
.email-list-item.selected {
    background-color: var(--mud-palette-black);
    color: white;
}


.email-list-item-subject-line {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 0.8rem;
}
.email-list-item-subject-line p:last-child {
    min-width: 75px;
}


.email-list-item.unread-bar {
    width: 6px;
    min-width: 3px;
}

.email-list-item.unread-bar.unread {
    background-color: #03A9F4;
}

.email-list-item-content {
    margin-left: 0.5em;
    margin-right: 0.5em;
    justify-content: space-between;
    flex-grow: 1;
    flex-direction: column;
    width: 100%;
    min-width: 50px;
}


.email-list-item-content-header {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}


/* Notifications */
.notification-icon .mud-badge {
    inset: auto auto calc(100% - 19px) calc(100% - 12px) !important; /* Slight hack because the toolbar is slimmer than original */
}

.notification-container {
    display: flex;
    flex-direction: column;
    min-width: 100px;
    padding: 0.5em 0.5em;
    height: 100%;
    width: 100%;
}

.notification-item-container {
    max-height: 70vh;
    height: 100%;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1em;
    align-items: center;
    flex-direction: row;
    padding: 0.5em;
    cursor: pointer;
    border-bottom: 1px solid var(--mud-palette-grey-light);
    /*max-height: 100px;*/
    height: 50px;
}

.notification-item-menu {
    display: none;
}

    .notification-item:hover .notification-item-menu,
    .notification-item-menu.active {
        display: unset;
    }

/* Call center */
@media only screen and (max-width: 720px) {
    .call-center-call-card {
        display: none;
    }
}

.call-center-call-card {
    width: 325px;
    margin-bottom: 1em;
    position: absolute;
}


/* Support case */
.support-case.active {
    background-color: #FFEE58 !important;
    color: #424242 !important;
}

.support-case.completed {
    background-color: #00E676 !important;
    color: #424242 !important;
}

/* Service claim*/
.service-claim.rejected,
.service-claim.finalrejected {
    background-color: #D50000 !important;
}

.service-claim.finalrejected,
.service-claim.deleted {
    text-decoration: line-through !important;
}

.service-claim.approved {
    background-color: #00C853 !important;
}

.service-claim.deleted {
    background-color: #9E9E9E !important;
}

.service-claim.senttoaccounting,
.service-claim.paid {
    background-color: #03A9F4 !important;
}


/* Document center */
.document-center-folder {
    display: inline-flex;
    width: 90px;
    padding: 5px;
    overflow: clip;
    max-height: 120px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
}

.document-center-list-header {
    display: flex;
    align-items: center;
    gap: 1em;
}

.document-center-list-item {
    display: flex;
    cursor: pointer;
    align-items: center;
    flex-grow: 1;
    gap: 1em;
    /*word-break: break-all;*/
}
.document-center-list .mud-list-item {
    padding-right: 6px !important;
    padding-left: 12px !important;
}
.document-center-list-item div {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.document-center-list .mud-list-item.mud-list-item-dense {
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}
.document-center-list .mud-list-item-text {
    margin: 0px !important;
}

.document-center-icon {
    width: 100%;
    max-width: 1.25rem;
    max-height: 1.25rem;
    margin-right: 0.5em;
    object-fit: scale-down;
}

.document-center-icon.large {
    max-width: 3rem;
    max-height: 3rem;
}

.document-center-favorite-item,
.email-favorite-item {
    cursor: pointer;
    padding: 2px 4px;
    align-items: center;
    display: flex;
}

.document-center-folderstructure-item {
    width: 100%;
}

.document-center-folderstructure-item.selected,
.document-center-folderstructure-item.selected a {
    color: var(--mud-palette-tertiary);
    background-color: var(--mud-palette-tertiary-hover);
    text-decoration: underline;
}

.document-center-favorite-item.contextmenu,
.document-center-folderstructure-item.contextmenu {
    border: 1px solid white;
}

.document-center-folderstructure-dropzone {
    width: 100%;
    display: flex;
    gap: 4px;
}
.document-center-folderstructure-dropzone.home:hover {
    background-color: var(--mud-palette-action-default-hover);
}
