.simple-editor {
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
}

.editor-toolbar {
  background: #f5f5f5;
  border-bottom: 1px solid #ccc;
  padding: 5px;
  border-radius: 4px 4px 0 0;
}

.editor-toolbar .btn {
  margin-right: 2px;
  margin-bottom: 2px;
}

.editor-content {
  min-height: 60px;
  padding: 10px;
  outline: none;
  background: white;
  border-radius: 0 0 4px 4px;
}

.editor-content:focus {
  border-color: #66afe9;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.editor-content ul, .editor-content ol {
  margin: 10px 0;
  padding-left: 20px;
}

.editor-content p {
  margin: 5px 0;
}

/* Image styling in editor */
.editor-content .image-container {
  margin: 10px 0;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  background: #f9f9f9;
}

.editor-content .image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.editor-content .image-caption {
  font-style: italic;
  color: #666;
  margin-top: 5px;
  font-size: 0.9em;
}

/* Image modal styling */
#imageModal {
  display: none !important;
  position: fixed !important;
  z-index: 999999 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0,0,0,0.8) !important;
}

#imageModal.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#imageModal .modal-dialog {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 500px !important;
  max-width: 90% !important;
  margin: 0 !important;
  background: white !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 9px rgba(0,0,0,0.5) !important;
  z-index: 1000000 !important;
}

#imageModal .modal-content {
  border: none !important;
  border-radius: 6px !important;
  position: relative !important;
  z-index: 1000001 !important;
}

#imageModal .modal-header {
  padding: 15px !important;
  border-bottom: 1px solid #e5e5e5 !important;
  border-radius: 6px 6px 0 0 !important;
  background: white !important;
}

#imageModal .modal-body {
  padding: 15px !important;
  background: white !important;
}

#imageModal .modal-footer {
  padding: 15px !important;
  border-top: 1px solid #e5e5e5 !important;
  border-radius: 0 0 6px 6px !important;
  background: white !important;
}

/* Questions form styling */
.questions-form {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  background-color: #f9f9f9;
}

.comprehension-questions .question-item {
  margin-bottom: 10px;
}

.comprehension-questions .input-group {
  margin-bottom: 5px;
}

.question-preview {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  background-color: white;
  min-height: 100px;
  max-height: 200px;
  overflow-y: auto;
}

.question-preview h4 {
  margin-top: 0;
  color: #333;
}

.question-preview ul {
  margin-bottom: 0;
}

.question-preview li {
  margin-bottom: 8px;
  padding-left: 0;
}

/* Dropdown menu styling */
.btn-group[dropdown] {
  position: relative;
}

.btn-group[dropdown] .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  z-index: 1000;
  display: none;
  float: left;
  min-width: 120px;
  max-width: 150px;
  padding: 5px 0;
  margin: 2px 0 0;
  list-style: none;
  font-size: 12px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  white-space: nowrap;
}

.btn-group[dropdown] .dropdown-menu.open {
  display: block;
}

.btn-group[dropdown] .dropdown-menu li {
  display: block;
}

.btn-group[dropdown] .dropdown-menu li > a {
  display: block;
  padding: 3px 20px;
  clear: both;
  font-weight: normal;
  line-height: 1.42857143;
  color: #333333;
  white-space: nowrap;
  text-decoration: none;
  text-align: left;
}

.btn-group[dropdown] .dropdown-menu li > a:hover,
.btn-group[dropdown] .dropdown-menu li > a:focus {
  color: #262626;
  text-decoration: none;
  background-color: #f5f5f5;
}

.btn-group[dropdown] .dropdown-menu .divider {
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
  background-color: #e5e5e5;
}

/* Specific styling for articles table dropdown */
.dropdown-menu-right {
  text-align: left !important;
  min-width: 120px !important;
  max-width: 150px !important;
  right: 0 !important;
  left: auto !important;
  white-space: nowrap !important;
}

.dropdown-menu-right li {
  text-align: left !important;
}

.dropdown-menu-right li a {
  text-align: left !important;
  justify-content: flex-start !important;
  padding: 8px 12px !important;
  font-size: 12px !important;
}

/* Article modal width - wider but not too wide */
.wide-article-modal .modal-dialog {
  width: 60% !important;
  max-width: 900px !important;
  margin: 30px auto !important;
}

.wide-article-modal .modal-content {
  width: 100% !important;
}
