@import url("../lib/open-props/easings.min.css");
@import url("../lib/open-props/animations.min.css");

:root {
    font-size: 16px;
}

* {
    font-size: 1rem;
}

html,
body {
    /* Main colour definitions. Changing these will change the entire colour scheme of the application */
    --colour-system-background-rgb: 251, 251, 251;
    --colour-system-background: rgb(var(--colour-system-background-rgb));
    --colour-system-background-dark: #F2F1F1;
    --colour-system-foreground: #333333;
    --colour-system-foreground-dark: #000000;
    --colour-system-background-light: #fff;
    --colour-system-foreground-light: #353535;
    --colour-success: #00ff55;
    --colour-action-primary: #28ace2;
    --colour-action-primary-dark: #2da6ff;
    --colour-action-primary-light: #2db4ff;
    --colour-action-primary-foreground: #ffffff;
    --colour-action-primary-hover: var(--colour-action-primary-dark);
    --colour-action-primary-disabled: #919191;
    --colour-action-primary-disabled-foreground: #dddddd;
    --colour-action-inactive-light: rgba(0,0,0,0.058823529411764705);
    --colour-action-inactive: #81858F;
    --colour-action-inactive-foreground: #ffffff;
    --colour-action-inactive-light: #E5E5E5;
    --colour-action-inactive-light-foreground: #919191;
    --colour-action-secondary: #073756;
    --colour-action-secondary-hover: #084871;
    --colour-action-secondary-foreground: #ffffff;
    --colour-action-secondary-dark: #052940;
    --colour-action-secondary-dark-hover: #0a4b76;
    --colour-action-secondary-dark-foreground: #ffffff;
    --colour-action-secondary-light: #2faced;
    --colour-action-system-background: #707070; /*e.g. for a close button (the one with the x in)*/
    --colour-action-system-foreground: #ffffff;
    --colour-action-system-foreground-dark: #818181;
    --colour-action-negative-background: #878787; /*e.g. for a cancel button*/
    --colour-action-negative-foreground: #fff;
    --colour-action-negative-foreground-inverse: #878787;
    --colour-action-negative-background-inverse: #fff;
    --colour-action-warning-background: #ed9107;
    --colour-action-warning-foreground: #fff;
    --colour-action-warning-foreground-inverse: #ed9107;
    --colour-action-warning-background-inverse: #fff;
    --colour-action-danger-background: #EB4142;
    --colour-action-danger-background-dark: #D2242D;
    --colour-action-danger-background-light: #FE5450;
    --colour-action-danger-foreground: #fff;
    --colour-action-danger-background-inverse: #fff;
    --colour-action-danger-foreground-inverse: #EB4142;
    --colour-action-danger-foreground-inverse-dark: #D2242D;
    --colour-action-danger-foreground-inverse-light: #FE5450;
    --colour-text-description: #A1A1A1;
    --colour-icon-primary: #333333;
    --colour-icon-primary-dark: #eeeeee;
    --colour-link-primary: #00AEEF;
    --colour-border-primary: #B1B1B1;
    --colour-border-primary-light: #C8C8C8;
    --colour-border-dark: #707070;
    --colour-heading-foreground: #333333;
    --colour-menu-background: #ffffff;
    --colour-menu-background-hover: #F2F1F1;
    --colour-menu-foreground: #333333;
    --colour-text-selection-primary-background: #00AEEF;
    --colour-text-selection-primary-foreground: #ffffff;
    --colour-document-page-background: #ffffff;
    --colour-primitive-black: #333333;
    --colour-primitive-white: #ffffff;
    --colour-primitive-grey: #c5c5c5;
    --colour-system-overlay-dark: rgba(33, 33, 33, 0.5);
    --colour-system-overlay-light: rgba(240, 240, 240, 0.5);
    /* SigniFlow Brand colours, don't change these for branding */
    --colour-signi-grey: #8A8C8F;
    --colour-flow-blue: #00AEEF;
    /*Z-INDEXES*/
    --z-index-app-bar: 1000;
    --z-index-dialog: 10000;
    --z-index-blades: 10000;
    --z-index-snackbar: 10500;
    --z-index-popover: 11003; /*Specifically + 3 because mud like changing their variables to add an extra 3 for random components*/
    --z-index-tooltip: 11500;
    --z-index-hero: 12000;
    /*GUTTER SIZES*/
    --gutter-size-large: 20px;
    --gutter-size: 15px;
    --gutter-size-medium: 10px;
    --gutter-size-small: 5px;
    --gutter-size-extra-small: 2px;
    /*GUTTER SIZES*/
    --border-radius-small: 2px;
    --border-radius-medium: 4px;
    --border-radius-large: 8px;
    --border-radius-xlarge: 16px;
    --drop-shadow-small: 1px 1px 5px rgba(0, 0, 0, 0.16);
    --drop-shadow-medium: 3px 3px 10px rgba(0, 0, 0, 0.16);
    --drop-shadow-large: 5px 5px 15px rgba(0, 0, 0, 0.16);
    --animation-duration-extra-short: 0.1s;
    --animation-duration-short: 0.2s;
    --animation-duration-medium: 0.5s;
    --animation-duration-long: 1s;
    --animation-duration-extra-long: 2s;
    /*FONT SIZES*/
    /* Dashboard colours */
    --colour-folder-closed-background: #F1AF0A;
    /*Animations*/

    --fade-in-animation: fade-in 0.2s linear;
    /*==============*/
    /*MUD OVERRIDES*/
    /*==============*/
    --mud-palette-black: var(--colour-primitive-black);
    --mud-palette-white: var(--colour-primitive-white);
    --mud-palette-primary: var(--colour-action-primary);
    --mud-palette-primary-text: var(--colour-action-primary-foreground);
    --mud-palette-primary-darken: var(--colour-action-primary-dark);
    --mud-palette-primary-lighten: var(--colour-action-primary-light);
    --mud-palette-primary-hover: var(--colour-action-primary-hover);
    --mud-palette-secondary: var(--colour-action-secondary);
    --mud-palette-secondary-text: var(--colour-action-secondary-foreground);
    --mud-palette-secondary-darken: var(--colour-action-secondary-dark);
    --mud-palette-secondary-lighten: var(--colour-action-secondary-light);
    --mud-palette-secondary-hover: var(--colour-action-secondary-hover);
    --mud-palette-surface: var(--colour-system-background);
    --mud-palette-background: var(--colour-system-background);
    --mud-palette-background-grey: var(--colour-system-background-dark);
    --mud-typography-default-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-default-size: 17px;
    --mud-typography-default-weight: 400;
    --mud-typography-h1-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-h1-size: 64px;
    --mud-typography-h1-weight: 300;
    --mud-typography-h2-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-h2-size: 51px;
    --mud-typography-h2-weight: 300;
    --mud-typography-h3-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-h3-size: 36px;
    --mud-typography-h3-weight: 400;
    --mud-typography-h4-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-h4-size: 25px;
    --mud-typography-h4-weight: 400;
    --mud-typography-h5-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-h5-size: 21px;
    --mud-typography-h5-weight: 400;
    --mud-typography-h6-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-h6-size: 16px;
    --mud-typography-h6-weight: 400;
    --mud-typography-subtitle1-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-subtitle1-size: 14px;
    --mud-typography-subtitle1-weight: 400;
    --mud-typography-subtitle2-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-subtitle2-size: 12px;
    --mud-typography-subtitle2-weight: 500;
    --mud-typography-body1-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-body1-size: 12px;
    --mud-typography-body1-weight: 400;
    --mud-typography-body2-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-body2-size: 10px;
    --mud-typography-body2-weight: 400;
    --mud-typography-button-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-button-size: 12px;
    --mud-typography-button-weight: 500;
    --mud-typography-caption-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-caption-size: 9px;
    --mud-typography-caption-weight: 400;
    --mud-typography-overline-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --mud-typography-overline-size: 10px;
    --mud-typography-overline-weight: 400;
    --mud-zindex-dialog: var(--z-index-dialog);
    --mud-zindex-popover: calc(var(--z-index-popover) - 3); /*Specifically - 3 because mud like changing their variables to add an extra 3 for random components*/
    --mud-zindex-snackbar: var(--z-index-snackbar);
    --mud-zindex-tooltip: var(--z-index-tooltip);
    --mud-default-borderradius: var(--border-radius-medium);
}

