/* ----- General Form Layout ----- */
.lesson-form {
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  padding: 50px 100px;
  border-radius: 12px;
  max-width: 1600px;
  margin: 0 auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  background-color: rgb(249, 249, 249);
}

.tox .tox-statusbar {
  display: none;
}

.lesson-tab-pane textarea {
  display: block;
}

/* ----- Tabs ----- */
/* ----- Progress Bar Tabs ----- */
.lesson-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  counter-reset: step;
  width: 100%;
}

.lesson-tabs li {
  position: relative;
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af; /* gray for inactive */
  cursor: pointer;
  user-select: none;
  border-bottom: 3px solid #d0d7de;
  padding-bottom: 10px;
}

/*.lesson-tabs li::before {
  counter-increment: step;
  content: counter(step);
  width: 28px;
  height: 28px;
  line-height: 28px;
  border: 2px solid #d1d5db;
  display: block;
  text-align: center;
  margin: 0 auto 8px;
  border-radius: 50%;
  background-color: #fff;
  color: #9ca3af;
  font-weight: 600;
}*/

/* connector lines */
.lesson-tabs li::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: #d1d5db;
  z-index: -1;
}
.lesson-tabs li:last-child::after {
  display: none;
}

/* Active Step */
.lesson-tabs li.active {
  background: none;
  color: black;
  font-weight: 800;
  border-bottom: 3px solid #10b981;
}
.lesson-tabs li.active::before {
  border-color: #10b981;
  color: #10b981;
}

/* Completed Step */
.lesson-tabs li.completed {
  border-bottom: 3px solid #10b981;
}
.lesson-tabs li.completed::before {
  background-color: #10b981;
  border-color: #10b981;
  color: #fff;
}
.lesson-tabs li.completed::after {
  background-color: #10b981;
}

/* ----- Section Headers ----- */
.lesson-tab-pane h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: #111827;
}

.lesson-tab-pane h4 {
  font-size: 18px;
  font-weight: 400;
  margin: 24px 0 12px;
  color: #111827;
}
.lesson-tab-pane p label {
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
  color: #374151;
}

/* ----- Inputs & Textareas ----- */
.lesson-form input[type="text"],
.lesson-form input[type="number"],
.lesson-form textarea,
.lesson-form select {
  width: 100%;
  max-width: 600px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  background: #fff;
  color: #111827;
  transition: border-color 0.2s ease;
}
.lesson-form input:focus,
.lesson-form textarea:focus,
.lesson-form select:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ----- Chips (checkbox labels) ----- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  margin: 4px 6px 4px 0;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip input[type="checkbox"] {
  margin-right: 6px;
}
.chip:hover {
  background: #f3f4f6;
  border-color: #10b981;
}
.chip input:checked + span,
.chip input:checked {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

/* ----- Inline Add Buttons ----- */
.btn-inline {
  display: inline-block!important;
  padding: 6px 12px!important;
  margin-top: 6px!important;
  border: none!important;
  border-radius: 8px!important;
  background: #10b981!important;
  color: #fff!important;
  font-size: 13px!important;
  cursor: pointer!important;
  transition: background 0.2s ease!important;
}
.btn-inline:hover {
  background: #059669!important;
}

/* ----- Navigation Buttons ----- */
.lesson-nav {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  position: relative;
  text-align: center;
}
.lesson-nav button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lesson-nav .save-draft {
  color: rgb(22, 216, 178) !important;
  text-decoration: underline !important;
  position: absolute;
  width: 150px;
  left: 0;
  right: 0;
  margin: auto;
  cursor: pointer;
}
#prevBtn {
  background: #e5e7eb;
  color: #374151;
}
#prevBtn:hover {
  background: #d1d5db;
}
#nextBtn {
  background: #10b981;
  color: #fff;
}
#nextBtn:hover {
  background: #059669;
}
#submitBtn {
  background: #3b82f6;
  color: #fff;
}
#submitBtn:hover {
  background: #2563eb;
}

#lessonForm p,
#lessonForm hr {
  margin-top: 20px;
}
h2 {
  margin: 50px 50px;
  font-size: 25px;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 16px;
  margin-bottom: 16px;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 16px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.btn-file,
.btn-drive {
  background-color: rgb(22, 216, 178);
  color: white;
  border: none;
  border-radius: 20px;
}

.material-row,
.background-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.material-row button,
.background-row button {
  flex: 1;
  text-align: right;
}

.material-row button:hover,
.background-row button:hover {
  background: white;
  color: black;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 6px;
  text-align: center;
}

.field input,
.field select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  align-content: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 12px;
}

