

/* Separator after Dashboard */
.menu-item-eai[data-category="dashboard"] {
    position: relative;
}

.menu-item-eai[data-category="dashboard"]::after {
    content: "";
    position: absolute;
    top: 10%;
    right: -10px; /* small gap from right edge */
    height: 80%;
    width: 1px;
    background-color: #ccc;
}

/* Separator before Classes */
.menu-item-eai[data-category="classes"] {
    position: relative;
}

.menu-item-eai[data-category="classes"]::before {
    content: "";
    position: absolute;
    top: 10%;
    left: -10px; /* small gap from left edge */
    height: 80%;
    width: 1px;
    background-color: #ccc;
}

/*********************STUDENT SIGN UP FORM********************************/



.csuk-auth-panel {
    border: 1px solid #333; /* black border */
    border-radius: 10px;
    padding: 20px;
    background: #fafafa; /* light background to lift it slightly */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* gentle shadow for depth */
}

.signup-message {
    margin-bottom: 15px;
}

.signup-error {
    background: #ffe0e0;
    color: #b00000;
    padding: 10px;
    border: 1px solid #ffb3b3;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
}


/*********************GROUP CREATE FORM********************************/

/* Container styling for form */
#create-group-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Input fields */
#create-group-form input[type="text"],
#create-group-form input[type="number"],
#create-group-form input[type="password"],
#create-group-form input[type="email"] {
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.3s;
}

#create-group-form input:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Submit button */
#create-group-form input[type="submit"] {
    background-color: #3b82f6;
    color: #fff;
    padding: 14px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#create-group-form input[type="submit"]:hover {
    background-color: #2563eb;
}

/* The seat limit message */
#create-group-form p {
    font-weight: bold;
    text-align: center;
    color: #334155;
    margin-bottom: 10px;
}

/* Message box for success/error */
#group-message {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1rem;
}

#group-message p {
    padding: 10px 20px;
    border-radius: 8px;
}

#group-message p[style*="color: green;"] {
    background: #dcfce7;
    color: #15803d;
}

#group-message p[style*="color: red;"] {
    background: #fee2e2;
    color: #b91c1c;
}

/* Add a nice header block above form */
.create-group-header {
    text-align: center;
    margin-bottom: 20px;
}

.create-group-header h2 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    color: #1e293b;
}

.create-group-header p {
    margin: 0;
    color: #475569;
    font-size: 1rem;
}

/* Label styling */
#create-group-form label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #334155;
}

/* Slightly wider number field */
#create-group-form input[type="number"] {
    width: 50%;
    max-width: 200px;
}


/*******************NON MEMBERSHIP ACCESS RESTRICTION MESSAGE*****************/

.csuk-membership-access-box {
	text-align: center;
	max-width: 600px;
	margin: 40px auto;
	background: #f9f9f9;
	padding: 25px 30px;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	border: 1px solid #ddd;
}

.csuk-membership-title {
	font-size: 1.8em;
	color: #cc0000;
	margin-bottom: 10px;
}

.csuk-membership-message {
	font-size: 1em;
	color: #444;
	margin-bottom: 20px;
}

