@external rstudio-themes-dark;
@external rstudio-themes-default, rstudio-themes-dark-grey, rstudio-themes-alternate;

@external editor_dark, ace_editor_theme;

@eval THEME_DEFAULT_BACKGROUND org.rstudio.core.client.theme.ThemeColors.defaultBackground;
@eval THEME_DARKGREY_BACKGROUND org.rstudio.core.client.theme.ThemeColors.darkGreyBackground;
@eval THEME_ALTERNATE_BACKGROUND org.rstudio.core.client.theme.ThemeColors.alternateBackground;
@eval THEME_DEFAULT_BORDER org.rstudio.core.client.theme.ThemeColors.defaultBorder;
@eval THEME_DARKGREY_BORDER org.rstudio.core.client.theme.ThemeColors.darkGreyBorder;
@eval THEME_ALTERNATE_BORDER org.rstudio.core.client.theme.ThemeColors.alternateBorder;

@eval THEME_DARK_ROW_SELECTED org.rstudio.core.client.theme.ThemeColors.darkRowSelected;
@eval THEME_DARK_ROW_HOVERED org.rstudio.core.client.theme.ThemeColors.darkRowHovered;

span.status {
   white-space: nowrap;
}
span.status img:first-child {
   margin-right: 6px;
}

.cellTableCell:first-child img {
   position: relative;
   top: 3px;
}
.cellTableCell:first-child+.cellTableCell img {
   position: relative;
   top: 1px;
}

.cellTableCell input[type=checkbox] {
   margin-top: 0;
   margin-bottom: 0;
}

.rstudio-themes-dark .cellTableSortableHeader {
   color: white;
}

.cellTableSortableHeader img {
   background-size: 7px 4px !important;
   background-position: 2px 1px !important;
}

.cellTableSortableHeader > div {
   padding-left: 13px !important;
}

.cellTableSortableHeader {
   border-top: none;
   border-left: none;
}

.cellTableSortableHeader:last-child {
   border-right: none;
}

.rstudio-themes-default .cellTableSortableHeader {
   background: THEME_DEFAULT_BACKGROUND;
   border-color: THEME_DEFAULT_BORDER;
}

.rstudio-themes-dark-grey .cellTableSortableHeader {
   background: THEME_DARKGREY_BACKGROUND;
   border-color: THEME_DARKGREY_BORDER;
}

.rstudio-themes-alternate .cellTableSortableHeader {
   background: THEME_ALTERNATE_BACKGROUND;
   border-color: THEME_ALTERNATE_BORDER;
}

.editor_dark .ace_editor_theme .cellTableSelectedRow {
   background-color: THEME_DARK_ROW_SELECTED;
}

.editor_dark .ace_editor_theme .cellTableHoveredRow {
   background-color: THEME_DARK_ROW_HOVERED;
}

.editor_dark .ace_editor_theme .cellTableSelectedRow.cellTableHoveredRow {
   background-color: THEME_DARK_ROW_SELECTED;
}
