/* CMEM Mobile — minimal overrides (MudBlazor handles most styling) */

html, body {
    font-family: 'Inter', 'Helvetica', 'Arial', sans-serif;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

/* Loading progress spinner (shown before WASM loads) */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: white;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem);
    color: white;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Blazor error UI */
#blazor-error-ui {
    background: firebrick;
    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;
    color: white;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: white;
    text-decoration: none;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Safe area insets for notched devices */
.mud-main-content {
    padding-top: env(safe-area-inset-top);
}

/* Cursor pointer for clickable cards */
.cursor-pointer {
    cursor: pointer;
}

/* Connectivity banner — sticks below app bar */
.connectivity-banner {
    position: sticky;
    top: 48px;
    z-index: 900;
}

/* Login page gradient background */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
