:root {
    /* That's not really the appbar height. That would be 48px cause Dense="true". This one just worked for the full height for some reason. */
    --mw-appbar-height: 112px;
    --mw-full-height:   calc(100vh - var(--mw-appbar-height));
    --mw-mc-primary:    var(--mud-palette-primary-rgb);
    --mw-mc-secondary:  var(--mud-palette-secondary-rgb);
    --mw-mc-tertiary:   var(--mud-palette-tertiary-rgb);
    --mw-mc-info:       var(--mud-palette-info-rgb);
    --mw-mc-success:    var(--mud-palette-success-rgb);
    --mw-mc-warning:    var(--mud-palette-warning-rgb);
    --mw-mc-error:      var(--mud-palette-error-rgb);
    --mw-mc-dark:       var(--mud-palette-dark-rgb);
}

/* REGIONSTART: Build-in Remove? --------------------------------------------------------------------------------------------------------------------------------- */

html, body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    /*border: solid 10px rgb(var(--mw-mc-primary)); !* Testing variable translation from Mud to MW *!*/
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color:            #fff;
    background-color: #1b6ec2;
    border-color:     #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFB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Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding:    1rem 1rem 1rem 3.7rem;
    color:      white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* REGIONEND: Build-in Remove? --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONSTART: ShiftPlanner --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONEND: ShiftPlanner --------------------------------------------------------------------------------------------------------------------------------- */

/* NOTE: DataGrid - Making the property column multiline */

.multiline-property-column .mud-table-cell,
.mud-table-cell.multiline-property-column,
td.multiline-property-column {
    white-space:    pre-line !important;
    line-height:    1.5;
    padding-top:    8px;
    padding-bottom: 8px;
}

/* NOTE: Select - Making Select multiline */

.mud-select-input .mw-multiline {
    white-space:    pre-line !important;
    line-height:    1.5;
    padding-top:    8px;
    padding-bottom: 8px;
}


/* NOTE: Select - Making everything multiline */

.mw-multiline {
    white-space:    pre-line !important;
    line-height:    1.5;
    padding-top:    8px;
    padding-bottom: 8px;
}

/* NOTE: MWClipboardChip */

/* This one will disable the onclick of the chip and can be put into a media query to have it be disabled on mobile */
/*.mw-clipboard-chip {*/
/*    pointer-events: none;*/
/*}*/

/* REGIONEND: Dialogs --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONSTART: Dialogs --------------------------------------------------------------------------------------------------------------------------------- */

/* NOTE: Signature Dialog */

.signature-pad {
    width:            100%;
    border:           4px solid #000;
    border-radius:    5px;
    padding:          0;
    margin:           0;
    background-color: white;
}

/* NOTE: General Dialogs */

/*TODO: Find out which of these is the correct one and delete the other */
/* To make it easier blur the background when a dialog is open. */
.dialog-background-blur {
    backdrop-filter: blur(10px);
}

/* To make it the defautl that the background is  blured when a dialog is open. */
.mud-overlay-dialog {
    backdrop-filter: blur(10px) !important;
}

.mud-dialog.mud-dialog-width-sm {
    padding: 16px;
}

/* Gives the ability to remove all m and p on a dialog with <MudDialog Class="mw-dialog-frameless">*/
.mw-dialog-frameless .mud-dialog-content {
    padding: 0 !important;
    margin:  0 !important;
}

/* <> */
.mw-dialog-frameless {
    padding: 0 !important;
    margin:  0 !important;
}

/* REGIONEND: Dialogs --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONSTART: TreeView --------------------------------------------------------------------------------------------------------------------------------- */

