﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* TEMP FIX FOR MUDBLAZOR */

.mud-dialog-height-full {
    max-height: calc(100dvh - 64px) !important;
}

/* END TEMP FIX FOR MUDBLAZOR */
html, body {
    /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/
}

.hidden {
    display: none !important;
}

#blazor-error-ui {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(5px);
    border-color: var(--mud-palette-lines-default);
    background-color: var(--mud-palette-overlay-dark);
    z-index: 9999;
    text-align: center;
}

    #blazor-error-ui .reload {
        -webkit-text-decoration: none;
        text-decoration: none;
    }

        #blazor-error-ui .reload:hover {
            -webkit-text-decoration: underline;
            text-decoration: underline;
            color: var(--mud-palette-grey);
        }

    #blazor-error-ui .dismiss {
        font-size: 2rem;
    }

        #blazor-error-ui .dismiss:hover {
            color: var(--mud-palette-grey-light);
        }


    #blazor-error-ui p {
        font-size: 2em;
        width: 400px;
        padding: 25px;
        border-radius: var(--mud-default-borderradius);
        color: var(--mud-palette-text-primary);
        background-color: var(--mud-palette-background);
        border-color: var(--mud-palette-lines-default);
        border-width: 3px;
        border-style: solid;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        animation: mud-animation-fadein ease .15s;
        -webkit-animation: mud-animation-fadein ease .15s;
        -moz-animation: mud-animation-fadein ease .15s;
        -o-animation: mud-animation-fadein ease .15s;
    }

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

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

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

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

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.user-menu-popover {
    left: unset !important;
    right: 20px;
}

/* Dark mode */
.dark-mode img[src*="tgl-logo"] {
    filter: brightness(100);
}

/*
    ELLIPSIS
*/

/* Two lines ellipsis fallback unsupported browsers */
.two-lines-ellipsis {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Two lines ellipsis */
@supports (-webkit-line-clamp: 2) {
    .two-lines-ellipsis {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: initial;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}

/* Three lines ellipsis fallback unsupported browsers */
.three-lines-ellipsis {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Three lines ellipsis */
@supports (-webkit-line-clamp: 2) {
    .three-lines-ellipsis {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: initial;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }
}


/*
    COMPONENTS
*/

.clickable-attachment:hover {
    background-color: var(--mud-palette-action-default-hover);
}

.disabled-clickable-attachment {
    color: var(--mud-palette-action-disabled) !important
}


/* YouTube loader in dashboard's media slides */
.content-ratio-custom {
    height: 100vh;
    max-height: calc(min(90vw, 1280px) * 9/16);
}

/* Input variant OUTLINED */
.mud-input-outlined-border,
.mud-select-input {
    -moz-border-radius: 9999px !important;
    -webkit-border-radius: 9999px !important;
    border-radius: 9999px !important;
}

.mud-input-outlined {
    background-color: var(--mud-palette-surface) !important;
    -moz-border-radius: 9999px !important;
    -webkit-border-radius: 9999px !important;
    border-radius: 9999px !important;
}

.mud-input-numeric-spin {
    margin-right: .6em;
}

/* Input variant FILLED */
.mud-input-filled {
    border-radius: 9999px !important;
    box-shadow: var(--mud-elevation-1);
    background-color: var(--mud-palette-surface) !important;
}

/* if you want to get rid of the shadow */
.no-shadow .mud-input-filled {
    box-shadow: none;
}

.mud-button-filled {
    box-shadow: var(--mud-elevation-1);
}

/*
    Sticky toolbar - has to be fixed with not hardcoded values but with the height of the appbar
*/
.sticky-tgl-toolbar {
    position: sticky;
    z-index: 97; /* The AppBar is 999 */
    top: calc(var(--mud-appbar-height) + 34px);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

@media (min-width: 600px) {
    .sticky-tgl-toolbar {
        top: calc(var(--mud-appbar-height) + 43px);
    }
}

@media (min-width: 1280px) {
    .sticky-tgl-toolbar {
        top: calc(var(--mud-appbar-height) + 1px);
    }
}


/*
    z-index with important to override the default one
*/
.z-70-important {
    z-index: 10 !important;
}

.z-80-important {
    z-index: 80 !important;
}

.z-90-important {
    z-index: 90 !important;
}

.z-100-important {
    z-index: 100 !important;
}

/*
    Width
*/
.w-40-ch {
    width: 40ch;
}

/*
    Positioning
*/

.inset-unset {
    inset: unset !important;
}

/* button's background to extend the enum MudBlazor.Color only on filled ones */
.mud-button-filled.tgl-button-background {
    background-color: var(--mud-palette-surface) !important;
}

    .mud-button-filled.tgl-button-background:hover {
        background-color: var(--mud-palette-surface) !important;
    }

/* 
    Text classes
*/
.mapboxgl-popup-tip {
    border-bottom-color: var(--mud-palette-drawer-background) !important;
    border-top-color: var(--mud-palette-drawer-background) !important;
}

.mapboxgl-popup-content {
    background: var(--mud-palette-drawer-background) !important;
    color: var(--mud-palette-drawer-text) !important;
}

    .mapboxgl-popup-content a {
        color: var(--mud-palette-primary) !important;
    }

.break-word-all {
    word-break: break-all !important;
}

/*
    Table classes
*/

/* This class is used to truncate text in table cells (apply directly to the <td>). When resizing, the table cells will not shrink below this width (due the white-space property). */
.cell-ellipsis {
    max-width: 40ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
