* {
  box-sizing: border-box;
}

button {
  font-family: inherit;
}

.class-view, .detail-view {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fafafa;
  font-family: 'Microsoft Yahei', sans-serif;
  font-size: 14px;
  color: #525252;
}

.class-title {
  margin: 25px 0 5px;
  word-wrap: break-word;
  padding-left: 1rem;
}

.class-title > :first-child {
  margin-top: 0;
  font-size: 1.2em;
}

.class-title > :last-child {
  margin-bottom: 0;
}

.student-list {
  flex: 1 1 0%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  overflow: auto;
}

.class-view .student-list {
  padding-left: 2rem;
}

.detail-view .student-list {
  align-items: center;
  /* 如果有 3 个以上条目，可能出现折行+滚动条，而此时 align-content: center|space-around 会造成 chrome 和 firefox 滚动条出错，
   顶部的内容被隐藏。flex-start 和 space-between 正常*/
  align-content: flex-start;
  justify-content: center;
  margin-left: 0;
}

/* .detail-view .student-list.many {
  align-content: space-between;
} */

.student-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.student-screen > img {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.student-screen > div {
  position: absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.student-screen .masked-dark {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
}

.student-screen .masked-light {
  background-color: #f0f0f0;
  color: #666666;
}

.student-screen .student-info {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 0.5em 1em;
}

.student-screen-status {
  margin: auto auto;
  font-size: 1rem;
  white-space: pre-wrap;
  text-align: center;
}

.student-summary {
  display: flex;
  flex-direction: column;
  margin: 10px;
  border: 1px solid #ccc;
}
.student-summary .student-screen {
  width: 230px;
  height: 143.75px;
}
.student-summary-tool-bar {
  display: flex;
  align-items: center;
  border-top: 1px solid #ccc;
}
.student-summary-tool-bar > div {
  flex: 1 1 0;
}
.student-summary-tool-bar > * {
  margin: 0.25em 1em;
}

/*
.student-detail {
  border: 1px solid #ccc;
}
*/

/*.student-list.single .student-detail {
  width: min(calc(100% - 120px), 250px);
  width: calc(100% - 120px);
}*/

.student-detail .student-screen {
  height: 100%;
}

.tool-bar {
  height: 70px;
  /* border-top: 1px solid #ccc; */
  padding: 0 1rem;
}

.tool-bar button {
  font-size: 1.2em;
  height: 1.8em;
  line-height: 1.8em;
  padding: 0 1em;
  min-width: 180px;
  border-radius: 0.9em;
  color: white;
  background-color: darkorange;
  margin: 0 22px;
}

.tool-bar button:disabled {
  background-color: gray;
}

.classroom-state {
  color: red;
}

/* ================================= 自定义 checkbox ================================= */
/* 参考 https://www.everythingfrontend.com/posts/custom-checkbox-in-webkit-with-css3.html */

input[type=checkbox] {
  font-size: inherit;
  position: relative;
  border: 1px solid #ccc;
  display: inline-block;
  line-height: 1.2em;
  padding: 0;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  background: transparent;
  -webkit-appearance: none;
  /* -webkit-box-shadow: 0 1px 0 rgba(255,255,255, 0.1),
                      inset 0 0 1px rgba(255,255,255, 0.4);
  -webkit-border-radius: 3px; */
}

input[type=checkbox]:active, input[type=checkbox]:checked {
  background: #27be17;
}

input[type=checkbox]:checked::after {
  position: absolute;
  content: '';
  left: 20%;
  top: 20%;
  height: 25%;
  width: 50%;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  /* -webkit-box-shadow: -1px 1px 0 #fff; */
  -webkit-transform: rotate(-45deg);
}
/* ================================= end 自定义 checkbox ================================= */