/* 課後小評估 —— 只管这一页的样式，答题端的 quiz.css 不受影响。 */

.eval-card {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* --- 量表的一行 --- */
.eval-row {
    border: 0;
    padding: 0;
    margin: 0 0 1.1rem;
}

.eval-row:last-child { margin-bottom: 0; }

.eval-row-q {
    float: none;                       /* 覆盖 legend 的默认行为 */
    width: auto;
    font-size: .95rem;
    line-height: 1.45;
    margin-bottom: .5rem;
}

/* 五个圆点。手机上一行放得下，指头点得着（44px 是 iOS 的最小建议值）。 */
.eval-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .4rem;
}

.eval-dot input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.eval-dot {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.eval-dot > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
    background: var(--bs-tertiary-bg);
    border: 2px solid transparent;
    border-radius: .6rem;
    transition: background-color .12s, color .12s, border-color .12s;
}

.eval-dot input:checked + span {
    color: #fff;
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

.eval-dot input:focus-visible + span {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .2);
}

/* 两端的说明：1 是最不符合，5 是最符合。只在第一次看时有用，所以做得很淡。 */
.eval-scale-ends {
    display: flex;
    justify-content: space-between;
    margin-top: .3rem;
    font-size: .75rem;
    color: var(--bs-secondary-color);
}

/* --- 多选 --- */
.eval-check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .5rem .1rem;
    margin: 0;
    font-size: .95rem;
    line-height: 1.45;
    cursor: pointer;
}

.eval-check + .eval-check { border-top: 1px solid var(--bs-border-color-translucent); }

.eval-check .form-check-input {
    flex: 0 0 auto;
    margin-top: .15rem;
    width: 1.15rem;
    height: 1.15rem;
}

/* --- 致谢页 --- */
.eval-done-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
    color: #fff;
    background: var(--bs-success);
    border-radius: 50%;
}

/* --- 后台看结果 --- */
.eval-bar {
    height: .5rem;
    border-radius: .25rem;
    background: var(--bs-tertiary-bg);
    overflow: hidden;
}

.eval-bar > i {
    display: block;
    height: 100%;
    background: var(--bs-primary);
}

/* 1–5 各档的人数：五根小柱子，一眼看出是集中还是两极 */
.eval-dist {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    width: 6rem;
}

.eval-dist > span {
    position: relative;
    height: 1.6rem;
    background: var(--bs-tertiary-bg);
    border-radius: 2px;
}

.eval-dist > span > i {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    background: var(--bs-primary);
    border-radius: 2px;
}

.eval-quote {
    border-left: 3px solid var(--bs-border-color);
    padding: .1rem 0 .1rem .75rem;
    margin: 0 0 .75rem;
    white-space: pre-wrap;
}

/* ---- 明细表 ---- */

/* 13 道量表题挤在一行，列窄一点才放得下；整张表靠外层 table-responsive 横向滚动。 */
.eval-table .eval-th-score {
    width: 2.1rem;
    padding-inline: .15rem;
    font-size: .7rem;
    font-weight: 600;
    text-align: center;
    color: var(--bs-secondary-color);
    cursor: help;                       /* 鼠标停上去有完整题目 */
}

.eval-table .eval-td-score {
    padding-inline: .15rem;
    text-align: center;
}

/* 分数用颜色深浅表示高低，扫一眼就能看出哪一份整体偏低 */
.eval-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    font-size: .75rem;
    font-weight: 600;
    border-radius: .3rem;
    color: #fff;
}

.eval-score.s5 { background: #16a34a; }
.eval-score.s4 { background: #65a30d; }
.eval-score.s3 { background: #ca8a04; }
.eval-score.s2 { background: #ea580c; }
.eval-score.s1 { background: #dc2626; }

/* 文字回答在表里只给一行，想看全文点开那一行 */
.eval-table .eval-th-text { min-width: 9rem; cursor: help; }

.eval-table .eval-td-text {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .85rem;
}

.eval-table tr.eval-row-main { cursor: pointer; }

.eval-table tr.eval-row-main.expanded { background: var(--bs-tertiary-bg); }

.eval-table tr.eval-row-main.expanded .eval-expand svg { transform: rotate(180deg); }

.eval-table .eval-expand svg { transition: transform .15s; }

.eval-table tr.eval-row-detail > td {
    background: var(--bs-tertiary-bg);
    border-top: 0;
}
