/* 点名模态框样式 */
.attendance-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 临时学员模态框 z-index 更高，确保显示在最前面 */
.attendance-modal.temp-student-modal {
  z-index: 1100 !important;
}

.attendance-modal .modal-content {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 1000px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

.attendance-modal .modal-header {
  background-color: #6f42c1;
  color: white;
  padding: 15px;
  border-radius: 8px 8px 0 0;
}

.attendance-modal .modal-header h3 {
  margin: 0;
}

.attendance-modal .modal-body {
  padding: 20px;
}

.attendance-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid #ddd;
}

.attendance-info {
  margin-bottom: 3px;
  padding: 2px;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

.attendance-info .info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 1;
  min-width: 0;
}

.attendance-info .info-item label {
  flex-shrink: 0;
}

.attendance-info .info-item span {
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}

.attendance-info select {
  height: 30px;
  padding: 0 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  flex-shrink: 1;
  min-width: 100px;
}

.attendance-info .teacher-select {
  width: 100px;
  min-width: 80px;
}

.attendance-info .schedule-select {
  width: 180px;
  min-width: 140px;
}

.attendance-info .add-temp-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.attendance-table {
  overflow-x: auto;
  width: 100%;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* 自定义滚动条样式 */
.attendance-table::-webkit-scrollbar {
  width: 8px;
}

.attendance-table::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.attendance-table::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.attendance-table::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.attendance-table table {
  width: 100%;
}

.attendance-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 2px solid #ddd;
}

.attendance-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #ddd;
}

.attendance-table tbody tr {
  height: 36px;
  vertical-align: middle;
}

.attendance-table th:nth-child(1) {
  width: 60px;
}

.attendance-table th:nth-child(2) {
  width: 120px;
}

.attendance-table th:nth-child(3) {
  width: 100px;
}

.attendance-table th:nth-child(4) {
  width: 100px;
}

.attendance-table th:nth-child(5) {
  flex: 1;
  min-width: 200px;
}

.attendance-table th:nth-child(6) {
  width: 100px;
}

.attendance-table th:nth-child(7) {
  width: 100px;
}

.status-options {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
}

.status-options label {
  white-space: nowrap;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.attendance-hours {
  width: 60px;
  height: 24px;
  padding: 2px 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.remove-single {
  padding: 2px 8px;
  font-size: 12px;
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
}

.submit-btn {
  background-color: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

/* 临时学员模态框 */
.temp-student-modal .modal-content {
  width: 800px;
  max-width: 90vw;
  max-height: 70vh;
  overflow-y: hidden;
}

.temp-student-modal #eligible-students-content {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.temp-student-modal #eligible-students-content table {
  width: 100%;
  border-collapse: collapse;
}

.temp-student-modal #eligible-students-content th,
.temp-student-modal #eligible-students-content td {
  padding: 8px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #ddd;
}

.temp-student-modal #eligible-students-content th {
  background-color: #f8f9fa;
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

.temp-student-modal #eligible-students-content th:nth-child(1) {
  width: 60px;
}

.temp-student-modal #eligible-students-content th:nth-child(2) {
  width: 100px;
}

.temp-student-modal #eligible-students-content th:nth-child(3) {
  width: 130px;
}

.temp-student-modal #eligible-students-content th:nth-child(4) {
  width: 150px;
}

.temp-student-modal #eligible-students-content th:nth-child(5) {
  width: 80px;
}

.temp-student-modal .form-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.attendance-modal .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.attendance-modal .form-group label {
  font-weight: 500;
}

.attendance-modal .form-group input,
.attendance-modal .form-group select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.attendance-modal .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}