html,
body {
    font-size: 16px;
    line-height: 1.5;
    --font-family-heading-hero: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-hero: 4rem;
    --font-family-heading-1: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-1: 1.75rem;
    --font-weight-heading-1: 600;
    --font-family-heading-2: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-2: 1.5rem;
    --font-weight-heading-2: 600;
    --font-family-heading-3: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-3: 1.25rem;
    --font-weight-heading-3: 400;
    --font-family-heading-4: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-4: 1.125rem;
    --font-weight-heading-4: 400;
    --font-family-heading-5: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-5: 1rem;
    --font-weight-heading-5: 200;
    --font-family-heading-6: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-heading-6: 0.875rem;
    --font-weight-heading-6: 400;
    --font-family-subtitle-1: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-label-active: 0.75rem;
    --font-size-subtitle-1: 0.75rem;
    --font-weight-subtitle-1: 400;
    --font-family-subtitle-2: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-subtitle-2: 0.625rem;
    --font-weight-subtitle-2: 500;
    --font-family-body-1: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-body-1: 1rem;
    --font-weight-body-1: 400;
    --font-family-body-2: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-body-2: 0.825rem;
    --font-weight-body-2: 400;
    --font-family-button: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-button: 0.75rem;
    --font-weight-button: 500;
    --font-family-caption: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    --font-size-caption: 0.625rem;
    --font-weight-caption: 400;
    --font-size-input: 0.625rem;
    --breakpoint-md-min: 960px
}

