/* ─────────────────────────────
   ASSIGNMENT PANEL BASE STYLES
───────────────────────────── */
body.page-template-assignment-panel {
  background-color: #f5f5f5;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body.page-template-assignment-panel .site,
body.page-template-assignment-panel .entry-content,
body.page-template-assignment-panel .container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.dashboard-header-bar {
  background-color: #972141;
  padding: 1.25rem 0 0.75rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.dashboard-title {
  color: #fff;
  font-size: 2rem;
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
  font-family: 'roboto', 'Courier New', Courier, monospace;
}

.assignment-panel-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem 2rem 1.5rem;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.assignment-panel-grid {
  display: grid;
  grid-template-columns: 280px 1fr 220px;
  gap: 2rem;
  align-items: stretch;
}

.assignment-panel-grid > * {
  min-width: 0;
}

.filter-sidebar,
.quiz-list,
.quiz-actions-panel {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem 1.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: visible;
}

.section-title {
  font-size: 1.6rem;
  color: #972141;
  margin-bottom: 1rem;
  font-weight: 700;
}

.filter-form label {
  font-weight: 600;
  margin: 0.6rem 0 0.3rem;
  display: block;
  font-size: 0.95rem;
}

.filter-form select,
.filter-form input[type="number"],
.filter-form button {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.filter-form button {
  background-color: #972141;
  color: #fff;
  border: none;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 600;
  padding: 0.85rem;
}

.filter-form button:hover {
  background-color: #7a102f;
}
.filter-form select:focus {
  border-color: #fcc10f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(252, 193, 15, 0.4);
}
.filter-form input:focus,
.filter-form select:focus,
.filter-form button:focus {
  border-color: #fcc10f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(252, 193, 15, 0.4);
}


.quiz-row {
  padding: 1rem 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.quiz-row label {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  color: #222;
}

.quiz-row:nth-child(even) {
  background-color: #fcfcfc;
}

.preview-btn {
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid #972141;
  background: #fff;
  color: #972141;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  font-weight: 600;
}

.preview-btn:hover {
  background-color: #972141;
  color: #fff;
}

.subtopic-title {
  font-size: 1.2rem;
  color: #972141;
  margin: 1.5rem 0 0.75rem;
  border-bottom: 2px solid #fdebf1;
  padding-bottom: 0.25rem;
  font-weight: 600;
  text-transform: capitalize;
}

.quiz-list {
  min-width: 0;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  position: relative;
}

.quiz-list .section-title {
  position: sticky;
  top: 0;
  background: #ffffff;
  margin-top: 0;
  padding-top: 1rem;
  z-index: 2;
}

.quiz-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
  min-width: 180px;
  box-sizing: border-box;
}

.quiz-actions-panel .action-button {
  background: #972141;
  color: white;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  opacity: 0.6;
  cursor: not-allowed;
  transition: opacity 0.2s;
}

.quiz-actions-panel .action-button.enabled {
  opacity: 1;
  cursor: pointer;
}

.quiz-actions-panel .action-button.enabled:hover {
  opacity: 0.85;
}

.assignment-panel-wrapper .bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: #972141;
  pointer-events: none;
}

.assignment-panel-wrapper .bg-circle.one {
  width: 300px;
  height: 300px;
  top: -100px;
  left: -100px;
}

.assignment-panel-wrapper .bg-circle.two {
  width: 200px;
  height: 200px;
  bottom: -80px;
  right: -80px;
}

#previewModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

#previewModal .modal-content {
  background: white;
  max-width: 700px;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

#previewModal .modal-close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 1.5rem;
  cursor: pointer;
}

#previewModal .question-preview {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid #972141;
  background: #fcfcfc;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.25rem;
  color: #222;
}

.modal-divider {
  border: none;
  border-top: 2px solid #eee;
  margin: 0.5rem 0 1rem;
}

#previewModal #modalNav {
  text-align: center;
  margin-top: 1rem;
}

#previewModal #modalNav button {
  background: #972141;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

#previewModal #modalNav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/*------------------------------------------------------------*/
.quiz-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quiz-group {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1rem;
}

.quiz-heading {
  font-weight: 600;
  font-size: 1.25rem;
  color: #972141;
  margin-bottom: 0.5rem;
}

.quiz-sublist {
  list-style: none;
  padding-left: 0;
}

.quiz-subitem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: #fdfdfd;
  gap: 1rem;
}

.quiz-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-grow: 1;
}

.quiz-title {
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  margin: 0;
}

/*preview layout starts here*/

