@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
h1:focus {
    outline: none;
}
#blazor-error-ui {
    background: lightyellow;
    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;
}

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

:root {
    font-size: var(--rz-root-font-size);
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

    a:hover,
    a:focus {
        color: var(--rz-link-hover-color);
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzI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at 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.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");
    }
.text-read-only {
    color: #6f6f6f;
    background-color: #f5f5f5;
}

/* Diagonal crosshatch pattern for filler fields - based on TextSmallPlainTemplate XAML */
.filler-background {
    background-color: #ffffff;
    background-image: linear-gradient(45deg, #cccccc 1px, transparent 1px), linear-gradient(-45deg, #cccccc 1px, transparent 1px);
    background-size: 10px 10px;
    background-position: 0 0;
}

/* Alternative implementation using repeating gradients for better browser compatibility */
.filler-background-alt {
    background-color: #ffffff;
    background-image: repeating-linear-gradient( 45deg, transparent, transparent 6px, #cccccc 6px, #cccccc 7px ), repeating-linear-gradient( -45deg, transparent, transparent 6px, #cccccc 6px, #cccccc 7px );
}

/* Qst Warnings and Errors panel (WPF ViewDebug parity) */
.qst-error-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.85rem;
    margin: 0.25rem 0 1rem 0;
}

/* Qst per-value "Show Previous" overlay: visible text under the value control
   (accessible replacement for WPF's tooltip + red-border scheme), in the theme
   Info color. */
.qst-prev-response {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--rz-info, #199de0);
    margin-top: 0.15rem;
}

/* Qst question navigator drawer (slides over the sidebar).
   Uses only Radzen theme variables so it follows the active palette,
   light/dark appearance and WCAG high-contrast themes. */
.qst-nav-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1049;
}

.qst-nav-drawer {
    position: fixed;
    top: 0;
    left: -30rem;
    width: 26rem;
    max-width: 90vw;
    height: 100vh;
    background-color: var(--rz-body-background-color, #fff);
    color: var(--rz-text-color);
    box-shadow: var(--rz-shadow-6, 0 5px 20px rgba(0,0,0,.3));
    transition: left 0.25s ease-in-out;
    z-index: 1050;
    overflow: hidden;
}

.qst-nav-drawer.qst-nav-open {
    left: 0;
}

.qst-nav-tree {
    flex: 1 1 auto;
    overflow-y: auto;
    border-top: 1px solid var(--rz-base, #ddd);
    padding-top: 0.5rem;
    min-height: 0;
}

.qst-nav-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.25rem;
    border-radius: var(--rz-border-radius, 4px);
    cursor: pointer;
}

.qst-nav-row:hover {
    background-color: var(--rz-base-200, #eee);
}

.qst-nav-form-row {
    font-weight: 600;
}

.qst-nav-expander {
    display: inline-flex;
    cursor: pointer;
    flex: 0 0 auto;
}

.qst-nav-caption {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qst-nav-children {
    margin-left: 1rem;
    border-left: 1px solid var(--rz-base, #ddd);
    padding-left: 0.25rem;
}

/* WPF yellow search-highlight parity: translucent so the theme's own text
   color (incl. WCAG palettes) keeps providing the contrast. */
.qst-nav-highlight {
    background-color: rgba(255, 235, 59, 0.4);
    color: inherit;
}

/* WPF red missing-answer node parity */
.qst-nav-missing {
    color: var(--rz-danger, #d32f2f);
    font-weight: 600;
}

/* Sidebar "Find question" trigger styled like a search input */
.qst-find-trigger {
    width: 100%;
    justify-content: flex-start;
    border: 1px solid var(--rz-base, #ccc);
    background-color: var(--rz-body-background-color, #fff);
    color: var(--rz-text-secondary-color, #666);
}

.qst-find-trigger:hover {
    border-color: var(--rz-primary, #512dae);
    color: var(--rz-text-color);
}

.qst-find-trigger:focus-visible {
    outline: 2px solid var(--rz-primary, #512dae);
    outline-offset: 1px;
}

/* Scroll-target flash (WPF scroll-to parity): translucent so it works on
   light and dark backgrounds alike. */
.qst-flash {
    animation: qst-flash-fade 2s ease-out;
}

@keyframes qst-flash-fade {
    0% { background-color: rgba(255, 235, 59, 0.35); box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.6); }
    100% { background-color: transparent; box-shadow: none; }
}

/* Respect the user's reduced-motion preference (WCAG 2.3.3):
   no slide transition, and a static (non-animated) flash cue. */
@media (prefers-reduced-motion: reduce) {
    .qst-nav-drawer {
        transition: none;
    }

    .qst-flash {
        animation: none;
        background-color: rgba(255, 235, 59, 0.25);
    }
    /* Radzen renders side-dialog overlays after regular dialog overlays, so a modal opened on top of a side dialog would sit behind it at equal z-index. Media enlarge dialogs opened from a side dialog opt into this class to stack above. */
    .rz-dialog-wrapper.rz-media-enlarge-overlay {
        z-index: 1002;
    }
}
