:root {
    --shell-error: #B84E68;
    --shell-error-soft: #F9E8EC;
}

html[data-theme="dark"] {
    --shell-error: #DB8295;
    --shell-error-soft: #351F29;
}

#blazor-error-ui {
    background: var(--shell-surface);
    border: 1px solid var(--shell-border);
    border-left: 4px solid var(--shell-error);
    border-radius: 6px;
    bottom: 1.25rem;
    box-shadow: 0 12px 32px rgba(36, 24, 45, 0.16);
    box-sizing: border-box;
    display: none;
    left: auto;
    max-width: calc(100vw - 2rem);
    padding: 1rem 3rem 1rem 1rem;
    position: fixed;
    right: 1.25rem;
    width: 32rem;
    z-index: 2000;
}

#blazor-error-ui .app-error__body {
    align-items: center;
    display: flex;
    gap: 0.875rem;
}

#blazor-error-ui .app-error__icon {
    align-items: center;
    background: var(--shell-error-soft);
    border-radius: 50%;
    color: var(--shell-error);
    display: flex;
    flex: 0 0 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
}

#blazor-error-ui .app-error__copy {
    display: grid;
    flex: 1 1 auto;
    gap: 0.125rem;
    min-width: 0;
}

#blazor-error-ui .app-error__copy strong {
    color: var(--shell-text);
    font-size: 0.9375rem;
    font-weight: 700;
}

#blazor-error-ui .app-error__copy span {
    color: var(--shell-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

#blazor-error-ui .reload {
    background: var(--shell-primary);
    border-radius: 5px;
    color: #FFFFFF;
    flex: 0 0 auto;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    text-decoration: none;
}

html[data-theme="dark"] #blazor-error-ui .reload {
    color: #211329;
}

#blazor-error-ui .reload:hover {
    background: var(--shell-primary-dark);
}

#blazor-error-ui .dismiss {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--shell-muted);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 1.4rem;
    height: 2rem;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    width: 2rem;
}

#blazor-error-ui .dismiss:hover {
    color: var(--shell-text);
}

.blazor-error-boundary {
    background: var(--shell-error-soft);
    border: 1px solid var(--shell-error);
    border-radius: 6px;
    color: var(--shell-text);
    padding: 1rem;
}

.blazor-error-boundary::before {
    color: var(--shell-error);
    content: "!";
    font-weight: 700;
    margin-right: 0.625rem;
}

.blazor-error-boundary::after {
    content: "Something went wrong while showing this page.";
}

@media (max-width: 600px) {
    #blazor-error-ui {
        bottom: 0.75rem;
        left: 0.75rem;
        max-width: none;
        right: 0.75rem;
        width: auto;
    }

    #blazor-error-ui .app-error__body {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    #blazor-error-ui .reload {
        margin-left: 2.875rem;
    }
}