// stylesheets.css

@import "./Variables.scss";
@import "Icons.scss";
@import "JSToolbar.scss";
@import "Widget.scss";

html, body {
  min-height: 100vh;
}
html {
  overflow-y: scroll;
}
body {
  font-family: "Helvetica Neue", Helvetica, Verdana, sans-serif;
  color: $color_indigo;
  margin: 0;
  padding: 0;
  min-width: 900px;
  letter-spacing: .07em;
}

#content h1, h2, h3, h4 {
  color: $color_indigo;
  font-weight: normal;
}
h2, .wiki h1 {
  font-size: 1.8em;
}
h3, .wiki h2 {
  font-size: 1.5em;
}
h4, .wiki h3 {
  font-size: 1.3em;
}
pre, code {
  font-family: monospace;
}
p {
  line-height: 1.5em;
}
li {
  line-height: 1.5em;
}

/***** Layout *****/
#wrapper {
  min-height: inherit;
  background: $color_page_back;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#top-menu {
  background: $color_indigo_dark;
  color: $color_white;
  height: 1.6em;
  font-size: .7em;
  padding: .34em .2em 0 .6em;
}
#top-menu ul {
  margin: 0;
  padding: 0;
}
#top-menu li {
  float: left;
  list-style-type: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
#top-menu a {
  color: $color_white;
  margin-right: .6em;
  text-decoration: none;

  &:hover {
    color: $color_yellow;
  }
}
// Menu icons
#top-menu {
  .home:before {
    @include iconbase();
    @include icon($icon_home, $color_yellow);
  }

  .my-page:before {
    @include iconbase();
    @include icon($icon_user, $color_yellow);
  }

  .projects:before {
    @include iconbase();
    @include icon($icon_app, $color_yellow);
  }

  .administration:before {
    @include iconbase();
    @include icon($icon_config, $color_yellow);
  }

  .help:before {
    @include iconbase();
    @include icon($icon_help_2, $color_yellow);
  }
}
#top-menu #loggedas {
  float: right;
  margin-right: .5em;
  color: $color_white;

  .user:before {
    @include iconbase();
    @include icon($icon_user, $color_yellow);
  }
}

#account {
  float: right;

  .my-account:before {
    @include iconbase();
    @include icon($icon_config, $color_yellow);
  }

  .login:before {
    @include iconbase();
    @include icon($icon_arrow_right, $color_yellow);
  }

  .logout:before {
    @include iconbase();
    @include icon($icon_arrow_left, $color_yellow);
  }
}

#header {
  min-height: 6em;
  margin: 0;
  background-color: $color_indigo;
  color: $color_white;
  position: relative;
}
#header a {
  color: $color_gray_light_c;
}
#header h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  padding: .5em 0 0 .3em;
  font-size: 1.6em;
  font-weight: normal;

  &:before {
    @include iconbase();
    @include icon($icon_app, $color_red);
  }
}
#header h1 .breadcrumbs {
  display: inline-block;
  font-size: .6em;
  font-weight: normal;

  a {
    color: $color_white;

    &:hover {
      color: $color_red;
    }
  }
}

#header h1 .current-project {
  margin-left: .2em;
}

#quick-search {
  float: right;
  margin: 1em .8em 0 0;
  font-size: .9em;

  input[type="text"] {
    box-sizing: border-box;
    padding: .3em .5em;
    border: solid 1px $color_white;
    border-radius: .2em;
    color: $color_indigo;
  }

  select {
    color: $color_indigo;
  }

  a {
    color: $color_white;

    &:hover {
      color: $color_red;
    }
  }
}
#quick-search #q {
  width: 130px;
  height: 24px;
  box-sizing: border-box;
  vertical-align: middle;
}

#main-menu {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: $color_indigo_light;
  font-size: .8em;
}
#main-menu ul {
  margin: 0;
  padding: 0;
  width: 100%;
  white-space: nowrap;
}
#main-menu li {
  float: none;
  list-style-type: none;
  white-space: nowrap;
  display: inline-block;
}
#main-menu li a {
  display: block;
  border-top: solid 2px $color_indigo_light;
  border-bottom: solid 2px $color_indigo_light;
  color: $color_gray;
  text-decoration: none;
  padding: .5em 1em;
}
#main-menu li a:hover {
  border-top: solid 2px $color_yellow;
  color: $color_white;
}
#main-menu li:hover ul.menu-children, #main-menu li ul.menu-children.visible {
  display: block;
}
#main-menu li a.selected, #main-menu li a.selected:hover {
  border-top: solid 2px $color_red;
  color: $color_white;
}
//#main-menu li a.new-object {
//}
#main-menu .menu-children {
  display: none;
  position: absolute;
  width: inherit;
  z-index: 45;
  background-color: $color_white;
  border-right: 1px solid $color_blue_light;
  border-bottom: 1px solid $color_blue_light;
  border-left: 1px solid $color_blue_light;
}
#main-menu .menu-children li {
  float: left;
  clear: both;
  width: 100%;
}
#main-menu .menu-children li a {
  color: $color_indigo;
  background-color: $color_white;
  font-weight: normal;
  border-top: none;
  border-bottom: none;

  &:hover {
    color: $color_white;
    background-color: $color_blue_light;
  }
}

#main-menu .tabs-buttons {
  right: 6px;
  background-color: transparent;
  border-bottom-color: transparent;
}

#admin-menu ul {
  margin: 0;
  padding: 0;
}
#admin-menu li {
  margin: 0;
  padding: 0 0 6px 0;
  list-style-type: none;
}

#main {
  flex-grow: 2;
  display: flex;
  flex-direction: row-reverse;
  background-color: $color_gray_light_b;
}

#sidebar{
  flex-shrink: 0;
  padding-left: 20px;
  background: #EEEEEE;
  border-left: 1px solid #ddd;
}
@media screen and (min-width: 0px) and (max-width: 1089px) {
  #sidebar{
    width: 22%;
  }
}
@media screen and (min-width: 1090px) and (max-width: 1279px) {
  #sidebar{
    width: 240px;
  }
}
@media screen and (min-width: 1280px) and (max-width: 1599px) {
  #sidebar{
    width: 280px;
  }
}
@media screen and (min-width: 1600px) and (max-width: 1919px) {
  #sidebar{
    width: 320px;
  }
}
@media screen and (min-width: 1920px) and (max-width: 2559px) {
  #sidebar{
    width: 360px;
  }
}
@media screen and (min-width: 2560px) {
  #sidebar{
    width: 380px;
  }
}
#sidebar h3 {
  font-size: 1.2em;
  margin: .5em 0 .5em;
  padding: 0;
  color: $color_gray_dark;
}
#sidebar hr {
  width: 100%;
  margin: 0 auto;
  height: 1px;
  background: $color_gray_light_a;
  border: 0;
}
* html #sidebar hr {
  width: 95%;
  position: relative;
  left: -6px;
  color: $color_gray_light_a;
}
#sidebar .contextual {
  margin-right: 1em;
}
#sidebar ul, ul.flat {
  margin: 0;
  padding: 0;
}
#sidebar ul li, ul.flat li {
  list-style-type: none;
  margin: 0 .1em 0 0;
  padding: 0;
}
#sidebar div.wiki ul {
  margin: inherit;
  padding-left: 1em;
}
#sidebar div.wiki ul li {
  list-style-type: inherit;
}
#sidebar a.icon-only {
  opacity: 0.4;
  margin-left: 5px;
}
#sidebar a.icon-only:hover {
  opacity: 1;
}
#sidebar span.icon-warning {
  margin-left: 5px;
}
#sidebar li input[type=checkbox] {
  height: 20px;
}

#content {
  flex-grow: 1;
  background-color: $color_page_back;
  margin: 0px;
  padding: .5em 1em;
  overflow-x: auto;
}

#main.nosidebar #sidebar {
  display: none;
}

#footer {
  clear: both;
  border-top: 1px solid $color_gray_light_a;
  font-size: .9em;
  color: $color_gray_dark;
  padding: 5px;
  text-align: center;
}

#login-form {
  margin: 5em auto 2em auto;
  padding: 20px;
  width: 100%;
  max-width: 480px;
  border: 1px solid $color_orange;
  background-color: $color_orange_light;
  border-radius: 4px;
  box-sizing: border-box;
}
#login-form label {
  display:block;
  margin-bottom:5px;
  font-weight:bold;
}
#login-form label[for=autologin] {
  font-weight:normal;
}
#login-form input {
  height: 29px;
}
#login-form input[type=text], #login-form input[type=password], #login-form input[type=submit] {
  display: block;
  width: 100%;
}
#login-form input[type=text], #login-form input[type=password] {
  margin-bottom: 15px;
}
#login-form a.lost_password {
  float: right;
  font-weight: normal;
}
#login-form h3 {
  text-align: center;
}

div.modal {
  z-index: 50;
  padding: 4px;
  border-radius: 5px;
  background: $color_white;
}
div.modal h3.title {
  display: none;
}
div.modal p.buttons {
  text-align: right;
  margin-bottom: 0;
}
div.modal .box p {
  margin: 0.3em 0;
}

.clear:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}

.mobile-show {
  display: none;
}
.hidden {
  display: none;
}
.inline-flex {
  display: inline-flex;
}

/***** Links *****/
a, a:link, a:visited {
  text-decoration: none;
  color: $color_blue;
}
a:hover, a:active {
  color: $color_red;
}
a img {
  border: 0;
}

a.issue.closed, a.issue.closed:link, a.issue.closed:visited {
  color: $color_gray;
  text-decoration: line-through;
}
a.project.closed, a.project.closed:link, a.project.closed:visited {
  color: $color_gray;
}
a.user.locked, a.user.locked:link, a.user.locked:visited {
  color: $color_gray;
}
a.user.user-mention {
  background-color: #DDEEFF;
  padding: 0.2rem;
  border-radius: 0.2rem;
}

#sidebar a.selected {
  line-height: 1.7em;
  padding: .2em 1em;
  color: $color_red;
  border-radius: .2em;
}
#sidebar a.selected:hover {
  text-decoration: none;
}
#sidebar .query.default {
  font-weight: bold;
}
#admin-menu a {
  line-height: 1.7em;

  // Redmine default ( for plugin menu )
  background-position: 0% 40%;
  background-repeat: no-repeat;
  padding-left: 24px;
  padding-top: 2px;
  padding-bottom: 3px;

  // Override icon fonts, disable left padding.
  &.icon-projects, &.icon-user,
  &.icon-group, &.icon-roles,
  &.icon-issue, &.icon-issue-edit,
  &.icon-workflows, &.icon-custom-fields,
  &.icon-list, &.icon-settings,
  &.icon-server-authentication, &.icon-plugins,
  &.icon-help {
    padding: 0;
  }
}

a.collapsible:before {
  @include iconbase();
  @include icon($icon_toggle_plus, $color_gray);
}
a.collapsible.collapsed {
  @include iconbase();
  @include icon($icon_toggle_minus, $color_gray);
}

a#toggle-completed-versions {
  color: $color_gray;
}