.qty-stepper button {
  width: 32px;
  height: 32px;
  border: none;
  background: #20c997;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  text-align: center;
  flex: none;
  padding: 0;
  margin: 0;
}

.qty-stepper input {
  width: 100px !important;
  text-align: center;
  border-radius: 0;
  border: none !important;
  text-align: center;
  padding: 0 !important;
  margin: 0 !important;
}

.material-row input[type="text"] {
  padding: 6px 12px !important;
}

.remove-row {
  background: none!important;
  border: none!important;
  color: #333!important;
  font-weight: 600;
  cursor: pointer!important;
}

.btn-add {
  margin-top: 10px;
  background: #20c997!important;
  color: #fff!important;;
  border: none!important;;
  padding: 8px 16px!important;;
  border-radius: 20px!important;;
  cursor: pointer!important;;
}

#lessonForm i {
  font-size: 14px;
  color: black;
  display: block;
  clear: both;
}

.lesson-link {
  color: rgb(22, 216, 178);
  font-size: 14px;
  font-weight: 400;
  text-decoration: underline;
  margin-left: 40px;
}
.tox-tinymce {
  height: 250px !important;
}

.standard-tag {
  background: #e9eef3;
  padding: 6px 10px;
  border-radius: 20px;
  display: inline-block;
  margin: 5px;
}

.standard-tag .remove {
  cursor: pointer;
  margin-left: 6px;
}

.standards-block {
  display: flex;
  column-gap: 20px;
}

#standard-search {
  width: 640px;
}

#standard-category {
  width: 30%;
}

#standard-results {
  max-height: 150px;
  overflow: scroll;
  padding: 0;
  /*border: 1px solid #d1d5db;*/
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  background: #fff;
  text-transform: capitalize;
  position: absolute;
  top: 50px;
  width: 640px;
}
#standard-results li {
  padding: 5px 10px;
  text-transform: capitalize;
  cursor: pointer;
}
#standard-results li:hover {
  color: rgb(0, 136, 145);
}

.lesson-tabs {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.lesson-tab-pane {
  display: none;
}
.lesson-tab-pane.active {
  display: block;
}
.lesson-nav {
  margin-top: 16px;
  display: flex;
  gap: 8px;
}
.btn-inline {
  margin-left: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  margin: 4px 6px 0 0;
}
.lesson-form input[type="text"],
.lesson-form input[type="number"],
.lesson-form textarea {
  width: 100%;
  max-width: 640px;
}

.direct-instruction {
  border: 1px solid #ccc;
  min-height: 100px;
  padding: 8px;
}
.direct-instruction img {
  max-width: 200px;
  margin: 5px;
  float: left; /* allows text to wrap */
}

.lesson-content-section {
  background-color: #fff;
  border: 1px solid #cadde2;
  border-radius: 10px;
  padding: 20px 32px;
  margin-bottom: 20px;
}

.lesson-content-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
}

.lesson-content-heading h4 {
  margin: 0;
  font-size: 20px;
}

.lesson-content-section .up-down-svg-icon {
  rotate: 180deg;
  cursor: pointer;
}

.lesson-content-section.active .up-down-svg-icon {
  rotate: 0deg;
}

.lesson-content-section .lesson-content-data {
  display: none;
}

.lesson-content-section.active .lesson-content-data {
  display: block;
}

.lesson-content-section .edit-section-link {
  font-size: 16px;
  color: #16d8b2 !important;
  text-decoration: underline !important;
  margin-left: 20px;
}

.practice-files,
.lesson-extension-files {
  margin: 12px 0;
}

.practice-files button,
.lesson-extension-files button {
  margin-right: 10px;
}

