﻿/*Dedicated to root html styles and elements*/

html, body {
    background: var(--nx-primary-bg);
    font-family: var(--nx-font);
    color: var(--nx-primary-fg);
    margin: 0px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;

}

    body *:focus {
        border-style: none; /*Fix: Auto borders on many items for focus without cause*/
    }


    body * {
        font-size: inherit; /*bug fix: Default: Browser auto adjusting.*/
    }



/* Headings & paragraphs */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--nx-fg-highlight);
}

p {
    margin: 0 0 1rem 0;
}

.grid br,
[class*="grid"] br {
    display: block;
    content: "";
    margin-bottom: var(--nx-space-small);
}



/* Links */
a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* slight spacing between children */
}



    a:hover {
        text-decoration: underline;
    }

/* Buttons */
button, a {
    display: inline-flex;
    justify-content: center;
    box-shadow: var(--nx-box-shadow);
    background: var(--nx-tertiary-bg);
    color: var(--nx-fg);
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: var(--nx-border-radius);
    cursor: pointer;
    box-sizing: border-box;
    border-style: none;
    margin: var(--nx-margin);
    text-decoration: none;
    align-items: center;
    gap: 0.5rem;
    vertical-align: middle;
    overflow: hidden;
    width: fit-content;
}

    button:hover, a:hover {
        --nx-bg: var(--nx-bg-accent);
        text-decoration: none;
    }

    button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    button > *, a > * {
        display: inline-flex;
        align-items: center; /* vertically center inner <i> / svg */
        justify-content: center;
    }


    /*quick alternative button style for "uncommon" features */
    button.alt, a.alt {
        zoom: 0.8;
        background: inherit;
        border-style: solid;
        border-width: 1px;
        border-color: var(--nx-border-color);
    }


/* Scope paragraph/heading rules so they don't affect controls globally */
p, hr, h1, h2, h3, h4, pre {
    display: block;
    grid-column: 1 / -1;
}


table {
    width: 100%;
    border-collapse: collapse;
    grid-column: -1/1;
    overflow: auto;
    border-style:none;

}

    table tbody tr {
        border-bottom: var(--nx-border-width) solid var(--nx-border-color);
        border-radius: var(--nx-border-radius);
    }

th, td {
    padding: var(--nx-space-small);
    text-align: left;
    vertical-align: top;
}

thead th, thead td{
    background: var(--nx-tertiary-bg);
    border-radius: var(--nx-border-radius);
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}


tfoot tf, tfoot td {
    background: var(--nx-tertiary-bg);
    border-radius: var(--nx-border-radius);
    font-weight: bold;
    top: 0;
    z-index: 1;
}



/* Global scrollbar styling
   - Place in a global stylesheet (wwwroot) so rules are not scoped by Blazor CSS isolation.
   - Works in WebKit browsers (Chrome, Edge, Safari) and Firefox (partial).
   - Note: macOS overlay scrollbars and some mobile browsers ignore these rules.
*/

/* Firefox */
* {
    scrollbar-width: thin; /* auto | thin | none */
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

    /* WebKit browsers (Chrome, Edge, Safari) */
    *::-webkit-scrollbar {
        width: var(--scrollbar-width);
        height: var(--scrollbar-width);
    }

    *::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
    }

    *::-webkit-scrollbar-thumb {
        background-color: var(--scrollbar-thumb);
        border-radius: 8px;
        border: 2px solid transparent; /* adds padding around thumb */
        background-clip: padding-box;
    }

        *::-webkit-scrollbar-thumb:hover {
            background-color: var(--scrollbar-thumb-hover);
        }

    /* corner (where horizontal+vertical meet) */
    *::-webkit-scrollbar-corner {
        background: var(--scrollbar-track);
    }






@media print {

    /* Suggest zero margins and portrait A4 for printing */
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html, body {
        margin: 0 ;
        padding: 0 ;
    }


    .nx-mainmenu {
        display: none;
        visibility:hidden;
    }


}