/***** Dropdown *****/
.drdn {
  position: relative;
}
.drdn-trigger {
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  font-size: .8em;
}
.drdn-content {
  display: none;
  position: absolute;
  right: 0px;
  top: 25px;
  min-width: 100px;
  background-color: $color_white;
  border: 1px solid $color_gray_dark;
  color: $color_gray_dark;
  z-index: 99;
}
.drdn.expanded .drdn-content {
  display: block;
}
.drdn-content .quick-search {
  margin: 8px;
}

.drdn-content .autocomplete {
  box-sizing: border-box;
  width: 100% !important;
  height: 28px;
}
.drdn-content .autocomplete:focus {
  border-color: $color_blue_light;
}
.drdn-items {
  max-height: 400px;
  overflow: auto;
}
div + .drdn-items {
  border-top: 1px solid $color_gray_dark;
}
.drdn-items > * {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: .3em .5em;
}
.drdn-items > a:hover {
  text-decoration: none;
}
.drdn-items > *:focus {
  border: 1px dotted $color_gray_dark;
}

.drdn-items.selection > *:before {
  content: ' ';
  display: inline-block;
  line-height: 1em;
  width: 1em;
  height: 1em;
  margin-right: .3em;
  font-weight: bold;
}
.drdn-items.selection>*.selected:before {
  content: "\2713 ";
}
.drdn-items.selection:empty {
  border: none;
}
.drdn-items > span {
  color: $color_gray;
}

.contextual .drdn-content {
  top: 18px;
}
.contextual .drdn-items {
  padding: .2em;
}

.contextual .drdn-items {
  padding: .2em;
  min-width: 160px;
}
.contextual .drdn-items>a {
  padding: .4em .6em;
}
.contextual .drdn-items>a:hover {
  background-color: $color_blue_light;
  color: $color_white;
  border: 1px solid $color_blue;
}

#project-jump.drdn {
  width: 200px;
  display: inline-block;
}
#project-jump .drdn-trigger {
  width: 100%;
  height: 24px;
  display: inline-block;
  padding: 3px 18px 3px 6px;
  margin: 0 !important;
  vertical-align: middle;
  color: $color_gray_dark;
  background: $color_white url(../images/sort_desc.png) no-repeat 97% 50%;
}
#project-jump .drdn.expanded .drdn-trigger {
  background-image: url(../images/sort_asc.png);
}
#project-jump .drdn-content {
  width: 280px;
  background-color: $color_gray_light_b;
}
#project-jump .drdn-items>* {
  color: $color_indigo !important;
}
#project-jump .drdn-items>a:hover {
  background-color: $color_blue_dark;
  color: $color_white !important;
}

/***** Tables *****/
table.list, .table-list {
  border: 1px solid $color_gray_light_a;
  border-collapse: collapse;
  width: 100%;
  margin-bottom: .5em;
  font-size: .9em;
  overflow: hidden;
}
table.list th, .table-list-header {
  border: 1px solid $color_gray_light_a;
  background-color: $color_gray_light_b;
  padding: .3em .5em;
  white-space: nowrap;
  font-weight: normal;
}
table.list th.whitespace-normal {
  white-space: normal;
}
table.list td {
  border: 1px solid $color_gray_light_a;
  text-align: center;
  padding: .3em .5em;

  // Override style of the Icons.styl
  &[class*="icon-"] {
    padding: .3em .5em;
  }
}
table.list td.id {
  width: 2%;
  text-align: center;
}
table.list td.name, table.list td.description, table.list td.subject, table.list td.parent-subject, table.list td.comments, table.list td.roles, table.list td.attachments, table.list td.text,  table.list td.short_description {
  text-align: left;
}

// Custom Field, Since "string" seems to be for short texts, it should be left justified by "text".
table.list td[class^='cf_'].text, table.list td[class*=' cf_'].text {
  text-align: left;
}

table.list td.attachments span {
  display: block; height: 1rem;
}
table.list td.attachments span a.icon-download {
  display: inline-block; visibility: hidden;
}
table.list td.attachments span:hover a.icon-download {
  visibility: visible;
}
table.list td.tick {
  width: 15%;
}
table.list td.checkbox {
  width: 1em;
  padding: .3em;
}
table.list .checkbox input {
  padding: 0;
  height: initial;
}
table.list td.buttons, div.buttons {
  white-space: nowrap;
  text-align: right;
}
table.list td.buttons a, div.buttons a {
  padding-right: .6em;
}
table.list td.buttons a:last-child, div.buttons a:last-child {
  margin-right: 0;
}
table.list td.buttons img, div.buttons img {
  vertical-align: middle;
}
table.list td.reorder {
  width: 15%;
  white-space: nowrap;
  text-align: center;
}
table.list table.progress td {
  padding-right: 0;
}
table.list caption {
  text-align: left;
  padding: .5em .5em .5em 0;
}
table.list tr.overdue td.due_date  {
  color: $color_red;
}
#role-permissions-trackers table.list th {
  white-space: normal;
}

.table-list-cell {
  display: table-cell;
  vertical-align: top;
  padding: .3em;
}
.table-list div.buttons {
  width: 15%;
}

tr.project td.name a {
  white-space: nowrap;
}
tr.project.closed, tr.project.archived {
  color: $color_gray_light_a;
}
tr.project.closed a, tr.project.archived a {
  color: $color_gray_light_a;
}

tr.project.idnt td.name span:before {
  @include iconbase();
  @include icon($icon_chevron_right, $color_gray_dark);
}

tr.issue {
  text-align: center;
  white-space: nowrap;
}
tr.issue td.subject, tr.issue td.parent-subject, tr.issue td.category, td.assigned_to, td.last_updated_by, tr.issue td.string, tr.issue td.text, tr.issue td.list, tr.issue td.relations, tr.issue td.parent {
  white-space: normal;
}
tr.issue td.relations {
  text-align: left;
}
tr.issue td.done_ratio table.progress {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
tr.issue td.relations span {
  white-space: nowrap;
}
table.issues td.block_column {
  color: $color_gray;
  font-size: .9em;
  padding: .5em .5em .5em 3em;
  text-align: left;
  white-space: normal;
}
table.issues td.block_column span {
  font-weight: bold;
  display: block;
  margin-bottom: .2em;
}
table.issues td.block_column pre {
  white-space:normal;
}

// Issue priority colors from Circle Theme (http://www.redminecrm.com/pages/circle-theme)
table.issues {
  .priority-highest {
    color: #900;

    &.odd {
      background-color: #ffe2e2;

      &:hover {
        background-color: #dfeff7;
      }
    }

    &.even {
      background-color: #faefef;

      &:hover {
        background-color: #dfeff7;
      }
    }

    a, &:hover a {
      color: #900;
    }
  }

  .priority-high2 {
    color: #900;

    &.odd {
      background-color: #ffe2e2;

      &:hover {
        background-color: #dfeff7;
      }
    }

    &.even {
      background-color: #faefef;

      &:hover {
        background-color: #dfeff7;
      }
    }

    a, &:hover a {
      color: #900;
    }
  }

  .priority-high3 {
    color: #900;

    &.odd {
      background-color: #ffeeee;

      &:hover {
        background-color: #dfeff7;
      }
    }

    &.even {
      background-color: #fff2f2;

      &:hover {
        background-color: #dfeff7;
      }
    }

    a, &:hover a {
      color: #900;
    }
  }

  .priority-lowest {
    color: #559;

    &.odd {
      background-color: #eaf7ff;

      &:hover {
        background-color: #dfeff7;
      }
    }

    &.even {
      background-color: #f2faff;

      &:hover {
        background-color: #dfeff7;
      }
    }

    a, &:hover a {
      color: #559;
    }
  }
}

tr.idnt td.subject, tr.idnt td.name {
  @include iconbase();
  @include icon($icon_chevron_right, $color_gray_dark);
}
tr.idnt-1 td.subject, tr.idnt-1 td.name {
  padding-left: .5em;
}
tr.idnt-2 td.subject, tr.idnt-2 td.name {
  padding-left: 2em;
}
tr.idnt-3 td.subject, tr.idnt-3 td.name {
  padding-left: 3.5em;
}
tr.idnt-4 td.subject, tr.idnt-4 td.name {
  padding-left: 5em;
}
tr.idnt-5 td.subject, tr.idnt-5 td.name {
  padding-left: 6.5em;
}
tr.idnt-6 td.subject, tr.idnt-6 td.name {
  padding-left: 8em;
}
tr.idnt-7 td.subject, tr.idnt-7 td.name {
  padding-left: 9.5em;
}
tr.idnt-8 td.subject, tr.idnt-8 td.name {
  padding-left: 11em;
}
tr.idnt-9 td.subject, tr.idnt-9 td.name {
  padding-left: 12.5em;
}

table.issue-report {
  table-layout: fixed;
}

tr.entry {
  border: 1px solid $color_gray_light_b;
}
tr.entry td {
  white-space: nowrap;
  padding: .2em .5em;
}
tr.entry td.filename {
  width: 30%;
  text-align: left;
}
tr.entry td.filename_no_report {
  width: 70%;
  text-align: left;
}
tr.entry td.size {
  text-align: right;
  font-size: 90%;
}
tr.entry td.revision, tr.entry td.author {
  text-align: center;
}
tr.entry td.age {
  text-align: right;
}
tr.entry.file td.filename a {
  margin-left: 1.3em;
}
tr.entry.file td.filename_no_report a {
  margin-left: 1.3em;
}

tr span.expander:before, .gantt_subjects div > span.expander:before {
  cursor: pointer;
}
.gantt_subjects div > span.expander {
  padding-left: 12px;
}
.gantt_subjects div > span .icon-gravatar {
  float: none;
}

tr.changeset {
  height: 20px;
}
tr.changeset ul, ol {
  margin-top: 0;
  margin-bottom: 0;
}
tr.changeset td.revision_graph {
  width: 15%;
  background-color: $color_gray_light_c;
}
tr.changeset td.author {
  text-align: center;
  width: 15%;
  white-space: nowrap;
}
tr.changeset td.committed_on {
  text-align: center;
  width: 15%;
  white-space: nowrap;
}

table.files tbody th {
  text-align: left;
}
table.files tr.file td.filename {
  text-align: left;
  padding-left: 24px;
}
table.files tr.file td.digest {
  font-size: .8em;
}

table.members td.roles, table.memberships td.roles {
  width: 45%;
}
table.members td.buttons {
  text-align: left;
  width: 1px;
  white-space: nowrap;
}

table.members {
  td.name {
    padding-left: 20px;
  }

  td.group, td.groupnonmember, td.groupanonymous {
    &:before {
      @include iconbase();
      @include icon($icon_group, $color_green);
    }
  }
}

table.messages td.last_message {
  text-align: left;
}
tr.message {
  height: 2.6em;
}
tr.message td.created_on {
  white-space: nowrap;
}
tr.message td.last_message {
  font-size: .8em;
  white-space: nowrap;
}
tr.message.sticky td.subject {
  font-weight: bold;
}

body.avatars-on #replies .message.reply {
  padding-left: 32px;
}
#replies .reply:target h4.reply-header {
  background-color: $color_blue_light;;
}
#replies h4 img.gravatar {
  margin-left :-32px;
}

