/* ================================
   TEST YARATISH MODALI
   ================================ */

#create-test-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

#create-test-modal.hidden {
  display: none !important;
}

#create-test-modal .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

#create-test-modal .modal-content {
  position: relative;
  z-index: 2;

  width: min(900px, calc(100% - 40px));
  max-height: 90vh;

  margin: 5vh auto;
  padding: 28px;

  background: #fff;
  border-radius: 16px;

  overflow-y: auto;
  box-sizing: border-box;

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

#create-test-modal .modal-content h3 {
  margin: 0 0 24px;
  font-size: 24px;
}

/* Oddiy qatorlar */
#create-test-modal .form-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 16px;

  margin-bottom: 16px;
}

/* Label */
#create-test-modal .form-row > label {
  margin: 0;
  font-weight: 600;
}

/* Input va select */
#create-test-modal input[type="text"],
#create-test-modal input[type="number"],
#create-test-modal input[type="file"],
#create-test-modal select,
#create-test-modal textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Savol matni */
#create-test-modal textarea {
  min-height: 100px;
  resize: vertical;
}

/* Savol bloki */
#create-test-modal .question-block {
  margin-top: 25px;
  padding: 22px;

  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

#create-test-modal .question-block h4 {
  margin: 0 0 20px;
  font-size: 18px;
}

/* Aralashtirish checkboxlari */
#create-test-modal #ct-rq,
#create-test-modal #ct-ra {
  width: auto;
}

#create-test-modal .form-row:has(input[type="checkbox"]) {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: center;
}

#create-test-modal .form-row:has(input[type="checkbox"]) label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tugmalar */
#create-test-modal .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  margin-top: 25px;
  padding-top: 20px;

  border-top: 1px solid #e5e7eb;
}

/* Rasm yuklash */
#create-test-modal .question-block .form-row:has(input[type="file"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#create-test-modal .question-block .form-row:has(input[type="file"]) label {
  flex: 1 1 100%;
}

#create-test-modal .upload-path {
  font-size: 13px;
  color: #16a34a;
}

/* Mobil */
@media (max-width: 700px) {
  #create-test-modal .modal-content {
    width: calc(100% - 20px);
    max-height: 94vh;
    margin: 3vh auto;
    padding: 18px;
  }

  #create-test-modal .form-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  #create-test-modal .form-row > label {
    margin-bottom: 4px;
  }

  #create-test-modal .form-actions {
    flex-direction: column;
  }

  #create-test-modal .form-actions button {
    width: 100%;
  }
}

.teacher-role-box {
  margin: 20px 0;
  padding: 24px;
  background: linear-gradient(135deg, #eaf7ff 0%, #eef2ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 16px;
}

.teacher-role-box h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.teacher-role-box p {
  margin: 0 0 20px;
  color: #4b5563;
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.role-panel {
  width: 100%;
}

.word-import-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.word-import-box input[type="file"] {
  flex: 1 1 220px;
}