/*Mud Breakpoints*/
/*< xs 600px*/
/*< sm 600px > < 960px*/
/*< md 960px > < 1280px*/
/*< lg 1280px > < 1920px*/
/*< xl 1920px > < 2560px*/
/*  xxl >= 2560px*/


@media screen and (min-width: 960px ) {
    html,
    body {
        --font-size-heading-1: 2.25rem;
        --font-size-heading-2: 1.875rem;
        --font-size-heading-3: 1.5rem;
        --font-size-heading-4: 1.25rem;
        --font-size-heading-5: 1.125rem;
        --font-size-heading-6: 1rem;
        --font-size-subtitle-1: 0.75rem;
        --font-size-subtitle-2: 0.625rem;
        --font-size-body-1: 1rem;
        --font-size-body-2: 0.825rem;
        --font-size-button: 0.75rem;
        --font-size-caption: 0.625rem;
        --font-size-input: 0.625rem;
    }
}


html,
body {
    margin: 0px;
    font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    color: #353535;
    /* This is pretty new, but will be supported by all modern browsers soon. */
    /* It'll just get ignored if the browser doesn't support it. */
    /* Currently it just stops the page from trying to transition when we transition between the loading messages */
    view-transition-name: none;
}

* {
    transition-timing-function: linear;
}


#app,
#app > .page,
#app > .page .main {
    min-height: 100vh;
    background: var(--colour-system-background);
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
}


main {
    flex: 1;
}

h1:focus {
    outline: none;
}

#blazor-error-ui {
    position: fixed;
    right: 0;
    left: unset;
    bottom: unset;
    top: 0;
    color: var(--colour-action-danger-foreground-inverse);
    background: transparent;
    width: fit-content;
    font-weight: 700;
    padding: var(--gutter-size-medium);
    z-index: var(--z-index-snackbar);
    user-select: none;
    cursor: pointer;
}

    #blazor-error-ui a {
        color: unset;
        display: none;
    }


body:has(.page.devMode) #blazor-error-ui a {
    display: block;
}

.loadingProgress__container {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--colour-system-background);
}

.loading-progress {
    height: 500px;
    width: 500px;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--colour-action-primary);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    text-align: center;
    font-weight: bold;
    font-size: 50px;
    position: absolute;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
        color: var(--colour-action-system-foreground-dark);
    }