tr.version.closed, tr.version.closed a {
  color: $color_gray;
}
// No icon margin is required to display the icon font.
// tr.version td.name {
//  padding-left: 20px;
// }
tr.version td.date, tr.version td.status, tr.version td.sharing {
  text-align: center;
  white-space: nowrap;
}

tr.member td.icon-user, #principals_for_new_member .icon-user {
  background: transparent;
}

tr.user td {
  width: 13%;
  white-space: nowrap;
}
td.username, td.firstname, td.lastname, td.email {
  text-align: left !important;
}
tr.user td.email {
  width: 18%;
}
tr.user.locked, tr.user.registered {
  color: $color_gray;
}
tr.user.locked a, tr.user.registered a {
  color: $color_gray;
}

table.permissions td.role {
  color: $color_gray;
  font-size: .9em;
  font-weight: normal !important;
  text-align: center;
  vertical-align: bottom;
}
table.permissions tr.group>td:nth-of-type(1),
table.tracker-summary tr.group>td:nth-of-type(1) {
  font-weight: bold;
}

tr.wiki-page-version td.updated_on, tr.wiki-page-version td.author {
  text-align: center;
}

tr.time-entry {
  text-align: center;
  white-space: nowrap;
}
tr.time-entry td.issue, tr.time-entry td.comments, tr.time-entry td.subject, tr.time-entry td.activity, tr.time-entry td.project {
  text-align: left;
  white-space: normal;
}
td.hours {
  text-align: right;
  font-weight: bold;
  padding-right: .5em;
}
td.hours .hours-dec {
  font-size: .9em;
}

table.plugins td {
  vertical-align: middle;
}
table.plugins td.configure {
  text-align: right;
  padding-right: 1em;
}
table.plugins span.name {
  font-weight: bold;
  display: block;
  margin-bottom: 6px;
}
table.plugins span.description {
  display: block;
  font-size: .9em;
}
table.plugins span.url {
  display: block;
  font-size: 0.9em;
}

table.list.enumerations {
  table-layout: fixed;
  margin-bottom: 2em;
}

tr.group td {
  padding: .8em 0 .5em .3em;
  border-bottom: 1px solid $color_gray;
  text-align: left;
  background-color: $color_white;
}
tr.group span.count {
  top:-1px;
}
tr.group span.name {
  font-weight: bold;
}
tr.group span.totals {
  color: $color_gray;
  font-size: .8em;
}
tr.group span.totals .value {
  font-weight: bold;
  color: $color_gray_dark;
}
tr.group a.toggle-all {
  color: $color_gray;
  font-size: .8em;
  font-weight: normal;
  display: none;
}
tr.group:hover a.toggle-all {
  display: inline;
}
a.toggle-all:hover {
  text-decoration: none;
}

table.list tbody tr.group:hover {
  background-color: inherit;
}

table td {
  padding: 2px;
}
table p {
  margin: 0;
}

table.list:not(.odd-even) tbody tr:nth-child(odd), .odd, #issue-changesets div.changeset:nth-child(odd) {
  background-color: $color_gray_light_c;
}
table.list:not(.odd-even) tbody tr:nth-child(even), .even, #issue-changesets div.changeset:nth-child(even) {
  background-color: $color_white;
}
table.list:not(.odd-even) tbody tr:nth-child(odd):hover, .odd:hover, #issue-changesets div.changeset:nth-child(odd):hover,
table.list:not(.odd-even) tbody tr:nth-child(even):hover, .even:hover, #issue-changesets div.changeset:nth-child(even):hover {
  background-color:$color_yellow_light;
}

tr.builtin td.name {
  font-style: italic;
}

/* These settings are unnecessary because the icon font is used
a.sort {
  padding-right: 16px;
  background-position: 100% 50%;
  background-repeat: no-repeat;
}
*/

table.boards a.board, h3.comments {
  &:before {
    @include iconbase();
    @include icon($icon_message, $color_blue);
  }
}
table.boards td.last-message {
  text-align: left;
  font-size: 80%;
}

div.table-list.boards .table-list-cell.name {
  width: 30%;
}

#query_form_content {
  font-size: .9em;
}
#query_form_with_buttons > p.contextual {
  font-size: 1em;
  margin:1em 0;
}

.query_sort_criteria_count {
  display: inline-block;
  min-width: 1em;
}

.query-columns>span {
  display:inline-block;
  height:100%;
  vertical-align: middle;
}
.query-columns label {
  display:block;
}
.query-columns .buttons input[type=button] {
  width:3em;
  display:block;
}
.query-columns select {
  min-width: 10em;
}

.query-totals {
  text-align:right;
  margin-top:-2.3em;
}
.query-totals > span:not(:first-child) {
  margin-left: .6em;
}
.query-totals .value {
  font-weight: bold;
}
body.controller-timelog .query-totals {
  margin-top:initial;
}

td.center {
  text-align: center;
}

#watchers select {
  width: 95%;
  display: block;
}
#watchers img.gravatar {
  margin: 0 4px 2px 0;
}
#users_for_watcher img.gravatar {
  padding-bottom: 2px; margin-right: 4px;
}

span#watchers_inputs {
  overflow: auto;
  display: block;
}
span.search_for_watchers {
  display: block;
}
span.search_for_watchers, span.add_attachment {
  line-height: 2.5em;
}
span.add_attachment a:before {
  @include iconbase();
  @include icon($icon_add, $color_green);
}

input:disabled, select:disabled, textarea:disabled {
  cursor: not-allowed;
  color: graytext;
  background-color: #ebebe4;
}

.highlight {
  background-color: #FCFD8D;
}
.highlight.token-1 {
  background-color: #faa;
}
.highlight.token-2 {
  background-color: #afa;
}
.highlight.token-3 {
  background-color: #aaf;
}

.box {
  margin-bottom: 1em;
  padding: .5em;
  background-color: $color_gray_light_c;
  border: 1px solid $color_gray_light_a;
  line-height: 1.5em;
  word-wrap: break-word;
  font-size: .9em;
}
#content .box h3 {
  margin: .2em 0 .5em 0;
}
div.square {
  border: 1px solid $color_gray_dark;
  float: left;
  margin: .3em .4em 0 .4em;
  overflow: hidden;
  width: .6em;
  height: .6em;
}
.contextual {
  float: right;
  white-space: nowrap;
  line-height: 1.4em;
  margin-top: 5px;
  padding-left: 10px;
  font-size: .9em;
}
.contextual .icon {
  padding-top: 2px;
  padding-bottom: 3px;
}
.contextual input, .contextual select {
  font-size: .9em;
}
.message .contextual {
  margin-top: 0;
}

.splitcontent {
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
}
.splitcontentleft {
  flex: 1;
  margin-right: 5px;
}
.splitcontentright {
  flex: 1;
  margin-left: 5px;
}
.splitcontenttop {
  flex: 2;
  flex-basis: 100%;
}

form {
  display: inline;
}

input, select, button {
  vertical-align: middle;
  margin-top: 1px;
  margin-bottom: 1px;
  padding: .3em;
}
input, select, textarea, button {
  color: $color_text;
  background-color: $color_white;
  border:1px solid $color_gray;
  border-radius: .2em;
  box-sizing: border-box;
}
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  -ms-appearance: none;
  -o-appearance: none;
  appearance: none;
  background-color: $color_white;
  // The select element cannot specify a pseudo element and cannot use icon fonts. Use images for Redmine default
  background-image: url(../images/arrow_down.png);
  background-repeat: no-repeat;
  background-position: calc(100% - 7px) 50%;
  padding-right: 20px;
}
input[type="file"] {
  border: 0;
  padding-left: 0;
  padding-right: 0;
  height: initial;
  background-color: initial;
}
input[type="submit"], button[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
  background-color: $color_white;
  height: initial;
  -webkit-transition: background-color 100ms linear;
  -moz-transition: background-color 100ms linear;
  -o-transition: background-color 100ms linear;
  transition: background-color 100ms linear;
}
input[type="submit"]:hover, button[type="submit"]:hover {
  background-color: $color_gray_light_a;
}

input[type="text"]:focus, input[type="text"]:active,
input[type="password"]:focus, input[type="password"]:active,
input[type="date"]:focus, input[type="date"]:active,
input[type="number"]:focus, input[type="number"]:active,
select:focus, select:active,
textarea:focus, textarea:active {
  border: 1px solid $color_blue;
  outline: none;
}

input:placeholder-shown {
  text-overflow: ellipsis;
}

select[multiple=multiple] {
  background: $color_white;
  padding-right: initial;
  height: auto;
}

fieldset {
  border: 1px solid $color_gray;
  margin:0;
  min-width: inherit;
}

legend {
  color: $color_gray_dark;
  padding: 0 .2em;
}
hr {
  width: 100%;
  height: 1px;
  background: $color_gray_light_a;
  border: 0;
}
blockquote {
  border-left: 2px solid $color_gray;
  margin: 1em;
  color: $color_gray;
}
blockquote blockquote {
  margin-left: 0;
}
.wiki blockquote p {
  margin-right: 0;
}

abbr, span[title] {
  border-bottom: 1px dotted $color_gray_light_a;
  cursor: pointer;
}
textarea.wiki-edit {
  width: 99%;
  resize:vertical;
  box-sizing: border-box;
}
body.textarea-monospace textarea.wiki-edit {
  font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;
}
body.textarea-proportional textarea.wiki-edit {
  font-family: Verdana, sans-serif;
}
li p {
  margin-top: 0;
}
div.issue {
  background: $color_yellow_light;
  padding: .5em;
  //padding: 0;
  margin-bottom: .5em;
  border-radius: .2em;
  border: 1px solid $color_gray_light_a;
}
p.breadcrumb {
  font-size: .9em;
  margin: 4px 0 4px 0;
}
p.subtitle {
  font-size: .9em;
  margin: -6px 0 12px 0;
  font-style: italic;
}
p.footnote {
  font-size: .9em;
  margin-top: 0;
  margin-bottom: 0;
}
.wiki-class-ltr {
  direction:ltr !important;
}
.wiki-class-rtl {
  direction:rtl !important;
}

