/* Grid-specific styles that Tailwind can't handle inline */

.grid-wrapper {
  overflow: auto;
  max-height: calc(100vh - 160px);
  outline: none;
}

.eval-table {
  border-collapse: separate;
  border-spacing: 0;
}

.eval-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
}

.eval-table tbody td:first-child,
.eval-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
}
.eval-table thead th:first-child {
  z-index: 30;
}

.student-name-rotated {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  max-height: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  line-height: 1;
}

/* Evaluation cell */
.eval-cell {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.1s;
  user-select: none;
}
.eval-cell:hover { transform: scale(1.15); }

.eval-cell.explicit { color: white; }
.eval-cell.explicit.val-1 { background: #ef4444; }
.eval-cell.explicit.val-2 { background: #f59e0b; }
.eval-cell.explicit.val-3 { background: #22c55e; }
.eval-cell.explicit.val-4 { background: #3b82f6; }

.eval-cell.inherited { opacity: 0.35; }
.eval-cell.inherited.val-1 { background: #fecaca; color: #991b1b; }
.eval-cell.inherited.val-2 { background: #fef3c7; color: #92400e; }
.eval-cell.inherited.val-3 { background: #dcfce7; color: #166534; }
.eval-cell.inherited.val-4 { background: #dbeafe; color: #1e40af; }

.eval-cell.empty {
  background: #f3f4f6;
  color: #d1d5db;
  cursor: pointer;
}

/* Cell focus highlight */
td.cell-focused {
  outline: 2px solid #4f46e5;
  outline-offset: -2px;
  z-index: 5;
  position: relative;
}

/* Score picker */
.score-picker {
  position: absolute;
  z-index: 50;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.score-picker button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  font-size: 0.9rem;
  transition: transform 0.1s;
}
.score-picker button:hover { transform: scale(1.15); }
.score-picker button[data-val="1"] { background: #ef4444; }
.score-picker button[data-val="2"] { background: #f59e0b; }
.score-picker button[data-val="3"] { background: #22c55e; }
.score-picker button[data-val="4"] { background: #3b82f6; }
.score-picker button[data-val="clear"] { background: #9ca3af; font-size: 0.7rem; }

/* Month separator */
.month-row td {
  background: #1e293b !important;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 12px !important;
}

/* Project badge */
.project-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
}
.project-badge:hover { opacity: 0.8; }

/* Diary icon */
.diary-icon {
  cursor: pointer;
  font-size: 0.8rem;
  transition: opacity 0.15s;
}
.diary-icon.no-diary {
  opacity: 0.45;
  filter: grayscale(1);
}
.diary-icon:hover {
  opacity: 1 !important;
  filter: none !important;
}

/* Per-session comment indicator */
.comment-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b5cf6;
  position: absolute;
  top: 1px;
  right: 1px;
}

/* General comment indicator on student header */
.general-comment-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  position: absolute;
  bottom: 3px;
  right: 3px;
}

/* Empty week row */
.no-session-row td {
  background: #f9fafb;
  color: #9ca3af;
  font-style: italic;
}

/* Inline session input */
.inline-session-input {
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.75rem;
  outline: none;
  width: 130px;
  background: white;
}
.inline-session-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}