.csuk-membership-button {
	display: inline-block;
	margin: 8px 10px;
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 1em;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease-in-out;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.csuk-membership-button.trial {
	background-color: #4CAF50;
	color: white;
}

.csuk-membership-button.trial:hover {
	background-color: #45a045;
}

.csuk-membership-button.pro {
	background-color: #0073aa;
	color: white;
}

.csuk-membership-button.pro:hover {
	background-color: #005d8a;
}

.csuk-membership-note {
	font-size: 0.9em;
	color: #555;
	margin-top: -4px;
	margin-bottom: 12px;
}

.csuk-membership-or {
	font-weight: bold;
	color: #888;
	margin: 10px 0;
}



/********************* Teacher Dashboard Style *************************/

.class-dashboard {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.class-dashboard h2, .class-dashboard h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #1f2937;
}

.empty-class-message {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #ddd;
    text-align: center;
    font-style: italic;
    color: #555;
}


.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.dashboard-table th, .dashboard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.dashboard-table th {
    background: #f0f2f5;
    font-weight: bold;
    font-size: 1em;
    color: #333;
}

.avg-score {
    font-weight: bold;
    color: #222;
    cursor: help;
    border-radius: 6px;
    background: #eef2f7;
    padding: 4px 8px;
    display: inline-block;
}

.dashboard-table .view-task-details {
    font-size: 1.2em;
    color: #0073aa;
}

.dashboard-table .view-task-details:hover {
    color: #005088;
}

/* Tooltip styling on hover (optional enhancement) */
.avg-score[title]:hover::after {
    content: attr(title);
    white-space: pre;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 999;
    font-size: 0.9em;
    line-height: 1.4;
    transform: translateY(-110%);
    max-width: 300px;
}

.dashboard-table th:nth-child(1),
.dashboard-table td:nth-child(1) {
    width: 40%;
}

.dashboard-table th:nth-child(n+2),
.dashboard-table td:nth-child(n+2) {
    width: 12%;
}


/* Score colors for teacher dashboard */
.avg-score.score-green {
    background-color: #d1f7d6;
    color: #0a5b1d;
}

.avg-score.score-amber {
    background-color: #fff3cd;
    color: #856404;
}

.avg-score.score-red {
    background-color: #f8d7da;
    color: #721c24;
}

.avg-score.score-unknown {
    background-color: #e2e3e5;
    color: #6c757d;
}


/* Responsive tweaks */
@media (max-width: 800px) {
	
    .dashboard-buttons {
        gap: 10px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .dashboard-button {
        width: 90px !important;
        height: 90px !important;
        padding: 8px !important;
        font-size: 12px !important;
        border-radius: 10px !important;
    }

    .dashboard-button img {
        width: 24px !important;
        height: 24px !important;
        margin-bottom: 4px !important;
    }

    .dashboard-button span {
        font-size: 12px !important;
    }
	
	
	.csuk-insight-card {
        padding: 12px !important;
        font-size: 0.9em !important;
		min-width: 100px !important;
    }
	
	.csuk-stat-line {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		text-align: center !important;
	}

    .csuk-insight-card h4 {
        font-size: 0.8em !important;
        margin-bottom: 8px !important;
    }

    .csuk-insight-card .card-metric {
        font-size: 0.8em !important;
    }
	
	.csuk-circle,
	.average_score_sc {
		font-size: 12px !important; /* or adjust as needed */
		padding: 4px 6px !important; /* optional: reduce padding to keep it circular */
	}
	
	
	.dashboard-table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.dashboard-table {
		width: max-content; /* Ensures table retains original column width */
		min-width: 100%;     /* Still stretches full width if small enough */
		font-size: 0.85em;
	}
}


/*************TEACHER DASH MODALS***************/


/************* TEACHER DASHBOARD MODALS **************/

/* Wrapper for the full-screen dark overlay */
.dashboard-modal-wrapper {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

/* The actual modal box */
.dashboard-modal {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    position: relative;
    overflow-y: auto;
    
    /* Responsive full screen effect with margin */
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
    
    max-width: 1400px; /* optional max width on very large screens */
    max-height: calc(100vh - 80px);
    
    margin: auto; /* center it vertically & horizontally */
}


/* Close button 
.dashboard-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}
*/

.dashboard-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.dashboard-button {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 16px;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.dashboard-button:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
	background: #f8f9fa !important;
}

.dashboard-button img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.dashboard-button span {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}



/*------------- EAI CLASS MARKBOOK STYLES ------------------*/

.eai_markbook_table {
    overflow: auto;
    width: 100%;
    max-height: 800px;
    display: block;
	padding-right: 100px;
}

.eai_markbook_table table {
    border-collapse: collapse;
    width: 100%;
    font-size: 10px;
    border: none;
}

.eai_markbook_table thead {
    position: sticky!important;
    top: 0;
    height: 150px;
    z-index: 50;
    background: white;
}

.eai_markbook_table thead tr {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
}

.eai_markbook_table th,
.eai_markbook_table td {
    border: 1px solid #ddd;
    text-align: center;
    white-space: nowrap;
    color: black !important;
}

.eai_markbook_table th {
    color: black !important;
    border: none;
    z-index: 1!important;
	cursor: pointer;
}

.eai_markbook_table tr th:first-child,
.eai_markbook_table tr td:first-child {
    min-width: 100px;
    text-align: left;
    position: sticky;
    left: 0;
    background-color: white;
    color: var(--text-color)!important;
    z-index: 2;
}

.eai_markbook_table tr th:not(:first-child),
.eai_markbook_table tr td:not(:first-child) {
    max-width: 45px;
    min-width: 45px;
    width: 45px;
    height: 30px;
    padding: 0;
    vertical-align: middle;
}

.eai_markbook_table th:not(:first-child) {
    height: 100px;
    position: relative;
    padding: 0;
}

.eai_markbook_table th:not(:first-child) > div {
    transform: translate(5px, 73px) rotate(-45deg);
    width: 30px;
	pointer-events: none;
}

.eai_markbook_table th:not(:first-child) > div > span {
    padding: 7px 10px 5px 25px;
    border-top: 1px solid #ddd;
    box-sizing: border-box;
    font-size: 8px;
    color: var(--text-color);
	pointer-events: none;
}

/* Status colors */
.eai_markbook_table td.green span {
    color: var(--text-color) !important;
}
.eai_markbook_table td.amber span {
    color: var(--text-color) !important;
}
.eai_markbook_table td.red span {
    color: var(--text-color) !important;
}
.eai_markbook_table td.neutral span {
    color: var(--text-color) !important;
}

.eai_markbook_table td.student-row {
    cursor: pointer;
}
.eai_markbook_table td.student-row:hover {
    background-color: #f0f0f0;
}



th.sortable {
    cursor: pointer;
    position: relative;
}

th.sorted-asc::after {
    content: "▲";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
}

th.sorted-desc::after {
    content: "▼";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #666;
}



/***************MARKBOOK TASK REVIEW MODAL******************/

.eai-modal-mb {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	box-sizing: border-box;
	padding: 10px 0;
	overflow-y: auto;
}

.eai-modal-mb.active {
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

/* Scrollable modal content */
.eai-modal-content-mb {
	margin-top: 40px;
	background-color: #fff;
	padding: 20px;
	border: 1px solid #ccc;
	width: 80%;
	max-width: 1400px;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	position: relative;
}

/* Close button now outside content but fixed to modal */
.eai-modal-close-mb, .dashboard-modal-close {
	position: sticky;
	width: 35px;
	height: 35px;
	display: flex; /* Fix: enables width/height to apply */
	align-items: center;
	justify-content: center;
	background-color: red;
	color: white;
	font-size: 28px;
	font-weight: bold;
	border-radius: 50%;
	line-height: 48px;
	text-align: center;
	cursor: pointer;
	z-index: 10;
	margin-left: auto;
}



/**********************Student Score Cells*****************************/

.student-score {
	cursor: pointer;
	color: black;
}

/****************************MARKBOOK EXPORT BUTTON****************************/


#export-markbook-csv {
	margin: 10px 0;
	padding: 8px 16px;
	font-size: 14px;
	background-color: #4CAF50;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}
#export-markbook-csv:hover {
	background-color: #45a049;
}


/********************GROUP MANAGEMENT SECTION********************//

.csuk-group-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.csuk-tab { padding: 10px 15px; background: #eee; border: none; border-radius: 5px; cursor: pointer; }
.csuk-tab.active { background: #444; color: #fff; }
.csuk-tab-content { background: #fdfdfd; padding: 20px; border: 1px solid #ccc; border-radius: 8px; }




/*-----------------ASSESSMENT REVIEW MODAL---------------*/

/* Modal container */
#assessment-review-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1600px;
  height: 90%;
  background: #fff;
  border-radius: 10px;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Modal inner content layout */
.csuk-modal-content {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
}

/* Left panel (Student list) */
#assessment-student-list {
  width: 25%;
  border-right: 1px solid #ddd;
  padding: 15px;
  background: #f9f9f9;
  overflow-y: auto;
}

/* Right panel (Student detail view) */
#assessment-detail-panel {
  width: 75%;
  padding: 15px;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Ensure content inside right pane fills width */
#assessment-detail-content {
  width: 100%;
  box-sizing: border-box;
}

/* Table style */
#assessment-student-list table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

#assessment-student-list td {
  padding: 6px 8px;
  border-bottom: 1px solid #e0e0e0;
}

#assessment-student-list td.student-score:hover {
  cursor: pointer;
}


#assessment-student-rows .student-score {
	text-align: center;
	width: 50px;
	height: 50px;
	padding: 4px;
}

/* Overlay */
#modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.csuk-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background-color: red;
  color: white;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  line-height: 36px;
  cursor: pointer;
  z-index: 10000;
}