div.issue div.subject div div {
  padding-left: 16px;
  word-break: break-word;
}
div.issue div.subject p {
  margin: 0;
  margin-bottom: .1em;
  font-size: 90%;
  color: $color_gray;
}
div.issue div.subject > div > p {
  margin-top: .5em;
}
div.issue div.subject h3 {
  margin: 0;
  margin-bottom: .1em;
}
div.issue p.author {
  margin-top: .5em;
}
div.issue span.private, div.journal span.private {
  font-size: 60%;
}
div.issue .next-prev-links {
  color: $color_gray;
}
div.issue .attributes {
  margin-top: 2em;
}
div.issue .attributes .attribute {
  padding-left: 180px;
  clear: left;
  min-height: 1.8em;
}
div.issue .attributes .attribute .label {
  width: 170px;
  margin-left: -180px;
  font-weight: bold;
  float: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
div.issue .attribute .value {
  overflow: auto;
  text-overflow: ellipsis;
}
div.issue .attribute.string_cf .value .wiki p {
  margin-top: 0;
  margin-bottom: 0;
}
div.issue .attribute.text_cf .value .wiki p:first-of-type {
  margin-top: 0;
}
div.issue.overdue .due-date .value {
  color: $color_red;
}
body.controller-issues h2.inline-flex {
  padding-right: 0;
}

#issue_tree table.issues, #relations table.issues {
  border: 0;
}
#issue_tree td.checkbox, #relations td.checkbox {
  display: none;
}
#issue_tree td.buttons, #relations td.buttons {
  padding:0;
}
#issue_tree .issues-stat, #relations .issues-stat {
  font-size: 80%
}
#issue_tree .issues-stat .badge, #relations .issues-stat .badge {
  bottom: initial;
}
#issue_tree .issue > td, #relations .issue > td, #issue_tree .issue .user {
  text-overflow: ellipsis; /* if text exceeds its space, add ... */
  overflow: hidden;
}
#issue_tree .issue > td.subject, #relations .issue > td.subject {
  width: 100%; /* let subject have one full width column */
  word-break: break-word; /* break word if subject is too long */
  padding-right: 25px; /* this is the spaces that .buttons uses next to subject */
}
#trackers_description {
  display:none;
}
#trackers_description dt {
  font-weight: bold;
  text-decoration: underline;
}
#trackers_description dd {
  margin: 0;
  padding: 0 0 1em 0;
}

#issue-form .assign-to-me-link {
  padding-left: .5em;
}

fieldset.collapsible {
  border-width: 1px 0 0 0;
}
fieldset.collapsible > legend {
  cursor: pointer;
  padding: 0 .2em;
}

fieldset#date-range p {
  margin: 2px 0 2px 0;
}
fieldset#filters table {
  border-collapse: collapse;
}
fieldset#filters table td {
  padding: 0;
  vertical-align: middle;
}
fieldset#filters tr.filter {
  height: 2.1em;
}
fieldset#filters td.field {
  width: 230px;
}
fieldset#filters td.operator {
  width: 130px;
}
fieldset#filters td.operator select {
  max-width: 120px;
}
fieldset#filters td.values {
  white-space: nowrap;
}
fieldset#filters td.values select {
  min-width: 130px;
}

#filters-table {
  width: 60%;
  float: left;
}
.add-filter {
  width: 35%;
  float: right;
  text-align: right;
  vertical-align: top;
}

#issue_is_private_wrap {
  float: right;
  margin-right: 1em;
}
.toggle-multiselect {
  margin-right: .2em;
  cursor:pointer;
}
.buttons {
  font-size: .9em;
  margin-bottom: 1.4em;
  margin-top: 1em;
}
.buttons .icon {
  padding-bottom:3px;
  padding-top:1px;
}

div#issue-changesets {
  float: right;
  width: 45%;
  margin-left: 1em;
  margin-bottom: 1em;
  background: $color_white;
  padding-left: 1em;
  font-size: 90%;
}
div#issue-changesets div.changeset {
  padding: 4px;
  border-bottom: 1px solid $color_gray_light_a;
}
div#issue-changesets p {
  margin-top: 0;
  margin-bottom: 1em;
}
.changeset-comments {
  margin-bottom: 1em;
}

div.journal {
  margin-top: 0;
}
div.journal.private-notes .wiki {
  border-left: 2px solid $color_red;
  padding-left: 4px;
  margin-left: -6px;
}
div.journal ul.details, ul.revision-info {
  color: $color_gray_dark;
  margin-bottom: 1.5em;
}
div.journal ul.details a, ul.revision-info a {
  color: $color_blue_light;
}
div.journal ul.details a:hover, ul.revision-info a:hover {
  color: $color_red;
}
body.avatars-on div.journal {
  padding-left: 32px;
}
div.journal h4 img.gravatar {
  margin-left: -32px;
}

#history .tab-content {
  padding: .5em;
  border-radius: 0 0 .2em .2em / 0 0 .2em .2em;
  border-left: solid 1px $color_gray_light_a;
  border-right: solid 1px $color_gray_light_a;
  border-bottom: solid 1px $color_gray_light_a;
}
h4.note-header {
  margin-top: 0;
  border-bottom: solid 1px $color_gray_light_a;
}
#history div:target h4.note-header {
  border-bottom: double 4px $color_gray_light_a;
}
#history p.nodata {
  display: none;
}
#content #history .tabs {
  margin-bottom: 0;
}

div#activity dl, #search-results {
  margin-left: 2em;
}
div#activity dd, #search-results dd {
  margin-bottom: 1em;
  padding-left: 18px;
  font-size: .9em;
}
div#activity dt.me .time {
  border-bottom: 1px solid $color_gray;
}
div#activity dt .time {
  color: $color_gray_dark;
  font-size: .8em;
}
div#activity dd .description, #search-results dd .description {
  font-style: italic;
}
div#activity span.project:after, #search-results span.project:after {
  content: " -";
}
div#activity dd span.description, #search-results dd span.description {
  display: block;
  color: $color_gray_dark;
}
div#activity dt.grouped {
  margin-left: 5em;
}
div#activity dd.grouped {
  margin-left: 9em;
}
div#activity dt.icon {
  background-position: 0 10px !important;
}
div#activity h3 {
  padding: .3em;
  border-radius: .2em;
  background-color: $color_gray_light_b;
}
div#activity dt {
  padding-top: .5em;
}
div#activity dl dt:first-child {
  border: 0px;
}

#search-results dd {
  margin-bottom: 1em;
  padding-left: 20px;
  margin-left: 0;
}

div#search-results-counts {
  float: right;
}
div#search-results-counts ul {
  margin-top: .5em;
}
div#search-results-counts li {
  list-style-type: none;
  float: left;
  margin-left: 1em;
}

div#roadmap .related-issues {
  margin-bottom: 1em;
}
div#roadmap .related-issues td.checkbox {
  display: none;
}
div#roadmap .related-issues td.assigned_to {
  width:1px;
  white-space:nowrap;
  padding: 0;
}
div#roadmap .related-issues td.assigned_to img {
  padding-left: 4px;
  padding-right: 4px;
}
div#roadmap .wiki h1:first-child {
  display: none;
}
div#roadmap .wiki h1 {
  font-size: 1.2em;
}
div#roadmap .wiki h2 {
  font-size: 1.1em;
}
div#roadmap h2, div#roadmap h3 {
  padding-right: 0;
}
body.controller-versions.action-show div#roadmap .related-issues {
  width: 70%;
}

div#roadmap .version-article {
  padding-bottom: 12px;
}

div#version-summary {
  float: right;
  width: 28%;
  margin-left: 16px;
  margin-bottom: 16px;
  background-color: $color_white;
}
div#version-summary fieldset {
  margin-bottom: 1em;
}
div#version-summary fieldset.time-tracking table {
  width: 100%;
}
div#version-summary th, div#version-summary td.total-hours {
  text-align: right;
}

table#time-report td.hours, table#time-report th.period, table#time-report th.total {
  text-align: right;
  padding-right: .5em;
}

table#time-report tbody tr.subtotal {
  font-style: italic;
  color: $color_gray_dark;
}
table#time-report tbody tr.subtotal td.hours {
  color: $color_gray;
}
table#time-report tbody tr.total {
  font-weight: bold;
  background-color: $color_gray_light_a;
  border-top: 1px solid $color_gray;
}
table#time-report .hours-dec {
  font-size: 0.9em;
}

div.wiki-page .contextual a {
  opacity: 0.4;
}
div.wiki-page .contextual a:hover {
  opacity: 1;
}

div.wiki a:target + h1, div.wiki a:target + h2, div.wiki a:target + h3, div.wiki a:target + h4, div.wiki a:target + h5, div.wiki a:target + h6 {
  background-color: $color_blue_light;
}

.wiki-update-info {
  text-align: right;
  color: $color_gray_dark;
  font-size: 90%;
}

form .attributes select {
  width: 60%;
}
form .attributes select + a.icon-only {
  vertical-align: middle;
  margin-left: .2em;
}
input#issue_subject, input#document_title {
  width: 99%;
}
select#issue_done_ratio {
  width: 95px;
}

ul.projects {
  margin: 0;
  padding-left: 1em;
}
ul.projects ul {
  padding-left: 1.6em;
}
ul.projects.root {
  margin: 0;
  padding: 0;
}
ul.projects li.root, ul.projects li.child {
  list-style-type: none;
}
ul.projects li.root div.archived, ul.projects li.child div.archived {
  color: #aaa;
}
ul.projects div.description li {
  list-style-type: initial;
}

// Disable multi columns, always single columnn (old style).
//#projects-index {
//  column-count: auto;
//  column-width: 400px;
//  -webkit-column-count: auto;
//  -webkit-column-width: 400px;
//  -webkit-column-gap: .5rem;
//  -moz-column-count: auto;
//  -moz-column-width: 400px;
//  -moz-column-gap: 0.5rem;
// margin-bottom: 1.2em;
//}
#projects-index ul.projects li.root > ul.projects {
  padding-left: 1em;
}
#projects-index ul.projects li.root {
  margin-bottom: 1em;
}
#projects-index ul.projects li.child {
  margin-top: 1em;
}
#projects-index ul.projects div.root a.project {
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: bold;
  margin: 0 0 10px 0;
}
#projects-index ul.projects div.description {
  padding-top: 0.5em;
}
#projects-index a.icon-user, a.icon-bookmarked-project {
  padding-left:0;
  padding-right:20px;
  background-position:98% 50%;
}
#projects-index a.icon-user.icon-bookmarked-project {
  background-image: url(../images/tag_blue.png), url(../images/user.png);
  background-position: bottom 0px right 0px, bottom 0px right 20px;
  padding-right: 40px;
  padding-top: 4px;
}

#projects-index ul.projects div.root, div.child {
  border: solid 1px $color_gray_light_a;
}

#projects-index ul.projects .header {
  cursor: pointer;
  padding: .3em;
  border-bottom: solid 1px $color_gray_light_a;
  background-color: $color_gray_light_b;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  &:hover {
    background-color: $color_gray_light_c;
  }

  .expander {
    &:before {
      @include iconbase();
      @include icon($icon_toggle_plus, $color_gray);
   }

    &.expanded:before {
      @include iconbase();
      @include icon($icon_toggle_minus, $color_gray);
    }
  }
}

