﻿/* Loader */

@keyframes fade {
    30% {
        opacity: 0.3;
        left: 7px;
    }

    50% {
        opacity: 0.5;
        left: 6px;
    }

    70% {
        opacity: 0.1;
        left: 4px;
    }

    90% {
        opacity: 0.4;
        left: 2px;
    }
}

.mud-overlay-scrim {
    height: 100vh !important;
}

@keyframes bg {
    from {
        background-position-x: 0px;
    }

    to {
        background-position-x: -400px;
    }
}

@keyframes updown {
    50% {
        transform: translateY(-20%);
    }

    70% {
        transform: translateY(-10%);
    }
}

@keyframes updown-half {
    50% {
        transform: translateY(-10%);
    }

    70% {
        transform: translateY(-5%);
    }
}

@keyframes spin {
    50% {
        top: 76px;
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes container {
    30% {
        transform: rotate(1deg);
    }

    50% {
        top: 11px;
    }

    70% {
        top: 10px;
        transform: rotate(-1deg);
    }
}

.loader {
    height: 100vh;
    width: 100vw;
    position: absolute;
    left: 0;
    top: 0;
    margin: auto;
}

/* Background animation for the loader */
.bg {
    animation: slide 3s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, #e0f7fa 50%, #80deea 50%); /* Light blue gradient */
    bottom: 0;
    left: -50%;
    opacity: .5;
    position: fixed;
    right: -50%;
    top: 0;
    z-index: -1;
}

.bg2 {
    animation-direction: alternate-reverse;
    animation-duration: 8s;
    background-image: linear-gradient(-60deg, #c8e6c9 50%, #a5d6a7 50%); /* Green gradient */
}

.bg3 {
    animation-duration: 10s;
    background-image: linear-gradient(-60deg, #fff3e0 50%, #ffe0b2 50%); /* Orange gradient */
}

/* Content styling */
.content {
    background-color: rgba(255, 255, 255, .9); /* Slightly opaque white */
    border-radius: .5em;
    box-shadow: 0 0 .5em rgba(0, 0, 0, .2);
    box-sizing: border-box;
    left: 50%;
    padding: 10vmin;
    position: fixed;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%);
    /*font-family: 'Arial', sans-serif;*/
}

h1 {
    color: #2e7d32; /* Dark green for the title */
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Progress bar styling */
.linear-progress {
    background: #e0e0e0; /* Light gray background */
    width: 20vw;
    margin: 20px auto;
    height: 1rem;
    border-radius: 10rem;
    overflow: hidden;
    position: relative;
}

    .linear-progress:after {
        content: '';
        position: absolute;
        inset: 0;
        background: #388e3c; /* Green progress bar */
        scale: var(--blazor-load-percentage, 0%) 100%;
        transform-origin: left top;
        transition: scale ease-out 0.5s;
    }

.linear-progress-text {
    width: 20vw;
    margin: 10px auto;
    height: 1rem;
    border-radius: 10rem;
    position: relative;
    color: #388e3c; /* Green text */
    font-weight: bold;
}

    .linear-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading Expenses...");
    }

/* Keyframes for sliding animation */
@keyframes slide {
    0% {
        transform: translateX(-25%);
    }

    100% {
        transform: translateX(25%);
    }
}

.status-bar {
    background-color: #4B49AC;
}

    .status-bar button {
        padding: 0;
    }

    .status-bar .mud-toolbar-dense {
        --mud-internal-toolbar-height: 24px;
        --mud-appbar-height: 24px;
    }

/*.title-bar {
    background-color: #eee;
}
*/
/*.title-bar button {
        padding: 0;
    }*/

.title-bar .mud-toolbar-dense {
    --mud-internal-toolbar-height: 32px;
    --mud-appbar-height: 32px;
}

/* Login */

.login-container {
    height: 100vh;
    width: 100vw;
    position: absolute;
    left: 0;
    top: 0;
    margin: auto;
}

.login-content {
    background-color: white;
    border-radius: .25em;
    box-shadow: 0 0 .25em rgba(0,0,0,.25);
    box-sizing: border-box;
    top: 50%;
    left: 50%;
    padding: 5vmin;
    max-width: 400px;
    /*    max-height: 75vh;*/
    min-width: 275px;
    min-height: 350px;
    position: fixed;
    text-align: center;
    transform: translate(-50%, -50%);
}

.mud-container {
    margin-top: 6vh !important;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.bar-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.bar {
    width: 10px;
    height: 50px;
    /*background: linear-gradient(45deg, rgba(11, 148, 33, 1), rgb(156 239 169));*/
    background: linear-gradient(to right, #177FCB, #82cbff);
    border-radius: 5px;
    animation: bounce 1.2s infinite ease-in-out;
}

    .bar:nth-child(1) {
        animation-delay: 0s;
    }

    .bar:nth-child(2) {
        animation-delay: 0.2s;
    }

    .bar:nth-child(3) {
        animation-delay: 0.4s;
    }

    .bar:nth-child(4) {
        animation-delay: 0.6s;
    }

    .bar:nth-child(5) {
        animation-delay: 0.8s;
    }

.loading-text {
    color: black !important;
    font-size: 1.5rem;
    margin-top: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeIn 1s ease-in-out infinite;
}

/* Hide Content Initially */
#content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Animations */
@keyframes bounce {
    0%, 100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(2);
    }
}

@keyframes fadeIn {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hourglass, .hourglass:before, .hourglass:after {
    animation-duration: 4s;
    animation-iteration-count: infinite;
}

.hourglass {
    --polygonH: polygon(0% 0%,100% 0%,100% 5.55%,95% 5.55%,95% 28%,60% 46%,60% 54%,95% 72%,95% 94.45%,100% 94.45%,100% 100%,0% 100%,0% 94.45%,5% 94.45%,5% 72%,40% 54%,40% 46%,5% 28%,5% 5.55%,0% 5.55%);
    animation-name: flip;
    animation-timing-function: ease-in-out;
    background-image: linear-gradient(var(--primary) 0.5em,#737a8c55 0.5em 8.5em,var(--primary) 8.5em);
    clip-path: var(--polygonH);
    -webkit-clip-path: var(--polygonH);
    overflow: hidden;
    position: relative;
    width: 5em;
    height: 9em;
    z-index: 0;
}

    .hourglass:before, .hourglass:after {
        animation-timing-function: linear;
        content: "";
        display: block;
        position: absolute;
    }

    .hourglass:before {
        --polygonB1: polygon(0% 0%,100% 0%,100% 24%,50% 47%,50% 47%,50% 47%,50% 47%,50% 47%,50% 47%,50% 47%,50% 47%,0% 24%);
        --polygonB2: polygon(0% 4%,100% 4%,100% 24%,55% 45%,55% 100%,55% 100%,55% 100%,45% 100%,45% 100%,45% 100%,45% 45%,0% 24%);
        --polygonB3: polygon(0% 24%,100% 24%,100% 24%,55% 45%,55% 80%,100% 100%,100% 100%,0% 100%,0% 100%,45% 80%,45% 45%,0% 24%);
        --polygonB4: polygon(45% 45%,55% 45%,55% 45%,55% 45%,55% 58%,100% 76%,100% 100%,0% 100%,0% 76%,45% 58%,45% 45%,45% 45%);
        --polygonB5: polygon(50% 53%,50% 53%,50% 53%,50% 53%,50% 53%,100% 76%,100% 100%,0% 100%,0% 76%,50% 53%,50% 53%,50% 53%);
        animation-name: fill;
        background-color: var(--fg);
        background-size: 100% 3.6em;
        clip-path: var(--polygonB1);
        -webkit-clip-path: var(--polygonB1);
        top: 0.5em;
        left: 0.5em;
        width: 4em;
        height: 8em;
        z-index: 1;
    }

    .hourglass:after {
        animation-name: glare;
        background: linear-gradient(90deg,#0000 0.5em,#0003 0.5em 1.5em,#0000 1.5em 3.5em,#fff3 3.5em 4.5em,#fff0 4.5em 6.5em,#0003 6.5em 7.5em,#0000 7.5em) 0 0 / 100% 0.5em, linear-gradient(90deg,#0000 0.75em,#0003 0.75em 1.25em,#0000 1.25em 3.75em,#fff3 3.75em 4.25em,#fff0 4.25em 6.75em,#0003 6.75em 7.25em,#0000 7.25em) 0 0.5em / 100% 8em, linear-gradient(90deg,#0000 0.5em,#0003 0.5em 1.5em,#0000 1.5em 3.5em,#fff3 3.5em 4.5em,#fff0 4.5em 6.5em,#0003 6.5em 7.5em,#0000 7.5em) 0 100% / 100% 0.5em;
        background-repeat: repeat-x;
        top: 0;
        left: -3em;
        width: 200%;
        height: 100%;
        z-index: 2;
    }
/* Animations */
@keyframes fill {
    from {
        clip-path: var(--polygonB1);
        -webkit-clip-path: var(--polygonB1);
    }

    10% {
        clip-path: var(--polygonB2);
        -webkit-clip-path: var(--polygonB2);
    }

    45% {
        clip-path: var(--polygonB3);
        -webkit-clip-path: var(--polygonB3);
    }

    80% {
        clip-path: var(--polygonB4);
        -webkit-clip-path: var(--polygonB4);
    }

    85%, to {
        clip-path: var(--polygonB5);
        -webkit-clip-path: var(--polygonB5);
    }
}

@keyframes glare {
    from, 90% {
        transform: translateX(0);
    }

    to {
        transform: translateX(3em);
    }
}

@keyframes flip {
    from, 90% {
        transform: rotate(0);
    }

    to {
        transform: rotate(180deg);
    }
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17181c;
        --fg: #c7cad1;
    }
}

.my-confirm-button {
    background-color: #177FCB !important;
    color: white !important;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-left: 1rem;
}

.my-cancel-button {
    background-color: #dc3545 !important;
    color: white !important;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

.swal2-dark {
    background-color: #121212 !important;
    color: #ffffff !important;
}

    .swal2-dark .swal2-title,
    .swal2-dark .swal2-html-container {
        color: #ffffff !important;
    }

    .swal2-dark .swal2-confirm,
    .swal2-dark .swal2-cancel {
        background-color: #333 !important;
        color: #fff !important;
        border: 1px solid #555 !important;
    }
