﻿/* ===============================
   Global / Reset
   =============================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: "Segoe UI", SegoeUI, "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #fff;
}

body {
    display: table;
}

/* ===============================
   Background Branding
   =============================== */

#background_branding_container {
    background-color: #471224;
    width: 100%;
    height: 100%;
    position: fixed;
    inset: 0;
    z-index: 0;
}

img[data-tenant-branding-background="true"] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

/* ===============================
   App Root 
   =============================== */

#app {
    display: table;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* ===============================
   Centered Auth Container
   =============================== */

.container-auth {
    display: table;
    width: 100%;
    height: 100vh;
    padding: 0;
    text-align: center;
}

.row-auth {
    display: table-cell;
    vertical-align: middle;
    width: 100%;
    margin: 0;
}

.col-auth {
    max-width: 470px;
    width: 100%;
    margin: 0 auto;
    display: inline-block;
    vertical-align: middle;
}

/* ===============================
   Panel (Azure B2C style)
   =============================== */

.panel {
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 5;
    position: relative;
}

.panel-body {
    padding: 40px 30px;
    max-width: 380px;
    margin: 0 auto;
}

/* ===============================
   Company Logo
   =============================== */

.companyLogo {
    display: block;
    height: 60px;
    width: auto;
    margin: 0 auto 40px auto;
}

/* ===============================
   Loading State
   =============================== */

.loading {
    background: var(--header-background);
    /* color: var(--mud-palette-primary-text); */  
    height: 100vh;
    width: 100%;
    display: table;
    justify-content: center;
}


/* Spinner container */
.loading-circle {
    position: relative;
    width: 8rem;
    height: 8rem;
    display: grid;
    place-items: center;
    margin: auto;
}

/* SVG ring */
.loading-progress {
    width: 100%;
    height: 100%;
    display: block;
}

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

        /* Progress ring driven by Blazor */
        .loading-progress circle:last-child {
            stroke: #296ec6; /* B2C blue */
            stroke-dasharray: calc( 3.141 * var(--blazor-load-percentage, 0%) * 0.8 ), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

/* Progress text */
.loading-progress-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 600;
    color: #555;
    pointer-events: none;
}

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

/* ===============================
   Blazor Error UI
   =============================== */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 12px 16px;
    position: fixed;
    right: 0;
    text-align: center;
    width: 100%;
    z-index: 1000;
}

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

a.reload {
    background-color: #555;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    padding: 6px 12px;
    text-decoration: none;
}

    a.reload:hover {
        background-color: #333;
    }

/* ===============================
   Responsive (match B2C behavior)
   =============================== */

@media screen and (max-width: 600px) {
    #background_branding_container {
        display: none;
    }

    .container-auth {
        background-color: #fff;
    }

    .panel {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .panel-body {
        padding: 20px 15px;
    }

    .companyLogo {
        height: 50px;
        margin-bottom: 30px;
    }
}