/* Preloader page */
.appLoader__container {
    background: var(--colour-action-secondary);
    width: 100vw;
    height: 100vh;
    position: fixed;
    cursor: default;
}

    .appLoader__container .content__container {
        background: var(--colour-system-background);
        border-radius: 10px;
        box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.16);
        position: absolute;
        top: 25%;
        left: 50%;
        transform: translateX(-50%);
        max-width: 800px;
        width: 70%;
        height: 50%;
        max-height: 400px;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: space-evenly;
        align-items: center;
        padding: 15px 5px;
    }

.appLoader__logoContainer {
    width: 80%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-end;
    flex-direction: column;
}

.appLoader__logoImage {
    max-height: 160px;
    width: max-content;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.version {
    margin-top: -20px;
    margin-right: 10%;
    font-size: 24px;
    font-family: 'Cairo', 'Cairo Variable', sans-serif;
    font-weight: 300;
    color: var(--colour-signi-grey);
    animation: var(--animation-slide-in-right), var(--animation-fade-in);
}


.appLoader__loaderContainer {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: var(--gutter-size);
}

.loader {
    display: block;
    position: relative;
    height: 12px;
    width: 100%;
    border: 1px solid var(--colour-border-primary);
    border-radius: 10px;
    overflow: hidden;
}

    .loader:after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: var(--blazor-load-percentage);
        background-color: var(--colour-action-primary);
        background-image: linear-gradient(to right, transparent, #dfdfdf, transparent);
        background-size: 80vw 100%;
        background-repeat: no-repeat;
        animation: loader-shine 2s cubic-bezier(1, -0.02, .46, 1) infinite;
    }

.appLoader__text {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin: var(--gutter-size) 0;
    font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    font-weight: 300;
    font-size: 16px;
    min-height: 3lh;
    color: var(--colour-text-description);
}

.appLoader__text--message {
    width: 100%;
    width: -moz-available; /* WebKit-based browsers will ignore this. */
    width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
    width: fill-available; /* This isn't widely supported yet, so we'll fall back to the webkit, moz, or just 100% */
    view-transition-name: replace-effect;
}

    .appLoader__text--message a {
        color: var(--colour-link-primary);
    }

.appLoader__text--percentage {
    text-align: center;
}

    .appLoader__text--percentage:after {
        margin-left: 4px;
        font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
        font-weight: 300;
        font-size: 16px;
        content: var(--blazor-load-percentage-text);
        color: var(--colour-text-description);
    }

.heroPopover__container {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 100vw;
    height: 100vh;
    animation: var(--fade-in-animation);
    z-index: var(--z-index-hero);
}

@media screen and (max-width: 768px) {
    .content__container {
        width: 90%;
        height: 70%;
    }

    .appLoader__logoContainer {
        width: 100%;
    }

    .appLoader__logoImage {
        max-height: 100px;
    }

    .version {
        font-size: 18px;
    }

    .appLoader__text {
        font-size: 14px;
    }
}


@keyframes loader-shine {
    from {
        background-position-x: -120vw
    }

    to {
        background-position-x: 80vw;
    }
}

@media (prefers-reduced-motion: no-preference) {
    /* customize how the OLD item transitions out */
    ::view-transition-old(replace-effect) {
        animation: var(--animation-fade-out), var(--animation-slide-out-up);
    }

    /* customize how the NEW item transitions in */
    ::view-transition-new(replace-effect) {
        z-index: 1;
        animation: var(--animation-fade-in), var(--animation-slide-in-up);
    }
}


@font-face {
    font-family: 'Cairo Variable';
    src: url('fonts/Cairo/Cairo-Variable.ttf') format('truetype-variations');
}

@font-face {
    font-family: "Risotto Signature Font";
    src: local("Risotto Signature Font"), url("fonts/Risotto/Risotto Signature Font.otf") format("opentype"), url("fonts/Risotto/Risotto Signature Font.woff") format("woff");
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.mud-list-item > .mud-list-item-icon {
    min-width: 24px;
    padding: 2px var(--gutter-size-medium);
}
