// RedmineX Theme
// Copyright 2020 RedmineX
// For license, see https://www.projectino.cz
// Created by Michael Staněk
// Created without vendor prefixes, "AutoPrefixed" by PrePros v5 (https://prepros.io)
 
// Media Queries to Copy / Paste:
 
// 380px
// @include media-breakpoint-up(xxs) {}

// 480px
// @include media-breakpoint-up(xs) {}

// 576px
// @include media-breakpoint-up(sm) {}

// 768px
// @include media-breakpoint-up(md) {}

// 899px
// @include media-breakpoint-up(redmine-mobile) {}

// 992px
// @include media-breakpoint-up(lg) {}

// 1200px
// @include media-breakpoint-up(xl) {}

// 1500px
// @include media-breakpoint-up(hd) {}

// 1900px
// @include media-breakpoint-up(2k) {}

/* ==========================================================================
   Gantt
   ========================================================================== */

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

.task.label {
	width:100%;
}

.task.label.project, 
.task.label.version { 
	font-weight: bold; 
}

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

.task.label {width:100%;}
.task.label.project, .task.label.version { font-weight: bold; }

.task_late { background:#f66 url(../../../images/task_late.png); border: 1px solid #f66; }
.task_done { background:#00c600 url(../../../images/task_done.png); border: 1px solid #00c600; }
.task_todo { background:#aaa url(../../../images/task_todo.png); border: 1px solid #aaa; }

.task_todo.parent { background: #888; border: 1px solid #888; 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: 0px; 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:#f66 url(../../../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
.version.task_done { background:#00c600 url(../../../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
.version.task_todo { background:#fff url(../../../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
.version.marker { background-image:url(../../../images/version_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }

.project.task_late { background:#f66 url(../../../images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
.project.task_done { background:#00c600 url(../../../images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
.project.task_todo { background:#fff url(../../../images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
.project.marker { background-image:url(../../../images/project_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }

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

.list.issues {
	.version-overdue a, .issue-overdue a, .project-overdue a, .overdue a, .overdue .due_date {
	  color: $brand-danger;
	}
}

.gantt-table {
	width: 100%;
	background: $white;
	
	td {
		padding: 0 !important;
	}
}

.gantt_hdr {
	position:absolute;
	top: 0;
	height: 16px;
	border: none;
	text-align: center;
	overflow: hidden;
}

.gantt_subjects_container {
	overflow: hidden;
}
	
.gantt_subjects_container:not(.draw_selected_columns) .gantt_hdr,
.last_gantt_selected_column .gantt_hdr {
	z-index: 10;
}

.gantt_subjects_container .gantt_subjects * {
	z-index: 10;
}

.gantt_subjects_column + td {
	padding: 0;
}

.gantt_subjects,
.gantt_selected_column_content.gantt_hdr {
	  font-size: $font-size-xs;
	  position: relative;
	  z-index: 1;
}

.gantt_subjects div,
.gantt_selected_column_content div {
	  overflow: hidden;
	  white-space: nowrap;
	  text-overflow: ellipsis;
	  width: 100%;
}

.gantt_subjects div.issue-subject { 
	padding: 0 0.25rem 0.125rem 0.25rem;
	
	&:hover { 
		background-color: $table-bg-hover; 
	}
}

.gantt_subjects .issue-subject img.icon-gravatar {
	@include rounded360;
	margin: 2px;
    position: relative;
    top: 4px;
    left: -2px;
}

.gantt_hdr_selected_column_name {
	position: absolute;
	top: 50%;
	width:100%;
	transform: translateY(-50%);
	-webkit-transform: translateY(-50%);
	font-size: $font-size-xs;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;

}

td.gantt_selected_column {
	width: 60px;
	text-align: center;
}

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

.gantt_selected_column_container {
	border-right: 1px solid $border-color-light;
	border-bottom: 1px solid $border-color-light;
	
	&>.gantt_hdr:nth-child(2) {
		background: $border-color-light !important;
		padding: 0 0.25rem;
	}
}