body.page-template-template-code-editor {
  margin: 0;
  overflow: hidden;
}

body.page-template-template-code-editor header,
body.page-template-template-code-editor footer {
  display: none;
}

body.page-template-template-code-editor .lms-code-editor-page {
  width: 100%;
  padding: 0;
  position: relative;
  background: var(--lms-bgcolor, #1e1e1e);
}

.lms-code-editor-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--lms-bgcolor, #1e1e1e);
}

.lms-code-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid #2d2d2d;
  background: #252526;
  color: #cccccc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.lms-code-editor-toolbar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cccccc;
}

.lms-code-editor-language-select {
  min-width: 10rem;
  height: 1.85rem;
  border: 1px solid #3c3c3c;
  border-radius: 4px;
  padding: 0 0.45rem;
  background: var(--lms-bgcolor, #1e1e1e);
  color: #f3f3f3;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.lms-code-editor-language-select:focus {
  outline: 2px solid #007acc;
  outline-offset: 1px;
}

.lms-code-editor-language-select:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lms-code-editor-instance {
  width: 100%;
  min-height: calc(190px + 1rem);
}

.lms-code-editor-instance .monaco-editor,
.lms-code-editor-instance .monaco-editor-background,
.lms-code-editor-instance .monaco-editor .margin {
  background: var(--lms-bgcolor, #1e1e1e) !important;
}

.lms-code-editor-message {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: var(--lms-bgcolor, #f5f5f5);
  color: #333333;
  text-align: center;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .lms-code-editor-toolbar {
    min-height: 2.8rem;
  }

  .lms-code-editor-language-select {
    min-width: 8.5rem;
  }
}