.e-treeview {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* For ShiftPlaner Supporter Popover */
.supporter-popover {
    width:    200px;
    overflow: hidden;
}

.supporter-popover-search {
    border-bottom: solid;
}

/* NOTE: TREEVIEW NODES in the people dnd in the shiftplaner */
.e-list-item.e-level-1 {
    --treeview-border-radius: 2px;
    background-color:         var(--mud-palette-primary);
    border-radius:            var(--treeview-border-radius);
    margin-bottom:            8px;
    margin-right:             10px;
    overflow:                 hidden;
}

/* How a node in the treeview looks when its hovered */
li.e-list-item.e-level-1.e-hover {
    background-color: var(--mud-palette-primary-darken);
    /*background-color: red;*/
    border-radius:    var(--treeview-border-radius);
}

/* How a node in the treeview looks when its selected (selected not checked) */
li.e-list-item.e-level-1.e-active {
    background-color: var(--mud-palette-primary-darken);
    /*background-color: red;*/
    border-radius:    var(--treeview-border-radius);
}

/* The drag preview of the treeview node */
.e-drag-item {
    border:           2px solid #000;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius:    5px;
    padding:          1px;
    height:           max-content !important; /* Since I made the .mw-treeview height: 100%, the drag preview would be also as big as the entire component without this. */
    margin-left:      10px;
    margin-top:       -20px;
    pointer-events:   none; /* This is kind magic and absolutely needed, otherwise it will interact with its self and cause all kinda problems. "Wann assign person to shift 0001-01-01..." */
}

/* Remove a square hover box on active and hover state in the treeview */
li.e-list-item.e-level-1.e-active > div.e-fullrow,
li.e-list-item.e-level-1.e-hover > div.e-fullrow {
    display: none;
}

/* This is so that the treeview does not cover the search field above. */
.mw-treeview {
    overflow: auto;
    height:   100%;
}

/* REGIONEND: TreeView --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONSTART: Animations --------------------------------------------------------------------------------------------------------------------------------- */

/* This is for the check-in animation in the PeopleView. Not working currently. TODO: Either make work, or remove*/
/* Animation when clicking the checkin button. */
@keyframes greenWave {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.green-wave-animation {
    background:      linear-gradient(90deg, transparent, green, transparent);
    background-size: 200% 100%;
    /* Ensures the wave spans more than the full width */
    animation:       greenWave 2s linear forwards;
    /* 1s for duration, linear for constant speed, forwards to retain final state */
}

/* REGIONEND: Animations --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONSTART: Inventory Manager --------------------------------------------------------------------------------------------------------------------------------- */

/* I think this is for the Inventory manager. TODO: Find out */
/* Image hover effect */
.image-hover {
    position:   relative;
    transition: 0.3s;
}

.image-hover::after {
    content:       "";
    position:      absolute;
    top:           0;
    left:          0;
    width:         100%;
    height:        100%;
    background:    rgba(255, 255, 255, 0);
    transition:    background 0.3s;
    border-radius: inherit;
}

.image-hover:hover::after {
    background: rgba(255, 255, 255, 0.1);
}

/* REGIONEND: Inventory Manager --------------------------------------------------------------------------------------------------------------------------------- */

/* REGIONSTART: Misc --------------------------------------------------------------------------------------------------------------------------------- */

/* NOTE: Filled Icon Button */
/* The icon of the filled button is not good visible on Color.Warning and Color.Error. Used in the AccountPage */
.mw-filled-icon-button path:nth-of-type(2) {
    fill: var(--mud-palette-dark-lighten);
}

/* To make the line in the MudTimeLine in the VolunteerView longer */
.mud-timeline.mud-timeline-horizontal.timeline-extension::before {
    width:      calc(100% + 60px) !important;
    right:      -40px !important;
    background: red !important;
    height:     max-content !important;
}


/* Styles for screens 960px and wider */
@media (min-width: 960px) {
    .mw-data-grid-reactive-toolbar [role="toolbar"] {
        /*height: 110px !important;*/
    }
}

/* Styles for screens less than 960px */
@media (max-width: 959px) {
    .mw-data-grid-reactive-toolbar [role="toolbar"] {
        height: 110px !important;
    }
}


/* NOTE: PeopleView - The search text highlight */
.highlight-people-view {
    padding:          0.3px;
    background-color: rgb(var(--mud-palette-warning-rgb));
}

/* NOTE: DataGrid cells that contain buttons or menus. */
.template-column-cell {
    width:       300px;
    white-space: nowrap;
}

.property-column-cell {
    min-width:   auto;
    white-space: nowrap;
}

/* NOTE: DataGrid - Hide the child content of a row when DataGrid.MultiSelection */
.mud-data-grid.hide-child-content .mud-table-child-content {
    background-color: red !important; /* For testing */
    display:          none !important;
}

/* NOTE: DataGrid - Hide the child content of a row when DataGrid.MultiSelection. This is kind of CSS magic. I add the mw-hide-child-content class to the MWDataGridUtils and it works. */
.mud-table.mud-data-grid.mud-table-dense.mud-table-sticky-header:has(> .mud-toolbar.mud-toolbar-gutters.mud-table-toolbar > .d-flex.flex-row.align-center.mw-hide-child-content) .mud-table-child-content {
    display: none;
}

/* TODO: Verify what this is doing! */
.mud-table-container {
    width:      100% !important; /* Without this that DataGrid is just as big as the columns*/
    overflow-y: auto !important; /* This is necessary to fix the bug where the grid is not scrollable anymore when there are sticky columns.*/
    overflow-x: auto !important; /* This is necessary to fix the bug where the grid is not scrollable anymore when there are sticky columns.*/
}

/* NOTE: Display n/a when the DateTime of a Shift is MinValue or MaxValue in the RepublicaListView*/
td.mud-table-cell.datetime-na {
    position: relative !important;
    color:    transparent !important; /* Hide the original text */
}

td.mud-table-cell.datetime-na::after {
    content:        "n/a";
    position:       absolute !important;
    left:           16px !important; /* Center horizontally */
    top:            50% !important;
    transform:      translateY(-50%) !important; /* Center both horizontally and vertically */
    color:          var(--mud-palette-text-primary) !important;
    opacity:        0.87; /* Maintain similar opacity as other text */
    z-index:        2 !important; /* Ensure it shows above other elements */
    pointer-events: none; /* Allows clicking through to the cell */
}

.mw-info-highlight {
    background-color: var(--mud-palette-info) !important;
}

/* NOTE: JS - To remove the vertical scrollbar on the JourneyStep foldout. */
.mud-timeline-item {
    /*max-height: max-content !important;*/
    max-height: fit-content !important;
}

/* NOTE: JS - This is the line through the timeline */
.mud-timeline::before {
    width: 110% !important; /* This makes the line be long enough to reach the last point, somehow without this its too short. */
    top:   12px !important; /*background: red !important;*/
}

.mud-timeline-item-divider {
    /* TODO: Investigate for js top margin issue */
    /*height: fit-content !important; !* This makes the divider not have a fixed height, so it can be as high as the content inside it. *!*/
    min-height: auto !important; /* This reduces the vertical space around the timeline. Was super big before. */
}

.mw-timeline-item::before {
    /*border-left-color: var(--mud-palette-primary) !important;*/
    /*border-right-color: var(--mud-palette-primary) !important;*/
}

.mw-timeline-item::after {
    /*border-left-color: var(--mud-palette-primary) !important;*/
    border-right-color: var(--mud-palette-primary) !important;
}

.mw-timeline-item {
    background-color: var(--mud-palette-primary) !important;
}

.full-height-minus-appbar {
    height:     calc(100vh - var(--mud-appbar-height)) !important;
    max-height: -webkit-fill-available;
}

.user-area-overflow-hidden {
    overflow-y: hidden !important;
}

/* NOTE: For the Email column in the VolunteerPage */
.mw-expand-on-hover {
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
}

.mw-expand-on-hover:hover {
    overflow: visible;
    /*overflow-wrap: anywhere !important;*/
    /*word-break: break-all !important;*/
}

.mw-wrap-on-hover {
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
}

.mw-wrap-on-hover:hover {
    white-space:   wrap;
    /*overflow-wrap: anywhere !important;*/
    /*word-break: break-all !important;*/
}

/* NOTE: For the TextField with a frame like border */
.mw-text-field-frame-like .mud-input-outlined-border {
    border: solid 2px black !important;
}

.mw-text-field-frame-like:hover .mud-input-outlined-border {
    border: solid 2px var(--mud-palette-primary) !important;
}

.mud-input.mud-input-outlined:has(textarea:focus) .mud-input-outlined-border {
    border: solid 2px var(--mud-palette-primary) !important;
}

/* NOTE: Hide the settings icon in the DataGrid */
.mw-data-grid-utils .mud-toolbar.mud-toolbar-gutters.mud-table-toolbar > .mud-menu {
    /* Your styles here */
    display: none; /* Example style */
}

/* NOTE: Shrink the toolbar in the DataGrid */
.mw-data-grid-utils > .mud-toolbar.mud-toolbar-gutters.mud-table-toolbar {
    /*padding: 0 !important; !* Remove padding *!*/
    /*margin: 0 !important; !* Remove margin *!*/
    height: 50px;
    /*min-height: 32px !important; !* Set min-height to 32px *!*/
}

/* NOTE: Make the editable DataGrid cell look like a MudTextField */
.mw-note-edit input:focus, .mw-note-edit input:hover {
    padding:       10px !important;
    border:        1px solid var(--mud-palette-primary);
    box-shadow:    0 0 0 1px var(--mud-palette-primary);
    border-radius: 15px;
    border-bottom: none !important;
}

.mw-note-edit .mud-input::after {
    content: none !important;
    display: none !important;
}

/*.e-schedule .e-timeline-view .e-schedule-table tbody tr:first-child td {*/
/*    position: sticky !important;*/
/*    top: 0 !important;*/
/*    z-index: 2000 !important;*/
/*    background: white;*/
/*    border-bottom: 1px solid #ddd;*/
/*}*/


/*NOTE: Animate the person list open button */
/*.mw-sp-people-list-button {*/
/*    overflow:      hidden;*/
/*    transition: max-width 0.3s ease-in-out;*/
/*    display: flex !important;*/
/*    justify-items: flex-start;*/
/*}*/

/*.mw-sp-people-list-button.mw-sp-people-list-button-open {*/
/*    */
/*    max-width: 10px !important; !* Adjust this value to the width you want when open *!*/
/*    min-width: auto !important;*/
/*}*/

/*.mw-sp-people-list-button.mw-sp-people-list-button-open .mud-button-icon-start.mud-button-icon-size-medium {*/

/*    flex-shrink: 0 !important;*/
/*}*/

/*Since the first two rows of the datagrid on the vol. page don't have a HeaderStyle property and
using Style didn't work, we tried to change the column widt with this class but that didn't work either*/
/*.mw-data-grid-short-h-s ~ table th:nth-of-type(1),*/
/*.mw-data-grid-short-h-s ~ table th:nth-of-type(2) {*/
/*    width: 100px !important; !* or whatever width you need *!*/
/*    max-width: 100px !important; !* prevents them from growing *!*/
/*    min-width: 100px !important; !* prevents them from shrinking *!*/
/*}*/

/* Here I was trying to make a pseudo element that would display the time above the timeline item. */
/*.mw-timeline-item::before {*/
/*    position: absolute;*/
/*    content: ';lsdajf;jalk';*/
/*    !* This is the line that connects the dots *!*/
/*    background: var(--mud-palette-primary) !important;*/
/*    !*width: 20px !important;*!*/
/*    left: 50% !important;*/
/*    top: -30px !important;*/
/*}*/

/* REGIONEND: Misc --------------------------------------------------------------------------------------------------------------------------------- */