.file-note {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

.remove-practice {
  margin-top: 12px;
  background: none;
  border: none;
  cursor: pointer;
  float: right;
}

/*cover image*/

.box,
.box-lesson_emoji {
  padding: 0.5em;
  width: 100%;
  margin: 0.5em;
  text-align: center;
  padding-bottom: 20px;
}

.box-2,
.box-2-lesson_emoji {
  padding: 0.5em;
  width: calc(100% / 2 - 1em);
  margin: 0 auto;
}

.options label,
.options input {
  width: 4em;
  padding: 0.5em 1em;
}
.btn {
  background: white;
  color: black;
  border: 1px solid black;
  padding: 0.5em 1em;
  text-decoration: none;
  margin: 0.8em 0.3em;
  display: inline-block;
  cursor: pointer;
}

.cropped,
.cropper-container .box-2 img.cropped {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  max-width: 300px!important;
}

.hide {
  display: none;
}

img {
  max-width: 100%;
}
.cropper-container {
  /* width: 350px !important;
   height: 350px !important;
	margin: 0 auto;*/
  text-align: center;
}

/*multiple images*/
.instruction-upload-buttons {
  margin-top: 15px;
}

.upload-file-btn, .google-drive-btn {
  background: #20c997!important;
  color: #fff!important;;
  border: none!important;;
  padding: 8px 18px!important;;
  border-radius: 25px!important;;
}

.upload-file-btn:hover {
  background: #16a085;
}

.selected-files {
  margin-top: 12px;
}

.file-tag {
  display: inline-flex;
  align-items: center;
  background: #f2f2f2;
  padding: 6px 10px;
  border-radius: 20px;
  margin: 5px 8px 5px 0;
  font-size: 14px;
}

.file-tag span {
  margin-right: 8px;
}

.file-remove {
  cursor: pointer;
  font-weight: bold;
  color: #999;
}

.file-remove:hover {
  color: red;
}

#subject-list,
#extra-objectives {
  padding: 0;
}
#subject-list li,
#extra-objectives li {
  align-items: center;
  display: flex;
  flex-basis: auto;
  flex-shrink: 0;
  margin: 0px;
  min-height: 0px;
  min-width: 0px;
  padding: 0px;
  position: relative;
  width: 600px;
  justify-content: space-between;
  font-size: 14px;
}

.btn-add:hover {
  background: #20c997;
}

.remove-subject,
.remove-objective {
  font-size: 12px;
  color: black;
  text-decoration: underline;
  align-items: flex-end;
}

label.error,
span.error,
strong.error,
p.error,
.lesson-content-section.error h4,
h4.error {
  color: rgb(250, 114, 114) !important;
}

.lesson-tab-pane select.error {
  color: rgb(250, 114, 114) !important;
  border-color: rgb(250, 114, 114) !important;
}

.lesson-content-section.error,
select.error {
  border-color: rgb(250, 114, 114) !important;
}

.cropped,
.cropper-container .box-2 img {
  max-width: 300px !important;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

.file-tag--rename {
  display: flex;
  gap: 8px;
}

.file-tag--rename .ok-button {
  font-size: 12px;
  padding: 0 28px;
  height: 40px;
}

/** Editor popup */
/* Overlay */
#editor-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.5);

  padding: 20px;
  box-sizing: border-box;
}

/* Popup Box */
#editor-popup .popup-content {
  width: 100%;
  max-width: 1000px;

  max-height: 90vh;
  overflow-y: auto;

  background: #fff;

  border-radius: 12px;

  padding: 20px;

  box-sizing: border-box;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#editor-popup .popup-content .mce-statusbar {
  display: none;
}

/* Header */
#editor-popup .popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#editor-popup .popup-title {
  margin: 0;

  font-size: 20px;
  font-weight: 600;
}

/* Footer */
#editor-popup .popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  margin-top: 20px;
}

/* Buttons */
#editor-popup button {
  border: none;

  border-radius: 6px;

  padding: 10px 16px;

  font-size: 14px;

  cursor: pointer;

  transition: 0.2s ease;
}

/* Save Button */
#popup-save-btn {
  background: #20c997;
  color: #fff;
}

#popup-save-btn:hover {
  background: #135e96;
}

/* Close Button */
#popup-close-btn {
  background: #f1f1f1;
  color: #333;
}

#popup-close-btn:hover {
  background: #ddd;
}

/* TinyMCE spacing */
#editor-popup .wp-editor-wrap {
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  #editor-popup {
    padding: 10px;
  }

  #editor-popup .popup-content {
    max-width: 100%;
    max-height: 95vh;

    padding: 15px;
  }
}

.mce-content-body.custom-editor-content {
  font-family: Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.6;
  color: #222;
}

/* End Editor popup */

/** Content Editor */
content-editor {
  display: block;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
  transition: 0.2s ease;
}

content-editor:hover {
  border-color: #2271b1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

content-editor .content-preview {
  margin-bottom: 12px;
  line-height: 1.6;
  color: #222;
  max-height: 200px;
  overflow-y: auto;
}

content-editor .edit-btn {
  border: none;
  border-radius: 6px;
  background: #20c997;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}

content-editor .edit-btn:hover {
  background: #20c997;
}
/* End Content Editor */