li.change {
  background-image: none !important;
  padding: 0 0 0 1em !important;

  &:before {
    @include iconbase();
    @include icon($icon_circle, $color_gray_dark);
  }

  &.folder:before {
    @include iconbase();
    @include icon($icon_folder, $color_blue);
  }

  &.folder.change-A:before {
    @include iconbase();
    @include icon($icon_folder, $color_orange);
  }

  &.folder.change-M:before {
    @include iconbase();
    @include icon($icon_folder_add, $color_green);
  }

  &.change-A:before {
    @include iconbase();
    @include icon($icon_add, $color_green);
  }

  &.change-M:before {
    @include iconbase();
    @include icon($icon_circle, $color_orange);
  }

  &.change-C:before {
    @include iconbase();
    @include icon($icon_circle, $color_blue);
  }

  &.change-R:before {
    @include iconbase();
    @include icon($icon_circle, $color_purple);
  }

  &.change-D:before {
    @include iconbase();
    @include icon($icon_delete, $color_red);
  }
}
.my-project:before {
  @include iconbase();
  @include icon($icon_fav, $color_yellow);
}

#notified-projects > ul, #tracker_project_ids > ul, #custom_field_project_ids > ul {
  max-height: 250px;
  overflow-y: auto;
}

ul.subprojects {
  list-style: none;
  display: inline-block;
  padding: 0;
  margin: 0;
}
ul.subprojects li {
  float: left;
}
ul.subprojects li:not(:last-child)::after {
  content: ', ';
  white-space: pre;
}

#related-issues li img {
  vertical-align: middle;
}

ul.properties {
  padding: 0;
  font-size: .9em;
  color: $color_gray_dark;
}
ul.properties li {
  list-style-type: none;
}
ul.properties li span {
  font-style: italic;
}

.total-hours {
  font-size: 1.1em;
  font-weight: bold;
}
.total-hours span.hours-int {
  font-size: 1.2em;
}

.autoscroll {
  overflow-x: auto;
  padding: 1px;
  margin-bottom: 1.2em;
  position: relative;
}
#user_login, #user_firstname, #user_lastname, #user_mail, #my_account_form select, #user_form select {
  width: 90%;
}

#workflow_copy_form select {
  width: 200px;
}
table.transitions td.enabled {
  background: $color_green;
}
#workflow_form table select {
  font-size: .9em;
  max-width: 100px;
}
table.fields_permissions td.readonly {
  background: $color_gray_light_a;
}
table.fields_permissions td.required {
  background: $color_orange_dark;
}

select.expandable {
  vertical-align: top;
}

textarea#custom_field_possible_values {
  width: 95%;
  resize: vertical;
}
textarea#custom_field_default_value {
  width: 95%;
  resize: vertical;
}
.sort-handle {
  display:inline-block;
  vertical-align:middle;
  cursor: move;
}

input#content_comments {
  width: 99%;
}

span.pagination {
  margin-left: 3px;
  color: $color_gray;
  display: block;
}
.pagination ul.pages {
  margin: 0 5px 0 0;
  padding: 0;
  display: inline;
}
.pagination ul.pages li {
  display: inline-block;
  padding: 0;
  border: 1px solid $color_blue;
  margin-left: -1px;
  line-height: 2em;
  margin-bottom: 1em;
  white-space: nowrap;
  text-align: center;
}
.pagination ul.pages li a,
.pagination ul.pages li span {
  padding: .5em;
}
.pagination ul.pages li:first-child {
  border-top-left-radius: .2em;
  border-bottom-left-radius: .2em;
}
.pagination ul.pages li:last-child {
  border-top-right-radius: .2em;
  border-bottom-right-radius: .2em;
}
.pagination ul.pages li.current {
  color: $color_white;
  background-color: $color_blue_light;
  border-color: $color_blue;
}
.pagination ul.pages li.page:hover {
  background-color: $color_blue_light;
  color: $color_white;
}
.pagination ul.pages li.page a:hover,
.pagination ul.pages li.page a:active {
  color: $color_white;
  text-decoration: inherit;
}
.pagination .per-page span.selected {
  font-weight: bold;
}
span.pagination > span {
  white-space: nowrap;
}
.controller-attachments.action-show span.pagination, .controller-repositories.action-entry span.pagination {
  display: block;
  margin-top: 1.2em;
}

#search-form fieldset p {
  margin: .2em 0;
}
#csv-export-options fieldset {
  padding: 0;
}

/***** Tabular forms ******/
.tabular p {
  margin: 0;
  padding: 3px 0 3px 0;

  // width of left column containing the label elements
  padding-left: 180px;

  min-height: 2em;
  clear: left;
}
html > body .tabular p {
  overflow: hidden;
}

.tabular input, .tabular select {
  max-width: 95%;
}
.tabular textarea {
  width: 95%;
  resize: vertical;
}
input#twofa_code, img#twofa_code {
  width: 140px;
}
ul.twofa_backup_codes {
  list-style-type: none;
  padding: 0;
  display: inline-block;
  columns: 14em 2;
}
ul.twofa_backup_codes code {
  font-size: 1em;
  line-height: 2em;
}

.tabular label{
  font-weight: bold;
  float: left;
  text-align: right;
  // width of left column
  margin-left: -180px;
  // width of labels. Should be smaller than left column to create some right margin
  width: 175px;
  line-height: 24px;
}

.tabular label.floating {
  font-weight: normal;
  margin-left: 0;
  text-align: left;
  width: 270px;
}

label.block {
  display: block;
  width: auto !important;
}

.tabular label.block {
  font-weight: normal;
  margin-left: 0px !important;
  text-align: left;
  float: none;
}

.tabular label.inline {
  font-weight: normal;
  float: none;
  margin-left: 5px !important;
  width: auto;
}

.tabular label.error {
  color: $color_red;
}

.tabular label.error + * {
  border: 1px solid;
  color: $color_red;
}

label.no-css {
  font-weight: inherit;
  float: none;
  text-align: left;
  margin-left: 0;
  width: auto;
}
input#time_entry_comments {
  width: 90%;
}
input#months {
  width: 46px;
}

.jstBlock .jstTabs, .jstBlock .wiki-preview {
  width: 99%;
}

.jstBlock .jstTabs {
  padding-right: 6px;
}
.jstBlock .wiki-preview {
  padding: 2px;
}
.jstBlock .wiki-preview p:first-child {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.jstBlock .wiki-preview p:last-child {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.tabular .wiki-preview, .tabular .jstTabs {
  width: 95%;
}
.tabular.settings .wiki-preview, .tabular.settings .jstTabs {
  width: 99%;
}
.tabular.settings .wiki-preview p {
  padding-left: 0 !important
}
.tabular .wiki-preview p {
  min-height: initial;
  padding: 0;
  padding-top: 1em !important;
  padding-bottom: 1em !important;
  overflow: initial;
}

.tabular.settings p {
  padding-left: 24em;
}
.tabular.settings label {
  margin-left: -25em;
  margin-right: .5em;
  padding: 0 0 0 .5em;
  width: 24em;
}
.tabular.settings textarea, .tabular.settings .wiki-preview, .tabular.settings .jstTabs {
  width: 99%;
}

.settings.enabled_scm table {
  width: 100%;
}
.settings.enabled_scm td.scm_name {
  font-weight: bold;
}

fieldset.settings label {
  display: block;
}
fieldset#notified_events .parent {
  padding-left: 20px;
}

span.required {
  color: $color_red;
}
.summary {
  font-style: italic;
}

.check_box_group {
  display: block;
  width: 95%;
  max-height:120px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  background: $color_white;
  border: 1px solid $color_gray;
  border-radius: 2px;
}
.check_box_group label {
  font-weight: normal;
  margin-left: 0 !important;
  text-align: left;
  float: none;
  display: block;
  width: auto;
}
.check_box_group.bool_cf {
  border: 0;
  background: inherit;
}
.check_box_group.bool_cf label {
  display: inline;
}

.attachments_fields input.description, #existing-attachments input.description {
  margin-left: 4px;
  width: 340px;
}
.attachments_fields>span, #existing-attachments>span {
  display: block;
  white-space: nowrap;
}
.attachments_fields input.filename, #existing-attachments .filename {
  border: 0;
  height: 1.8em;
  width: 250px;
  background-color: inherit;

  &:before {
    @include iconbase();
    @include icon($icon_attachment, $color_gray);
  }
}
.tabular input.filename {
  max-width: 75% !important;
}
.attachments_fields input.filename {
  height: 1.8em;
}
.attachments_fields .ajax-waiting input.filename {
  &:before {
    @include iconbase();
    @include icon($icon_hourglass, $color_gray);
  }
}
.attachments_fields .ajax-loading input.filename {
  background: url(../images/loading.gif) no-repeat 0px 50%;
}
.attachments_fields div.ui-progressbar {
  width: 100px;
  height: 14px;
  margin: 2px 0 -5px 8px;
  display: inline-block;
}

a.remove-upload:hover {
  text-decoration: none !important;

  &:before {
    @include iconbase();
    @include icon($icon_trash, $color_gray);
  }
}
.existing-attachment.deleted .filename {
  text-decoration: line-through;
  color: $color_gray !important;
}

div.fileover, p.custom-field-filedroplistner.fileover {
  background-color: lavender;
}

div.attachments p {
  margin: 4px 0 2px 0;
}
div.attachments img {
  vertical-align: middle;
}
div.attachments span.author {
  color: $color_gray;
}
div.attachments table {
  // Release the float of `.contextual` and adjust the position of edit icon.
  clear: both;
}
div.attachments td {
  // Fix a problem of non line break
  word-break: break-all;
}

div.thumbnails {
  margin: .6em;
}
div.thumbnails div {
  border: 2px solid $color_gray;
  display: inline-block;
  margin-right: 2px;
}
div.thumbnails img {
  margin: 3px;
  vertical-align: middle;
}
#history div.thumbnails {
  margin-left: 2em;
}

p.other-formats {
  text-align: right;
  font-size: .9em;
}
.other-formats span + span:before {
  content: "| ";
}

a.atom:before {
  @include iconbase();
  @include icon($icon_feed, $color_orange);
}
a.csv:before {
  @include iconbase();
  @include icon($icon_file_text, $color_green);
}
a.png:before {
  @include iconbase();
  @include icon($icon_file_image, $color_orange);
}
a.pdf:before {
  @include iconbase();
  @include icon($icon_file_pdf, $color_red);
}
a.html:before {
  @include iconbase();
  @include icon($icon_file_text, $color_red);
}
a.txt:before {
  @include iconbase();
  @include icon($icon_file_text, $color_blue);
}

em.info {
  font-style:normal;
  display:block;
  color: $color_gray;
}
em.info.error:before {
  @include iconbase();
  @include icon($icon_error, $color_red);
}

textarea.text_cf {
  width: 95%;
  resize: vertical;
}
input.string_cf, input.link_cf {
  width: 95%;
}
select.bool_cf {
  width: auto !important;
}

#tab-content-modules fieldset p {
  margin: 3px 0 4px 0;
}

#tab-content-users .splitcontentleft {
  width: 64%;
}
#tab-content-users .splitcontentright {
  width: 34%;
}
#tab-content-users fieldset {
  padding: 1em;
  margin-bottom: 1em;
}
#tab-content-users fieldset label {
  display: block;
}
#tab-content-users #principals {
  max-height: 400px;
  overflow: auto;
}

#users_for_watcher {
  height: 200px;
  overflow: auto;
}
#users_for_watcher label {
  display: block;
}