.preview-question,
.preview-question * {
  font-family: 'roboto', 'Courier New', Courier, monospace;
  font-weight: 400;
  font-size: 16px;
 
}

.preview-button {
  background: none;
  border: 1px solid #972141;
  color: #972141;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
.preview-options label {
  display: block;
  margin: 6px 0;
}
.preview-answer-input {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
}
.preview-matching {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.preview-matching th, .preview-matching td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}
.upload-box {
  margin-top: 12px;
}
.preview-note {
  font-size: 0.85rem;
  color: #888;
  margin-top: 10px;
  text-align: center;
}
.preview-image-wrapper {
  text-align: center;
  margin: 10px 0;
  max-width: 100%;
}

.preview-question img {
  max-height: 180px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.mcq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.mcq-option {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: border 0.2s ease;
}

.mcq-option:hover {
  border-color: #972141; /* Me and Math primary color */
}

.mcq-option input[type="radio"] {
  display: none;
}

.truefalse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.mcq-option {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: border 0.2s ease;
}

.mcq-option:hover {
  border-color: #972141;
}

.mcq-option input[type="radio"] {
  margin-right: 8px;
}
.answer-feedback {
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
}

.answer-feedback .correct {
  color: #2d8a44;
}

.answer-feedback .incorrect {
  color: #c62828;
}
.mcq-option {
  display: block;
  padding: 10px 12px;
  border: 2px solid #ccc;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mcq-option input[type="radio"] {
  display: none;
}

.mcq-option.correct {
  border-color: #2d8a44;
  background-color: #2df766;
}

.mcq-option.incorrect {
  border-color: #c62828;
  background-color: rgba(255, 0, 0, 0.8);
}
.drag-drop-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 20px;
}

.drag-column {
  flex: 1;
}

.drop-zone {
  margin-bottom: 14px;
}

.drop-target {
  display: inline-block;
  min-width: 100px;
  padding: 6px 12px;
  border: 2px dashed #ccc;
  margin-left: 10px;
  background-color: #f9f9f9;
  border-radius: 6px;
}

.drag-over {
  background-color: #fffbe6;
  border-color: #aaa;
}

.draggable-option {
  background-color: #f0f0f0;
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 2px solid #ccc;
  border-radius: 6px;
  cursor: grab;
  text-align: center;
}

.correct-drop {
  background-color: #e6f4ea;
  border-color: #2d8a44;
}

.incorrect-drop {
  background-color: #fbeaea;
  border-color: #c62828;
}

.drop-feedback {
  margin-left: 10px;
  font-size: 1.2rem;
}
.show-work-box {
  margin-top: 16px;
  padding: 12px;
  background-color: #f8f8f8;
  border: 2px dashed #ccc;
  border-radius: 8px;
}

.show-work-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #972141;
}

.show-work-input {
  display: block;
  padding: 6px;
  font-size: 0.95rem;
}

.show-work-note {
  font-size: 0.85rem;
  color: #888;
  margin-top: 6px;
}

.preview-button:hover {
  background-color: #972141;
  color: #fff;
}
/*preview layout ends*/

.subskill-group {
  margin-left: 1rem;
  border-left: 3px solid #eee;
  padding-left: 1rem;
}
.subskill-heading {
  font-weight: 500;
  color: #7da73b;
  margin-top: 0.5rem;
}

/*toggle switch*/

.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.toggle-label {
  font-weight: 600;
  color: #972141;
}
.toggle-switch {
  position: relative;
  width: 80px;
  height: 36px;
  background-color: #ccc;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.toggle-thumb {
  position: absolute;
  width: 40px;
  height: 36px;
  background-color: #972141;
  border-radius: 18px;
  transition: left 0.3s, background-color 0.3s;
  left: 0;
}
.toggle-switch.single .toggle-thumb {
  left: 0;
}

.toggle-switch.multi {
  background-color: #ccc;
}
.toggle-switch.multi .toggle-thumb {
  left: 40px;
  background-color: #972141;
}
.toggle-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  color: #555;
}

/* Force Select2 multiselect inside filter to stay bounded */
#multi-topic-group {
  width: 100%;
  display: block;
}

#multi-topic-group .select2-container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  display: block !important;
}

#multi-topic-group .select2-selection--multiple {
  width: 100%;
  min-height: 42px;
  background-color: #fff;
  border: 1px solid #972141;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  box-sizing: border-box;
}

#multi-topic-group .select2-selection__choice {
  background-color: #972141;
  color: #fff;
  padding: 4px 8px;
  margin: 3px 4px;
  border-radius: 4px;
  font-size: 13px;
  border: none;
}

