﻿/* ==========================================================================
   BASE STYLES
   ========================================================================== */

html, body {
    font-family: var(--font-primary);
}

/* ==========================================================================
   LAYOUT - APP STRUCTURE
   ========================================================================== */

app {
    position: relative;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
}

.content {
    padding-top: 1.1rem;
}

/* ==========================================================================
   LAYOUT - TOP ROW
   ========================================================================== */

.top-row {
    height: var(3.5rem);
    display: flex;
    align-items: center;
}

.main .top-row {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--header-border);
    justify-content: flex-end;
}

    .main .top-row > a, .main .top-row .btn-link {
        white-space: nowrap;
        margin-left: var(--spacing-xl);
    }

    .main .top-row a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* ==========================================================================
   LAYOUT - SIDEBAR & NAVIGATION
   ========================================================================== */

.navbar-toggler {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.fw-normal {
    font-weight: var(--font-weight-medium) !important;
}

.link-color {
    color: var(--link-color);
}

.input-label {
    margin-left: -5px;
    color: var(--medium-gray);
    font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   FORM VALIDATION
   ========================================================================== */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--error-color);
}

.validation-message {
    color: var(--error-color);
}

/* ==========================================================================
   ICONS
   ========================================================================== */

.svg-icon {
    width: 50px;
    height: 50px;
    vertical-align: text-bottom;
    stroke: currentColor;
    stroke-width: 3;
    --layer1: currentColor;
    --layer2: currentColor;
    --layer3: currentColor;
}

.svg-inline--fa.fa-w-10 {
    width: 0.625em;
}

.svg-inline--fa {
    display: inline-block;
    font-size: inherit;
    height: 1em;
    vertical-align: -0.125em;
}

/* ==========================================================================
   THIRD-PARTY COMPONENTS - RADZEN
   ========================================================================== */
.rz-p-sm-12 {
    padding: 0px !important;
}


/* ==========================================================================
   ERROR UI - BLAZOR
   ========================================================================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    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;
    }


/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 767.98px) {
    .main .top-row:not(.auth) {
        display: none;
    }

    .main .top-row.auth {
        justify-content: space-between;
    }

    .main .top-row a, .main .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 768px) {
    app {
        flex-direction: row;
    }

    .sidebar {
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-max-width);
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .main .top-row {
        position: sticky;
        top: 0;
    }

    .main > div {
        padding-left: var(--spacing-xxl) !important;
        padding-right: var(--spacing-xl) !important;
    }

    .navbar-toggler {
        display: none;
    }

    .sidebar .collapse {
        /* Never collapse the sidebar for wide screens */
        display: block;
    }

    .sidebar .navbar-brand img {
        width: 100px;
    }
}