input#principal_search, input#user_search {
  width: 90%;
}
.roles-selection label {
  display: inline-block;
  width: 210px;
}

input.autocomplete {
  &:before {
    @include iconbase();
    @include icon($icon_search, $color_blue);
  }
}
input.autocomplete.ajax-loading {
  background-image: url(../images/loading.gif);
  background-repeat: no-repeat;
  background-position: right center;
}

.role-visibility {
  padding-left: 2em;
}

.objects-selection {
  height: 300px;
  overflow: auto;
  margin-bottom: 1em;
}

.objects-selection label {
  display: block;
}

.objects-selection > div, #user_group_ids {
  column-count: auto;
  column-width: 200px;
  -webkit-column-count: auto;
  -webkit-column-width: 200px;
  -webkit-column-gap: .5rem;
  -webkit-column-rule: 1px solid $color_gray_light_a;
  column-gap: .5rem;
  -moz-column-count: auto;
  -moz-column-width: 200px;
  -moz-column-gap: .5rem;
  -moz-column-rule: 1px solid $color_gray_light_a;
  column-rule: 1px solid $color_gray_light_a;
}

/***** Flash & error messages ****/
#errorExplanation, div.flash, .nodata, .warning, .conflict {
  margin-bottom: 1em;
  padding: .2em .2em .2em 1em;
  border: 2px solid !important;
}

div.flash {
  margin-top: 1em;
  background: initial !important;
  font-size: initial !important;
}

div.flash.error, #errorExplanation {
  background-color: $color_red_light !important;
  border-color: $color_red !important;
  color: $color_red_dark !important;

  &:before {
    @include iconbase();
    @include icon($icon_error, $color_red);
  }
}

div.flash.notice {
  background-color: $color_green_light !important;
  border-color: $color_green !important;
  color: $color_green_dark !important;

  &:before {
    @include iconbase();
    @include icon($icon_check, $color_green);
  }
}

div.flash.warning, .conflict {
  background-color: $color_yellow_light !important;
  border-color: $color_yellow !important;
  color: $color_yellow_dark !important;
  text-align: left;

  &:before {
    @include iconbase();
    @include icon($icon_warning, $color_yellow);
  }
}

div.flash.tip:before {
  @include iconbase();
  @include icon($icon_message, $color_indigo);
}

.nodata, .warning {
  text-align: center;
  background-color: $color_yellow_light;
  border-color: $color_yellow;
  color: $color_yellow_dark;
}

#errorExplanation ul {
  font-size: .9em;
}
#errorExplanation h2, #errorExplanation p {
  display: none;
}

.conflict-details {
  font-size: 80%;
}

/***** Ajax indicator ******/
#ajax-indicator {
  position: absolute; // fixed not supported by IE
  background-color: $color_gray_light_c;
  border: 1px solid $color_gray;
  top: 35%;
  left: 40%;
  width: 20%;
  font-weight: bold;
  text-align: center;
  padding: .6em;
  z-index: 100;
  opacity: 0.5;
}

html > body #ajax-indicator {
  position: fixed;
}

#ajax-indicator span {
  background-position: 0% 40%;
  background-repeat: no-repeat;
  background-image: url(../images/loading.gif);
  padding-left: 26px;
  vertical-align: bottom;
}

/***** Calendar *****/
table.cal {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 6px 0;
  border: 1px solid $color_gray_light_a;
  border-radius: .2em;
  font-size: .8em;
}
table.cal thead th {
  width: 14%;
  background-color: $color_gray_light_b;
  padding: 4px;
  font-weight: normal;
}
table.cal thead th.week-number {
  width: auto;
}
table.cal tbody tr {
  height: 100px;
}
table.cal td .icon {
  padding-top: 2px;
  padding-bottom: 3px;
}
table.cal td {
    border: 1px solid $color_gray_light_a;
    vertical-align: top;
}
table.cal td.week-number {
  background-color: $color_gray_light_b;
  padding: 4px;
  border: none;
  font-size: 1em;
  text-align: center;
  vertical-align: middle;
}
table.cal td p.day-num {
  font-size: 1.1em;
  text-align: right;
}
table.cal td.odd p.day-num {
  color: $color_gray;
}
table.cal td.today {
  background: $color_yellow_light;
}
table.cal td.today p.day-num {
  font-weight: bold;
}
table.cal td.nwday:not(.odd) {
  background-color: $color_gray_light_c;
}
table.cal .starting a.issue, p.cal.legend .starting {
  &:before {
    @include iconbase();
    @include icon($icon_arrow_right, $color_green);
  }
}
table.cal .ending a.issue, p.cal.legend .ending {
  &:before {
    @include iconbase();
    @include icon($icon_arrow_left, $color_red);
  }
}
table.cal .starting.ending a.issue, p.cal.legend .starting.ending {
  &:before {
    @include iconbase();
    @include icon($icon_circle, $color_blue);
  }
}
p.cal.legend span {
  display: block;
}

/***** Tooltips ******/
.tooltip{
  position: relative;
  z-index: 24;
}
.tooltip:hover{
  z-index: 25;
  color: $color_black;
}
.tooltip span.tip{
  display: none;
  text-align: left;
}
.tooltip span.tip a {
  color: $color_blue_dark !important;
}

.tooltip span.tip img.gravatar {
  float: none;
  margin: 0;
}

div.tooltip:hover span.tip{
  display: block;
  position: absolute;
  top: 12px;
  width: 270px;
  border: 1px solid $color_gray_dark;
  background-color: $color_white;
  padding: .5em;
  font-size: .8em;
  color: $color_gray_dark;
}

table.cal div.tooltip:hover span.tip {
  top: 25px;
}

img.ui-datepicker-trigger {
  cursor: pointer;
  vertical-align: middle;
  margin-left: 4px;
}

/***** Documents *****/

#document-list .document-group {
  margin-bottom: 1rem;
}

/***** Progress bar *****/
table.progress {
  border-collapse: collapse;
  border-spacing: 0;
  empty-cells: show;
  text-align: center;
  float: left;
  margin: 1px 6px 1px 0;
  width:80px;
}

table.progress td {
  height: 1em;
}
table.progress td.closed {
  background: $color_green none repeat scroll 0%;
}
table.progress td.done {
  background: $color_viridian_light none repeat scroll 0%;
}
table.progress td.todo {
  background: $color_gray_light_b none repeat scroll 0%;
}
p.percent {
  font-size: .8em;
  margin: 0;
}
p.progress-info {
  clear: left;
  font-size: .8em;
  margin-top: -4px;
  color: $color_gray;
}

.version-overview table.progress {
  width: 40em;
}
.version-overview table.progress td {
  height: 1.2em;
}

/***** Tabs *****/
#content .tabs {
  height: 3em;
  margin-bottom: .5em;
  position: relative;
  overflow: hidden;
}
#content .tabs ul {
  margin: 0;
  position: absolute;
  bottom: 0;
  padding-left: 0.5em;
  min-width: 2000px;
  width: 100%;
  border-bottom: 1px solid $color_gray_light_a;
}

#content .tabs ul li {
  float: left;
  list-style-type: none;
  white-space: nowrap;
  position: relative;
  margin-bottom: -1px;

  &:first-child {
    border-left: 1px solid $color_gray_light_a;
  }
}

#content .tabs ul li a {
  display: block;
  font-size: .9em;
  text-decoration: none;
  line-height: 2em;
  padding: .3em .5em;
  border-top: 2px solid $color_gray_light_a;
  border-right: 1px solid $color_gray_light_a;
  color: $color_gray_dark;
}

#content .tabs ul li a:hover {
  border-top: 2px solid $color_yellow;
  color: $color_indigo;
  text-decoration: none;
}

#content .tabs ul li a.selected {
  background-color: $color_white;
  border-top: 2px solid $color_red;
  border-bottom: 1px solid $color_white;
  color: $color_indigo;
}

#content .tabs ul li a.selected:hover {
  background-color: $color_white;
}

.tab-elements {
  padding-left: .5em;
}

div.tabs-buttons {
  position: absolute;
  right: 0;
  width: 4em;
  bottom: 0;
  border-bottom: solid 1px $color_gray_light_a;
}

button.tab-left, button.tab-right {
  font-size: .9em;
  cursor: pointer;
  height: 1.5em;
  border: 1px solid $color_gray_light_a;
  position: absolute;
  padding: .2em;
  width: 1.5em;
  bottom: -1px;
  line-height: .9em;
}
button.tab-left:hover, button.tab-right:hover {
  background-color: $color_yellow_light;
  text-decoration: none;
}
button.tab-left:focus, button.tab-right:focus {
  outline: 0;
}

button.tab-left {
  right: 1.4em;

  &:before {
    font-size: .9em;
    @include iconbase();
    @include icon($icon_chevron_left, $color_gray_dark);
  }
}

button.tab-right {
  right: 0;

  &:before {
    font-size: .9em;
    @include iconbase();
    @include icon($icon_chevron_right, $color_gray_dark);
  }
}

button.tab-left.disabled, button.tab-right.disabled {
  background-color: $color_gray;
  cursor: unset;
}

/***** Diff *****/
.diff_out {
  background: #fcc;
}
.diff_out span {
  background: #faa;
}
.diff_in {
  background: #cfc;
}
.diff_in span {
  background: #afa;
}

.text-diff {
  padding: 1em;
  background-color: #f6f6f6;
  color: #505050;
  border: 1px solid #e4e4e4;
  white-space: pre-wrap;
}

/***** Wiki *****/
div.wiki table {
  border-collapse: collapse;
  margin: 1em;
  border: 1px solid $color_gray;

  th {
    padding: .3em .5em;
    background-color: $color_gray_light_b;
    border: 1px solid $color_gray;
    font-weight: normal;
  }

  td {
    padding: .3em .5em;
    border: 1px solid $color_gray;
  }
}

div.wiki table, div.wiki td, div.wiki th {
  border: 1px solid $color_gray_light_a;
  padding: .3em;
}

div.wiki .wiki-class-noborder, div.wiki .wiki-class-noborder td, div.wiki .wiki-class-noborder th {
  border: 0;
}

div.wiki .external {
  &:before {
    @include iconbase();
    @include icon($icon_external, $color_gray);
  }
}

div.wiki a {
  word-wrap: break-word;
}
div.wiki a.new {
  color: $color_green;

  &:before {
    @include iconbase();
    @include icon($icon_add, $color_green);
  }
}

div.wiki ul, div.wiki ol {
  margin-bottom: 1em;
}
div.wiki li > ul, div.wiki li > ol {
  margin-bottom: 0;
}

div.wiki pre {
  overflow-x: auto;
  overflow-y: hidden;
  width: auto;
  margin: 1em;
  padding: .8em;
  background-color: $color_syntax_back;
  border: 1px solid $color_syntax_back;
  border-radius: .2em;
  color: $color_syntax_base;
  font-family: monospace;

  code {
    padding: 0;
  }
}

