﻿html > body {
    margin: 0 auto;
}

body {
    background: #f3f3f3;
    height: 100vh;
    width: min(430px, 100%);
}

:root, body {
    background-color: #f3f3f3 !important;
}


.simple-button {
    display: inline-block;
    border: none;
    color: #333;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

    .simple-button.disabled {
        background: #f3f3f3;
        cursor: not-allowed;
    }

    .simple-button:not(.disabled):active {
        box-shadow: inset 0 -3px #999; /*add a darker shade on the bottom edge */
        background: #108dda;
    }

fluent-card {
    background: #fdfdfd;
}


/******/

.my-reconnect-modal > div {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow: hidden;
    background-color: #fff;
    opacity: 0.8;
    text-align: center;
    font-weight: bold;
}

.my-reconnect-modal a {
    color: blue;
    font-weight: bolder;
}

.components-reconnect-hide > div {
    display: none;
}

.components-reconnect-show > div {
    display: none;
}

.components-reconnect-show > .show {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
}

.components-reconnect-failed > div {
    display: none;
}

.components-reconnect-failed > .failed {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
}

.components-reconnect-rejected > div {
    display: none;
}

.components-reconnect-rejected > .rejected {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
}

#blazor-error-ui {
    display: none;
    background: #0072C6;
    color: #fff;
    left: 0;
    bottom: 0;
    width: 100%;
    /* height: 10%;*/
    position: absolute;
    z-index: 1000;
    border-radius: 10px;
}

    #blazor-error-ui div {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 1rem
    }

.reload {
    color: black;
    font-weight: bold;
    width: 80%;
    border-radius: 10px;
}

.dismiss {
    color: red;
}

.a-reset {
    text-decoration: underline;
    color: blue;
    cursor: pointer;
}

.overview-table-container {
    margin: 0 10px;
    overflow: scroll;
}

table.overview {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

    table.overview th, table.overview td {
        padding: 4px;
        text-align: left;
        border-bottom: 1px solid #e1dfdd;
    }

    table.overview th {
        background-color: #f3f2f1;
        font-weight: 600;
        color: #605e5c;
        position: sticky;
        top: 0;
        z-index: 1;
        box-shadow: inset 0 -1px 0 0 #efe8e0;
        white-space: nowrap;
    }

    table.overview > tbody > tr > td:first-child {
        width: 33%;
        word-wrap: break-word;
        word-break: break-all;
    }

    table.overview > tbody > tr > td:nth-child(2) {
        width: 10%;
        word-wrap: break-word;
        word-break: break-all;
    }

    table.overview tr:nth-child(even) {
        background-color: #efe8e0;
    }

    table.overview td > .note {
        margin-left: 23px;
        border-bottom: 1px dotted #b2a8ad;
        color: dimgray;
    }

.simple-badge {
    font-size: 12px;
    background: floralwhite;
    color: grey;
    border-radius: 4px;
}


/* 课表 */

/* .grid-item 课表课程内容格子样式 */


/* 【全局】设置课表的内容格子的背景色和字体颜色 */
.grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0; /* 使用rem单位来表示相对于根元素字体大小的内边距 */
    text-align: center;
    word-break: break-word;
    border: 1px solid #f2d3d8; /* 使用rem单位来表示相对于根元素字体大小的边框宽度 */
    border-radius: 0.2rem; /* 使用rem单位来表示相对于根元素字体大小的圆角半径 */
    box-shadow: 0 0.32rem 0.72rem #000000,0 .06rem .18rem #000000; /*fallback*/
    box-shadow: 0 0.32rem 0.72rem rgba(0,0,0,.132),0 .06rem .18rem rgba(0,0,0,.108); /* 使用rem单位来表示相对于根元素字体大小的阴影偏移量和模糊半径 */
    transition: transform .167s cubic-bezier(.1,.9,.2,1),opacity .167s cubic-bezier(.1,.9,.2,1); /* 使用固定值 */
    background: #8f3c84;
    margin: 0.05rem;
    text-wrap: balance; /* https://developer.chrome.com/blog/css-text-wrap-balance/ */
    overflow: auto; /*2023.9.24 修复当课程格子过长时 会显示错位的bug*/
}
    /*课程名*/
    .grid-item div:first-child {
        flex: 1;
        overflow: auto;
        padding: 0 .1rem;
    }

    /*点击课程格子时一个微弱的动画*/
    .grid-item:hover {
        transform: scale(1.02);
        /*opacity: 0.9;*/
    }

    /*教室*/
    .grid-item span {
        color: #ECE2F3;
        font-weight: bold;
        font-size: 90%;
        /*text-decoration: underline;*/
        /*white-space: nowrap;*/ /*教室换行*/
        word-break: break-word;
        border-top: 1px dashed var(--timetable-classroom-border-color);
    }

    /*重课：格子变透明*/
    .grid-item.overlapped {
        opacity: .5;
    }

        /*重课：格子右侧有一条虚线*/
        .grid-item .overlapped::after {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: 1;
            border-right: 2px dotted red;
        }

    .grid-item:has(.non-curricular) {
        opacity: .4;
        pointer-events: none;
    }

.non-curricular {
    padding: 0 .1rem;
}

fluent-tabs {
    padding: unset !important;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .divider::before,
    .divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: #ccc;
        margin: 0 10px;
    }

    .divider > span.dot {
        color: #ccc;
    }
