/* assets/css/student_selector.css */

/* Tool container */
.tool-container {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background-color: #fcfcfc;
}

/* Dice styles */
.dice-row {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1.5rem 0;
}
.dice {
  width: 70px;
  height: 70px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  transition: all 0.15s ease;
}
.dice.rolling {
  animation: shake 0.15s infinite alternate ease-in-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
@keyframes shake {
  0% { transform: rotate(-3deg) scale(0.97); }
  100% { transform: rotate(3deg) scale(1.03); }
}
.dice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
}
.dot {
  background: #2a1f18;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  max-width: 16px;
  max-height: 16px;
  place-self: center;
  box-shadow: inset 0 2px 3px rgba(0,0,0,0.3);
}
.dot.empty { 
  background: transparent; 
  box-shadow: none; 
}

/* Control panel */
.control-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem 1.5rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
}
.input-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}
.input-group input {
  width: 68px;
  padding: 0.3rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  text-align: center;
}
.file-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.file-label {
  padding: 0.3rem 1.2rem;
  background: #e8e8e8;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #ccc;
}
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.button-group button {
  padding: 0.4rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}
.btn-primary {
  background: #2a7ae2;
  color: white;
}
.btn-secondary {
  background: #828282;
  color: white;
}
.btn-info {
  background: #1756a9;
  color: white;
}
.button-group button:hover {
  opacity: 0.9;
  text-decoration: none;
}
.button-group button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Student grid with cross-out toggle */
.student-grid-wrapper {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  margin: 0.2rem 0;
  border: 1px solid #e8e8e8;
  max-height: 300px;
  overflow-y: auto;
}
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

.student-cell {
  background: #fcf7f0;
  border-radius: 2rem;
  padding: 0.3rem 0.3rem 0.3rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  border: 2px solid rgba(150, 130, 115, 0.15);
  transition: 0.08s;
  font-weight: 500;
  color: #2d211b;
  font-size: 0.9rem;
  min-height: 38px;
}

.student-cell.checked {
  background: #d6c3b2;
  border-color: #8f7a68;
}

.student-cell.crossed-out {
  opacity: 0.5;
  background: #f0e8e0;
  border-color: #ccc;
  text-decoration: line-through;
}

.student-cell.crossed-out .name-input {
  text-decoration: line-through;
  color: #999;
}

/* Cross-out toggle button - make it very visible! */
.student-cell .cross-toggle {
  cursor: pointer;
  background: none;
  border: 2px solid #ccc;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 0;
  margin: 0;
  width: 24px;
  height: 24px;
  line-height: 20px;
  text-align: center;
  color: #555;
  transition: 0.15s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.student-cell .cross-toggle:hover {
  border-color: #d32f2f;
  color: #d32f2f;
  transform: scale(1.1);
  background: #fff0f0;
}

.student-cell.crossed-out .cross-toggle {
  border-color: #d32f2f;
  color: #d32f2f;
  background: #ffebee;
}

.student-cell.crossed-out .cross-toggle:hover {
  border-color: #2a7ae2;
  color: #2a7ae2;
  background: #e3f0ff;
}

.student-cell .id-label {
  font-weight: 600;
  color: #5a4a3a;
  min-width: 24px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.student-cell .name-input {
  flex: 1;
  min-width: 50px;
  border: none;
  background: transparent;
  padding: 0.2rem 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2d211b;
  outline: none;
  border-bottom: 1px dashed transparent;
  transition: 0.08s;
}

.student-cell .name-input:focus {
  border-bottom: 1px solid #8f7a68;
  background: rgba(255,255,240,0.3);
  border-radius: 0 0 4px 4px;
}

.student-cell .name-input::placeholder {
  color: #b0a090;
  font-weight: 300;
  font-style: italic;
}

.student-cell.crossed-out .name-input {
  color: #999;
  text-decoration: line-through;
}

.student-cell input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #4a372b;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}

.student-cell.crossed-out input[type="checkbox"] {
  opacity: 0.3;
  pointer-events: none;
}

/* Status info */
.status-info {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #828282;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px dashed #e8e8e8;
  padding-top: 0.8rem;
}

.status-info .absent-count {
  color: #d32f2f;
}
.status-info .present-count {
  color: #2a7ae2;
}