/***********QUESTION RENDER******************//

.assessment-question {
  margin-bottom: 30px;
}

.question-content {
  margin-bottom: 15px;
  font-style: italic;
  color: #444;
}


.assessment-question {
  margin-bottom: 30px;
}

.marking-block ul {
  padding-left: 20px;
}

.marking-block ul li {
  margin-bottom: 5px;
}

.assessment-summary {
  margin-top: 30px;
  background: #f0f8ff;
  padding: 15px;
  border-radius: 6px;
  font-weight: bold;
}


/*--------------------EXAM/MCQ MODAL-----------------*/

#csuk-assessment-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* Allow scrolling if needed */
  background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black */
}

/* Specific to the new modal */
.csuk-assessment-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 1400px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease;
}


.csuk-close-wrapper {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  z-index: 20;
  padding: 10px 10px 0 0;
  margin-bottom: -50px;
}

#csuk-modal-close {
  width: 40px;
  height: 40px;
  background-color: red;
  color: white;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

#csuk-modal-close:hover {
  background-color: darkred;
}


#csuk-assessment-loader {
  text-align: center;
  padding: 20px;
  font-weight: bold;
}

/************Teacher Controlled Enrolment Form***************/

.current-students-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.current-students-table th,
.current-students-table td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: left;
}

