﻿/* 1. 控制blazor-error-ui的显示/隐藏（核心） */
#blazor-error-ui {
    background: #f8d7da;
    color: #721c24;
    border-top: 1px solid #f5c6cb;
    bottom: 0;
    display: none; /* 平时隐藏 */
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
}

    #blazor-error-ui.show {
        display: block; /* 异常时显示 */
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        float: right;
        font-size: 1.2rem;
        margin-left: 1rem;
    }

    #blazor-error-ui .reload {
        color: #721c24;
        text-decoration: underline;
        margin-left: 1rem;
    }

/* 2. 你原有的布局样式 */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row a, .top-row .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

        .top-row a:hover, .top-row .btn-link:hover {
            text-decoration: underline;
        }

        .top-row a:first-child {
            overflow: hidden;
            text-overflow: ellipsis;
        }

@media (min-width: 768px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    #mobile-footer-fixed {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        display: none;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }

    main {
        padding-bottom: 70px;
    }

    .desktop-only {
        display: none;
    }
}
