/* Base editor styles */
#editor {
  height: 93% !important;
  width: 100%;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  tab-size: 2;
}

/* Toolbar styles */
.editor-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 5px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.search-container {
  flex: 1;
}

#codeSearchInput {
  /* min-width: 90%; */
}

/* Layout and dimensions */
.code-content {
  height: calc(100% - 50px);
}

#editedCode {
  height: 90%;
}

/* Ace editor theme customization */
.ace_scroller {
  background-color: #ffffff;
  color: #2f3129;
}

.ace-monokai {
  .ace_marker-layer .ace_active-line {
    background: #c4c4c4;
    color: #ffffff;
  }

  .ace_gutter {
    background: #515459;
    color: #8f908a;
    box-shadow: 0px 0px 4px 0px;
  }

  .ace_storage.ace_type,
  .ace_support.ace_class,
  .ace_support.ace_type {
    color: #a716aa;
  }

  .ace_constant {
    &.ace_character,
    &.ace_language,
    &.ace_numeric,
    &.ace_other {
      color: #f08d49;
    }
  }

  .ace_gutter-active-line {
    background-color: #282828;
  }
}

/* Core editor components */
#editor {
  .ace_layer {
    position: absolute;
    z-index: auto;
    white-space: pre;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .ace_marker-layer {
    position: absolute;
    z-index: 4;
  }

  .ace_selection {
    background-color: rgba(88, 172, 247, 0.3);
    position: absolute;
    z-index: 5;
  }

  .ace_selected-word {
    position: absolute !important;
    z-index: 4;
    background-color: rgba(88, 172, 247, 0.2) !important;
    border: none !important;
    transform: none !important;
  }

  .ace_text-layer {
    position: absolute;
    z-index: 6;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre;
  }

  .ace_cursor-layer {
    position: absolute;
    z-index: 7;
  }

  .ace_cursor {
    border-left: 2px solid black;
    position: absolute;
    z-index: 7;
  }

  .ace_content {
    position: absolute;
    box-sizing: border-box;
    contain: content;
  }

  .ace_line {
    position: relative !important;
    white-space: pre !important;
    contain: layout !important;
    height: 1.5em !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .ace_paren {
    position: relative !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Global font settings */
#editor,
#editor .ace_text-layer,
#editor .ace_line,
#editor .ace_line * {
  font-family: Consolas, "Courier New", monospace !important;
  line-height: 1.5 !important;
  font-size: 14px !important;
}
.ace_punctuation.ace_operator {
  color: #f08d49;
}