.current-students-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.current-students-table tr:nth-child(even) {
    background-color: #fafafa;
}

.current-students-table tr:hover {
    background-color: #f0f8ff;
    transition: background-color 0.2s ease;
}


.csuk-enrolment-subtabs {
    display: flex;
	margin-top: 20px;
    margin-bottom: 20px;;
}
.csuk-subtab {
    padding: 8px 16px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-bottom: none;
    background: #f0f0f0;
    margin-right: 5px;
}
.csuk-subtab.active {
    background: white;
    border-top: 2px solid #0073aa;
    font-weight: bold;
}
.manual-signup-table {
    width: 100%;
    border-collapse: collapse;
}
.manual-signup-table td, .manual-signup-table th {
    border: 1px solid #ccc;
    padding: 8px;
}

.dashboard-button.danger {
    background-color: #c0392b;
    color: white;
    border: none;
}
.dashboard-button.danger:hover {
    background-color: #a93226;
}

/***************EDIT STUDENTS TABLE********************/

.edit-students-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.edit-students-table th,
.edit-students-table td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: center;
    vertical-align: middle;
}

.edit-students-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.edit-students-table tr:nth-child(even) {
    background-color: #fafafa;
}

.edit-students-table tr:hover {
    background-color: #f0f8ff;
    transition: background-color 0.2s ease;
}

.edit-students-table .with-divider {
    border-right: 10px solid #ccc;
}


/*******************Tab Styling*******************/

/* Tab Buttons Container inside the Card */
.ai-tab-buttons {
    display: flex;
    gap: 0; /* No gap between tabs */
    border-bottom: 1px solid #ddd;
	margin-left: 15px;
	margin-right: 15px;
}

/* Each Tab Button - Clean Modern Tabs */
.ai-tab-btn {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 10px 10px 6px 10px;
    cursor: pointer;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    transition: background-color 0.3s, border-color 0.3s;
    flex-grow: 1;
    text-align: center;
    font-weight: normal;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Tab button icons */
.ai-tab-btn img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 5px;
}

/* On Active */
.ai-tab-btn.active {
    background-color: #ddebff; /* light blue */
    border-color: #000 #000 white #000;
    color: #000; /* black text */
    font-weight: bold;
}

/* Hover */
.ai-tab-btn:hover {
    background-color: #ddebff;
}