div.wiki *:not(pre)>code, div.wiki>code {
  background: rgba(62, 91, 118, 0.08);
  padding: 0.1em 0.1em;
  border-radius: 0.1em;
}

div.wiki ul.toc {
  background-color: #ffffdd;
  border: 1px solid #e4e4e4;
  padding: 4px;
  line-height: 1.2em;
  margin-bottom: 12px;
  margin-right: 12px;
  margin-left: 0;
  display: table;
}
* html div.wiki ul.toc {
  width: 50%; // IE6 doesn't autosize div
}

div.wiki ul.toc.right {
  float: right;
  margin-left: 12px;
  margin-right: 0;
  width: auto;
}
div.wiki ul.toc.left  {
    float: left;
    margin-right: 12px;
    margin-left: 0;
    width: auto;
}
div.wiki ul.toc ul {
  margin: 0;
  padding: 0;
}
div.wiki ul.toc li {
  list-style-type: none;
  margin: 0;
  font-size: .9em;
}
div.wiki ul.toc > li:first-child {
  margin-bottom: .5em;
  color: $color_gray;
}
div.wiki ul.toc li li {
  margin-left: 1.5em;
  font-size: .9em;
}
div.wiki ul.toc a {
  font-size: .9em;
  font-weight: normal;
  text-decoration: none;
  color: $color_gray_dark;
}
div.wiki ul.toc a:hover {
  color: $color_red;
  text-decoration: underline;
}

a.wiki-anchor {
  display: none;
  margin-left: 6px;
  text-decoration: none;
}
a.wiki-anchor:hover {
  color: $color_gray_light_a !important;
  text-decoration: none;
}

h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor, h4:hover a.wiki-anchor, h5:hover a.wiki-anchor, h6:hover a.wiki-anchor {
  display: inline;
  color: $color_gray_light_c;
}

div.wiki img {
  vertical-align: middle;
  max-width: 100%;
}

div.wiki .task-list {
  list-style-type: none;
  padding-left: 0px;
}
div.wiki .task-list input.task-list-item-checkbox {
  height: initial;
}

.wiki {
  padding: 0 .5em 1em;

  &.description {
    padding: 0;

    p {
      margin-top: .5em;
      margin-bottom: .5em;
      font-size: .9em;
    }
  }

  h2 {
    padding: 1.5rem .8rem;
    border-left: 2px solid $color_blue;
  }

  h3 {
    padding: 1.5rem .8rem;
    border-left: 2px solid $color_gray_light_a;
  }

  h4, h5, h6 {
    margin-left: 2px; // from h2, h3 border
    padding-left: .8rem;
    padding-bottom: .2rem;
    border-bottom: 1px dotted $color_gray_light_a;
    font-size: 1.2em;
    font-weight: normal;
  }

  code {
    padding: .2em .5em;
    border-radius: .2em;
    background-color: $color_gray_light_b;
    color: $color_indigo;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

    .CodeRay {
      background-color: $color_syntax_back;
      color: $color_syntax_base;
    }
  }

  p {
    margin: 2em 1em;
    font-feature-settings: "palt";
    text-align: justify;
  }
}

#attach_files_link:before {
  @include iconbase();
  @include icon($icon_add, $color_green);
}

/***** My page layout *****/
.block-receiver {
  border: 1px dashed $color_white;
  padding: 15px 0 0 0;
}
.dragging .block-receiver {
  border: 1px dashed $color_gray_dark;
  margin-bottom: 20px;
}
.mypage-box {
  border: 1px solid $color_gray;
  padding: 8px;
  margin: 0 0 20px 0;
  color: $color_gray_dark;
  line-height: 1.5em;
  border-radius: .2em;
}

.mypage-box > .contextual {
  opacity: 0.001;
  transition: opacity 0.2s;
}
.mypage-box:hover > .contextual {
  opacity: 1;
}

.handle {
  cursor: move;
}

#my-page .list th.checkbox, #my-page .list td.checkbox {
  display: none;
}

a.close-icon:before {
  @include iconbase();
  @include icon($icon_close, $color_gray);
  cursor: pointer;
}

a.close-icon:hover {
  &:before {
    @include iconbase();
    @include icon($icon_close, $color_blue);
  }
}

/***** Gantt chart *****/
table.gantt-table {
  width: 100%;
  border-collapse: collapse;
}
table.gantt-table td {
  padding: 0px;
}
.gantt_hdr {
  position: absolute;
  top: 0;
  height: 16px;
  border-top: 1px solid $color_gray_light_a;
  border-bottom: 1px solid $color_gray_light_a;
  border-left: 1px solid $color_gray_light_a;
  text-align: center;
  overflow: hidden;
  font-size: .8em;
}
#gantt_area .gantt_hdr {
  border-left: 0px;
  border-right: 1px solid $color_gray_light_a;
}
.gantt_subjects_container:not(.draw_selected_columns) .gantt_hdr,
.last_gantt_selected_column .gantt_hdr {
  border-right: 1px solid $color_gray_light_a;
}
.last_gantt_selected_column .gantt_selected_column_container,
.gantt_subjects_container .gantt_subjects * {
  z-index: 10;
}

.gantt_subjects_column + td {
  padding: 0;
}

.gantt_hdr.nwday {
  background-color: $color_gray_light_b;
}
.gantt_subjects,
.gantt_selected_column_content.gantt_hdr {
  font-size: 0.8em;
  position: relative;
  z-index: 1;
}
.gantt_subjects div,
.gantt_selected_column_content div {
  line-height: 16px;
  height: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
}
.gantt_subjects div.issue-subject:hover {
  background-color: $color_yellow_light;
}
.gantt_selected_column_content {
  padding-left: 3px;
  padding-right: 3px;
}
.gantt_subjects .issue-subject img.icon-gravatar {
  margin: 2px 5px 0px 2px;
}
.gantt_hdr_selected_column_name {
  position: absolute;
  top: 50%;
  width:100%;
  transform: translateY(-50%);
  -webkit-transform: translateY(-50%);
  font-size: 0.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

}
td.gantt_selected_column {
  width: 50px;
}
td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container {
  width: 49px;
}

.task {
  position: absolute;
  height: 8px;
  font-size: .8em;
  color: $color_gray_dark;
  padding: 0;
  margin: 0;
  line-height: 16px;
  white-space: nowrap;
}

.task.label {
  width: 100%;
  margin-top: -2px;
}
.task.label.project, .task.label.version {
  margin-left: .3em;
}

.task_late {
  background-color: $color_red;
  border: 1px solid $color_red;
}
.task_done {
  background-color: $color_green;
  border: 1px solid $color_green;
}
.task_todo {
  background-color: $color_gray_light_a;
  border: 1px solid $color_gray_light_a;
}

.task_todo.parent {
  background: $color_gray;
  border: 1px solid $color_gray;
  height: 3px;
}
.task_late.parent, .task_done.parent {
  height: 3px;
}
.task.parent.marker.starting  {
  position: absolute;
  background: url(../images/task_parent_end.png) no-repeat 0 0;
  width: 8px;
  height: 16px;
  margin-left: -4px;
  left: 0;
  top: -1px;
}
.task.parent.marker.ending {
  position: absolute;
  background: url(../images/task_parent_end.png) no-repeat 0 0;
  width: 8px;
  height: 16px;
  margin-left: -4px;
  right: 0px;
  top: -1px;
}

.version.task_late {
  background-color: $color_red;
  height: 2px;
  margin-top: 5px;
  margin-left: 1px;
}
.version.task_done {
  background-color: $color_green;
  height: 2px;
  margin-top: 5px;
  margin-left: 1px;
}
.version.task_todo {
  background-color: $color_gray_light_a;
  height: 2px;
  margin-top: 5px;
  margin-left: 1px;
}
.version.marker:before {
  @include iconbase();
  @include icon($icon_square, $color_blue);
  border: 0;
  margin-top: 1px;
  margin-left: -4px;
}

.project.task_late {
  background-color: $color_red;
  height: 2px;
  margin-top: 5px;
  margin-left: 1px;
}
.project.task_done {
  background-color: $color_green;
  height: 2px;
  margin-top: 5px;
  margin-left: 1px;
}
.project.task_todo {
  background-color: $color_gray_light_a;
  height: 2px;
  margin-top: 5px;
  margin-left: 1px;
}
.project.marker:before {
  @include iconbase();
  @include icon($icon_square, $color_blue);
  margin-top: 1px;
  margin-left: -4px;
}

.version-behind-schedule a, .issue-behind-schedule a {
  color: $color_orange;
}
.version-overdue a, .issue-overdue a, .project-overdue a {
  color: $color_red;
}

/***** Badges *****/
.badge {
  position:relative;
  bottom: .2em;
  padding: .1em .3em;
  margin-right: .2em;
  margin-left: .2em;
  border-radius: .2em;
  text-transform: uppercase;
  text-decoration: none;
}
.badge-private {
  background: $color_red_dark;
  color: $color_white;
  border: 1px solid $color_red_dark;
}
.badge-count {
  background: $color_gray;
  color: $color_white;
  border: 1px solid $color_gray;
}
.badge-status-open {
  color: $color_blue_dark;
  border: 1px solid $color_blue_dark;
}
.badge-status-locked {
  color: $color_gray_dark;
  border: 1px solid $color_gray_dark;
}
.badge-status-closed {
  color: $color_green_dark;
  border: 1px solid $color_green_dark;
}
.badge-issues-count {
  background: $color_gray_light_b;
  border: 1px solid $color_gray_light_b;
}

/***** Tooltips *****/
.ui-tooltip {
  background: $color_text;
  color: $color_white;
  border-radius: .2rem;
  border: 0;
  box-shadow: none;
  white-space: pre-wrap;
}

/***** Icons *****/
.icon {
  background-position: 0% 50%;
  background-repeat: no-repeat;
  padding-left: 20px;
}
.icon-only {
  background-position: 0% 50%;
  background-repeat: no-repeat;
  padding-left: 16px;
  display: inline-block;
  width: 0;
  border: none !important;
}
.icon-only::after {
  content: "\a0";
}

// The icon is defined by Icons.scss

a.icon-only {
  display: inline-block;
  width: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: text-bottom;

  &::after {
    content: "&nbsp;";
  }
}

.sort-handle.ajax-loading {
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-image: url(../images/loading.gif);
}
tr.ui-sortable-helper {
  border: 1px solid $color_gray_light_a;
}

.contextual>*:not(:first-child), .buttons>.icon:not(:first-child), .contextual .journal-actions>*:not(:first-child) {
  margin-left: 5px;
}

img.gravatar {
  vertical-align: middle;
  border-radius: 50%;
}

div.issue img.gravatar {
  float: left;
  margin-right: 1em;
}

div.gravatar-with-child {
  position: relative;
}

div.gravatar-with-child > img.gravatar:nth-child(2) {
  position: absolute;
  top: 30px;
  left: 30px;
  border-radius: 50%;
  border: 1px solid $color_white;
  background-color: $color_white;
  padding: 2px;
}

