/********************* Student Dashboard Style *************************/

.student-dashboard {
    background: #f9fafb;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    color: #333;
}

.student-dashboard h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #111;
}

.student-dashboard h2 {
    font-size: 1.6em;
    margin-bottom: 16px;
    color: #222;
}

.student-dashboard h3 {
    font-size: 1.4em;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #444;
}

.student-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
    table-layout: fixed;
}

.student-dashboard-table th,
.student-dashboard-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
    font-size: 0.95em;
}

/* Column Widths: Task = 40%, rest = 12% */
.student-dashboard-table th:nth-child(1),
.student-dashboard-table td:nth-child(1) {
    width: 40%;
}

.student-dashboard-table th:nth-child(n+2),
.student-dashboard-table td:nth-child(n+2) {
    width: 12%;
}

.student-dashboard-table th {
    background: #f7f9fc;
    color: #333;
    font-weight: 600;
}

.student-dashboard-table tr:hover {
    background-color: #f2f7ff;
    transition: background-color 0.3s ease;
}

/* Task Link Style */
.csuk-open-assessment-modal {
    cursor: pointer;
    text-decoration: underline;
    color: #0073aa;
    transition: color 0.2s ease;
}

.csuk-open-assessment-modal:hover {
    color: #004e7a;
}

/* Score Circle Styling */
.student-dash-score {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
    color: #fff;
    font-size: 0.9em;
    background-color: #ccc;
    cursor: help;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
}

.score-red {
    background-color: #e74c3c;
}

.score-amber {
    background-color: #f39c12;
}

.score-green {
    background-color: #2ecc71;
}

.score-unknown {
    background-color: #bdc3c7;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .student-dashboard-table th,
    .student-dashboard-table td {
        font-size: 0.85em;
        padding: 10px 12px;
    }

    .student-score {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 0.8em;
    }
}

@media (max-width: 800px) {
  .student-dashboard-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .student-dashboard-table {
    width: max-content;
    min-width: 100%;
    font-size: 0.85em;
  }

  .student-dashboard-table th,
  .student-dashboard-table td {
    white-space: nowrap;
    padding: 10px 12px;
  }

  .student-score {
    font-size: 0.85em;
  }
}


.csuk-insights-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Card layout (keep it responsive and flexible) */
.csuk-insight-card {
  flex: 1 1 calc(25% - 1rem); /* Up to 4 per row */
  min-width: 200px;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
  background: #f9f9f9;
}

/* NEW inner layout for card content */
.csuk-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Headline */
.csuk-card-inner h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Stat rows */
.csuk-stat-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

/* Labels */
.csuk-stat-label {
  font-weight: bold;
  width: 150px;
}

/* Circle */
.csuk-circle {
  display: inline-block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border-radius: 50%;
  font-weight: bold;
  font-size: 16px;
  background-color: #eee;
  color: #333;
}

/* Specific styles */
.average_score_sc { color: #fff; }
.average_score_sc.score-green { background-color: #28a745; }
.average_score_sc.score-amber { background-color: #ff9800; }
.average_score_sc.score-red { background-color: #e53935; }
.average_score_sc.score-unknown {
  background-color: #ccc;
  color: #333;
}

.csuk-insight-assigned { color: #444; }
.csuk-insight-attempted { color: #0073aa; }

.average_score_sc:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease-in-out;
}
