@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--body-font);
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-base-line-height);
    font-weight: var(--font-weight);
    color: var(--neutral-foreground-rest);
    background: var(--neutral-fill-layer-rest);
}

h1:focus {
    outline: none;
}

/* <FluentHeader> renders a plain <header class="header">, not a custom element — this
   has to be unscoped (here, not a component's own .razor.css) to reach it at all: Blazor
   CSS isolation only scopes a stylesheet to elements its own component renders directly,
   never into a nested child component's internal markup, no matter the selector.
   overflow-x: hidden guards against the header row (title + status/theme/auth) having no
   room to shrink below its content's minimum width once the display gets narrow enough —
   flex items default to min-width: auto, so instead of wrapping/shrinking they overflow
   the header's box past the viewport edge, which on mobile Chrome/Safari widens the whole
   page's layout viewport and zooms the entire page out to fit it. Paired with the title's
   own ellipsis + min-width: 0 in MainLayout.razor. */
@media (max-width: 900px) {
    header.header {
        position: sticky;
        top: 0;
        z-index: 1003;
        overflow-x: hidden;
    }
}

/* Shell page card layout */

.shell-card {
    padding: 1.5rem;
}

.shell-page-title {
    margin: 0;
}

.shell-page-description {
    max-width: 48rem;
}

.shell-page-actions {
    box-shadow: none;
    border: none;
    padding: 0.5rem 0;
}

/* Footer subtle links */

.footer-subtle {
    color: var(--neutral-foreground-hint);
    text-decoration: none;
}

.footer-subtle:hover {
    color: var(--neutral-foreground-rest);
    text-decoration: underline;
}

/* Alerts */

.alert {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
    margin: 10px 0;
}

.alert-danger {
    border: 1px dashed var(--error);
}

.alert-success {
    border: 1px dashed var(--success);
}

.alert-warning {
    border: 1px dashed var(--warning);
}

/* Loading progress */

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

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

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    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) 0 auto 0.2rem;
}

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

code {
    color: #c02d76;
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

table td,
table th {
    padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    text-align: left;
    vertical-align: middle;
    border-bottom: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-divider-rest);
}

/* Mobile responsive */

@media (max-width: 900px) {
    .dashboard-shell {
        flex-direction: column !important;
        row-gap: 0 !important;
    }
}