h2 img.gravatar {
  margin: .3em 0;
}
h3 img.gravatar {
  margin: .3em 0;
}
h4 img.gravatar {
  margin: .3em 0;
}
td.username img.gravatar {
  margin: 0 .5em 0 0;
  vertical-align: top;
}
#activity dt img.gravatar {
  float: left;
  margin: 0 1em 1em 0;
}
// Used on 12px Gravatar img tags without the icon background
.icon-gravatar {
  float: left;
  margin-right: 4px;
}

#activity dt, .journal {
  clear: left;
}

h2 img {
  vertical-align: middle;
}

.hascontextmenu {
  cursor: context-menu;
}

.sample-data {
  border: 1px solid $color_gray;
  border-collapse: collapse;
  background-color: $color_white;
  margin: 0.5em;
}
.sample-data td {
  border: 1px solid $color_gray;
  padding: 2px 4px;
  font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace;
}
.sample-data tr:first-child td {
  font-weight: bold;
  text-align: center;
}

.ui-progressbar {
  position: relative;
}
#progress-label {
  position: absolute;
  left: 50%;
  top: 4px;
  font-weight: bold;
  color: $color_gray_dark;
  text-shadow: 1px 1px 0 $color_white;
}

.repository-graph {
  width: 75%;
  margin-bottom: 2em;
}

img.filecontent.image {
  background-image: url(../images/transparent.png);
}

/* Custom JQuery styles */
.ui-autocomplete, .ui-menu {
  border-radius: 2px;
  border: 1px solid #ccc;
}
.ui-autocomplete .ui-menu-item > div, .ui-menu .ui-menu-item > div {
  padding: 4px 8px;
  max-width: 500px;
}
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {
  border-color: #759FCF;
  background: #759FCF;
}
.ui-widget-overlay {
    background: #000;
    opacity: 70%;
}

/* Custom tribute styles */
.tribute-container ul {
  background-color: $color_white;
  border: 1px solid $color_gray_light_a;
  border-radius: 2px;
}
.tribute-container li.highlight {
  background-color: $color_blue_light;
  color:$color_white;
}

/************* Rouge styles *************/
/* generated by: pygmentize -f html -a .syntaxhl -S colorful */
code.syntaxhl { background-color: $color_syntax_back; color: $color_white; }
.syntaxhl .hll { background-color: $color_yellow_light; }
.syntaxhl  { background: $color_gray_light_c; }
.syntaxhl .c { color: $color_gray; } /* Comment */
.syntaxhl .err { color: $color_syntax_red; } /* Error */
.syntaxhl .k { color: $color_syntax_purple; } /* Keyword */
.syntaxhl .o { color: $color_syntax_blue } /* Operator */
.syntaxhl .ch { color: $color_gray; } /* Comment.Hashbang */
.syntaxhl .cm { color: $color_gray; } /* Comment.Multiline */
.syntaxhl .cp { color: $color_gray; } /* Comment.Preproc */
.syntaxhl .cpf { color: $color_gray; } /* Comment.PreprocFile */
.syntaxhl .c1 { color: $color_gray; } /* Comment.Single */
.syntaxhl .cs { color: $color_gray; } /* Comment.Special */
.syntaxhl .gd { color: $color_red; } /* Generic.Deleted */
.syntaxhl .ge { font-style: italic; } /* Generic.Emph */
.syntaxhl .gr { color: $color_red; } /* Generic.Error */
.syntaxhl .gh { color: $color_syntax_blue; } /* Generic.Heading */
.syntaxhl .gi { color: $color_syntax_green; } /* Generic.Inserted */
.syntaxhl .go { color: $color_syntax_gray; } /* Generic.Output */
.syntaxhl .gp { color: $color_syntax_yellow; } /* Generic.Prompt */
.syntaxhl .gs { font-weight: bold; } /* Generic.Strong */
.syntaxhl .gu { color: $color_syntax_purple; } /* Generic.Subheading */
.syntaxhl .gt { color: $color_syntax_blue; } /* Generic.Traceback */
.syntaxhl .kc { color: $color_syntax_red; } /* Keyword.Constant */
.syntaxhl .kd { color: $color_syntax_purple; } /* Keyword.Declaration */
.syntaxhl .kn { color: $color_syntax_purple; } /* Keyword.Namespace */
.syntaxhl .kp { color:$color_syntax_purple; } /* Keyword.Pseudo */
.syntaxhl .kr { color:$color_syntax_purple; } /* Keyword.Reserved */
.syntaxhl .kt { color: $color_syntax_blue; } /* Keyword.Type */
.syntaxhl .m { color: $color_syntax_yellow; } /* Literal.Number */
.syntaxhl .s { color: $color_syntax_green; } /* Literal.String */
.syntaxhl .na { color: $color_syntax_purple; } /* Name.Attribute */
.syntaxhl .nb { color: $color_syntax_green; } /* Name.Builtin */
.syntaxhl .nc { color: $color_syntax_blue; } /* Name.Class */
.syntaxhl .no { color: $color_syntax_blue; } /* Name.Constant */
.syntaxhl .nd { color: $color_syntax_gray; } /* Name.Decorator */
.syntaxhl .ni { color: $color_syntax_purple; } /* Name.Entity */
.syntaxhl .ne { color: $color_syntax_red; } /* Name.Exception */
.syntaxhl .nf { color: $color_syntax_blue; } /* Name.Function */
.syntaxhl .nl { color: $color_syntax_blue; } /* Name.Label */
.syntaxhl .nn { color: $color_syntax_blue; } /* Name.Namespace */
.syntaxhl .nt { color: $color_syntax_blue; } /* Name.Tag */
.syntaxhl .nv { color: $color_syntax_blue; } /* Name.Variable */
.syntaxhl .ow { color: $color_syntax_blue; } /* Operator.Word */
.syntaxhl .w { color: $color_syntax_gray; } /* Text.Whitespace */
.syntaxhl .mb { color: $color_syntax_yellow; } /* Literal.Number.Bin */
.syntaxhl .mf { color: $color_syntax_yellow; } /* Literal.Number.Float */
.syntaxhl .mh { color: $color_syntax_yellow; } /* Literal.Number.Hex */
.syntaxhl .mi { color: $color_syntax_yellow; } /* Literal.Number.Integer */
.syntaxhl .mo { color: $color_syntax_yellow; } /* Literal.Number.Oct */
.syntaxhl .sa { color: $color_syntax_green; } /* Literal.String.Affix */
.syntaxhl .sb { color: $color_syntax_green; } /* Literal.String.Backtick */
.syntaxhl .sc { color:$color_syntax_green; } /* Literal.String.Char */
.syntaxhl .dl { color: $color_syntax_green; } /* Literal.String.Delimiter */
.syntaxhl .sd { color: $color_syntax_green; } /* Literal.String.Doc */
.syntaxhl .s2 { color: $color_syntax_green; } /* Literal.String.Double */
.syntaxhl .se { color: $color_syntax_blue; } /* Literal.String.Escape */
.syntaxhl .sh { color: $color_syntax_green; } /* Literal.String.Heredoc */
.syntaxhl .si { color: $color_syntax_green; } /* Literal.String.Interpol */
.syntaxhl .sx { color: $color_syntax_green; } /* Literal.String.Other */
.syntaxhl .sr { color: $color_syntax_green; } /* Literal.String.Regex */
.syntaxhl .s1 { color: $color_syntax_green; } /* Literal.String.Single */
.syntaxhl .ss { color: $color_syntax_green; } /* Literal.String.Symbol */
.syntaxhl .bp { color:$color_syntax_green;} /* Name.Builtin.Pseudo */
.syntaxhl .fm { color: $color_syntax_blue; } /* Name.Function.Magic */
.syntaxhl .vc { color: $color_syntax_blue; } /* Name.Variable.Class */
.syntaxhl .vg { color: $color_syntax_yellow; } /* Name.Variable.Global */
.syntaxhl .vi { color: $color_syntax_blue; } /* Name.Variable.Instance */
.syntaxhl .vm { color: $color_syntax_yellow; } /* Name.Variable.Magic */
.syntaxhl .il { color: $color_syntax_blue; } /* Literal.Number.Integer.Long */

/***** Media print specific styles *****/
@media print {
  #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats {
    display: none;
  }
  #main {
    background: $color_white;
  }
  #content {
    width: 99%;
    margin: 0;
    padding: 0;
    border: 0;
    background: $color_white;
    overflow: visible !important;
  }
  #wiki_add_attachment {
    display: none;
  }
  .hide-when-print, .pagination ul.pages, .pagination .per-page {
    display: none !important;
  }
  .autoscroll {
    overflow-x: visible;
  }
  table.list {
    margin-top: .5em;
  }
  table.list th, table.list td {
    border: 1px solid $color_gray_light_a;
  }
}

/* Accessibility specific styles */
.hidden-for-sighted {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.filecontent-container {
  position: relative;
  margin-bottom: 20px;
  min-height: 200px;
}
.filecontent-container > .filecontent {
  position: absolute;
  max-height: 100%;
  max-width: 100%;
}

.filecontent.wiki {
  position: relative;
  padding: 1em;
  border: 1px solid $color_gray_light_b;
  border-radius: 3px;
}

/* Fixes for IE 11 */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  select::-ms-expand {
    display: none;
  }
  select[multiple=multiple] {
    padding-right: 0;
  }
}

/* tablesort */
th[role=columnheader]:not(.no-sort) {
	cursor: pointer;
}

th[role=columnheader]:not(.no-sort):after {
	content: '';
	float: right;
	margin-top: 7px;
	border-width: 0 4px 4px;
	border-style: solid;
	border-color: #404040 transparent;
	display: none;
	opacity: 0;
	-ms-user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

th[aria-sort=ascending]:not(.no-sort):after {
	border-bottom: none;
	border-width: 4px 4px 0;
}

th[aria-sort]:not(.no-sort):after {
	display: inline;
	opacity: 0.4;
}

th[role=columnheader]:not(.no-sort):hover:after {
	display: inline;
	opacity: 1;
}

/***** Override Forms *****/

input[type="text"], input[type="password"], input[type="date"] {
  border: solid 1px $color_gray_light_a;
  border-radius: .2em;
  padding: .3em;
  color: $color_indigo;
  line-height: initial;
}

input[type="file"] {
  color: $color_indigo;
  line-height: initial;
}
textarea {
  border: solid 1px $color_gray_light_a;
  border-radius: .2em;
  padding: .3em;
  color: $color_indigo;
  box-sizing: border-box;
  font-size: .9em;
}

// Submit button
input[type="submit"] {
  background-color: $color_indigo;
  border: solid 1px $color_indigo;
  color: $color_white;
  padding: .3em 1em;
  border-radius: .2em;
  letter-spacing: .12em;

  &:hover {
    opacity: .8;
  }
}

// Normal button
input[type="button"] {
  background-color: $color_green;
  border: solid 1px $color_green;
  color: $color_white;
  padding: .3em 1em;
  border-radius: .2em;
  letter-spacing: .1em;

  &:hover {
    opacity: .8;
  }
}

// Checkbox
input[type="checkbox"] {
  margin-right: .3em;
}
