﻿@import url('./loader.css');
@import url('style.css');


html, body {
    display: flex;
    flex-direction: column;
}

body {
    flex-grow: 1;
}

#app {
    flex-grow: 1;
    min-height: calc(100dvh);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.svapp-layout {
    /*background: var(--gradient-background);*/
    min-height: calc(100dvh);
    display: flex;
    flex-direction: column;
}

    .svapp-layout .svapp-mud-app-bar {
        height: 64px;
    }

    .svapp-layout .svapp-maincontent {
        padding-top: 64px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
    }

/* Admin left menu must PUSH the page content aside, not cover it, so the menu and the page can
   be read at the same time.

   MudBlazor's own mechanism would tag .mud-layout with mud-drawer-open-<variant>-<pos> and let
   .mud-main-content pick up a matching margin-left — but .mud-layout is rendered by the
   statically-rendered MainLayout, which never re-renders when the drawer (living inside TopMenu's
   own InteractiveWebAssembly island) opens. So the container class is never applied and the
   drawer just overlays. Drive the shift off the drawer's own mud-drawer--open class, which IS
   updated inside the island. The drawer only exists for system admins, so public pages are
   unaffected. */
body:has(.mud-drawer--open) .mud-main-content {
    margin-left: var(--mud-drawer-width-left, 240px);
    transition: margin 225ms cubic-bezier(0, 0, 0.2, 1) 0ms;
}

#blazor-error-ui {
    background: var(--error-bg);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.centered-text {
    position: fixed;
    top: calc(50% - 7rem);
    left: 50%;
    transform: translate(-50%, -50%);
}

    .centered-text h1 {
        font-size: 2.5rem;
        text-align: center;
        margin: 5px;
    }

    .centered-text h2 {
        font-size: 1.8rem;
        text-align: center;
    }

    .centered-text .spinner-box {
        margin-top: 2rem;
        display: flex;
        width: 100%;
        justify-content: center;
    }


.centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.no-link-style:link {
    background-color: transparent;
    text-decoration: none;
    color: unset;
}

.no-link-style:visited {
    background-color: transparent;
    text-decoration: none;
    color: unset;
}

.no-link-style:hover {
    background-color: transparent;
    text-decoration: underline;
    color: unset;
}

.no-link-style:active {
    background-color: transparent;
    text-decoration: underline;
    color: unset;
}


@media (max-width: 960px) {
    .mud-popover.user-dropdown-popover {
        min-width: min(90vw, 320px);
    }

    .centered-text h1 {
        font-size: 2rem;
    }

    .centered-text h2 {
        font-size: 1.2rem;
    }
}


@media print {
    @page {
        margin: 0;
        margin-right: 0;
        margin-bottom: 0;
    }

    .mud-main-content {
        padding-top: 0;
    }

    .no-media-print {
        display: none !important;
    }
}
