@import "syntax-variables";

atom-text-editor, atom-text-editor {
  background-color: @syntax-background-color;
  color: @syntax-text-color;

  .wrap-guide {
    background-color: @syntax-wrap-guide-color;
  }

  .indent-guide {
    color: @syntax-indent-guide-color;
  }

  .invisible-character {
    color: @syntax-invisible-character-color;
  }

  .lines {
    .cursor-line {
      background-color: @syntax-gutter-background-color;
    }
    .syntax--inside-js.syntax--css.syntax--styled .syntax--property-name {
      font-weight: bold;
    }
  }

  .gutter {
    background-color: @syntax-gutter-background-color;
    color: @syntax-gutter-text-color;

    .line-number {
      &.cursor-line {
        background-color: @syntax-gutter-background-color-selected;
        color: @syntax-gutter-text-color-selected;
      }

      &.cursor-line-no-selection {
        color: @syntax-gutter-text-color-selected;
      }
    }
  }

  .gutter .line-number.folded,
  .gutter .line-number:after,
  .fold-marker:after {
    color: @syntax-text-color;
  }

  .invisible {
    color: @syntax-text-color;
  }

  .cursor {
    color: @syntax-cursor-color;
    border-left: 2px solid;
  }

  .selection .region {
    background-color: @syntax-selection-color;
  }
}

atom-text-editor .search-results .syntax--marker .region,
atom-text-editor .search-results .syntax--marker .region {
  // background-color: transparent;
  border: 1px solid @syntax-result-marker-color;
}

atom-text-editor .search-results .syntax--marker.current-result .region,
atom-text-editor .search-results .syntax--marker.current-result .region {
  border: 1px solid @syntax-result-marker-color-selected;
}

// Primitives

.syntax--string {
  color: @syntax-text-color-light;
}

// Comments

.syntax--comment {
  color: @syntax-comment-color;
  background-color: @syntax-comment-background-color;
}

// Punctuation

.syntax--punctuation {
  &.syntax--definition {
    &.syntax--comment {
      color: @syntax-comment-delim-color;
    }

    &.syntax--bold {
      color: @syntax-text-color;
      font-weight: bold;
    }

    &.syntax--italic {
      color: @syntax-text-color;
      font-style: italic;
    }
  }

  &.syntax--section.syntax--embedded {
    color: @syntax-text-color;
  }

}

// CSS

.syntax--source.syntax--css {
  .syntax--selector {
    color: @syntax-text-color-dark;
    font-weight: bold;
  }

  .syntax--property-value {
    color: @syntax-text-color-light;
  }
}

// Markdown

.syntax--source.syntax--gfm {
  .syntax--heading.syntax--marker {
    font-weight: normal;
  }

  .syntax--heading {
    color: @syntax-text-color-dark;
    font-weight: bold;
  }
}

// Misc

.syntax--todo,
.syntax--fixme,
.xxx {
  color: @syntax-text-color-dark;
  margin-right: 3px;
}

// Bracket matcher

.bracket-matcher {
  border-bottom: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.0);
}

atom-text-editor.editor  .bracket-matcher .region {
  border-bottom: none;
  background-color: @bracket-match-color;
  border-bottom: 1px solid darken(@bracket-match-color, 50%);
}

// Tab coloring

.tab-bar .syntax--tab[data-type="TextEditor"]::after {
  background-color: fade(@white, 15%);
}
