// RedmineX Theme
// Copyright 2020 RedmineX
// For license, see https://www.redmine-x.com
// 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) {}

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

.controller-redmine_x_gantt,
.controller-redmine_x_resources {
	
	.btn-gantt:hover {
		background-color: transparent !important;
		color: $primary !important;
	}
	
	#users-expand>div>.select-btn {
		@include btn;
		@include btn-primary;
		@include btn-sm;
	}
	
	#query_form {
		margin-top: 0;
	}
	
	.toggle-filters {
		padding: 0;
	}
	
	.gantt-controls-wrapper {
		background-color: $body-bg;
	}
	
	.gantt-controls-wrapper.sticky {
		top: 53px;
		width: calc(100% - 2rem - 1px);
	}
	
	.gantt_container, .gantt_tooltip {
		font-family: $font-family-base !important;
	}
	
	.gantt-undo-group {
		
		button {
			@include btn;
			@include btn-tetriary;
		}
		
		button:before {
			background-image: url(../images/undo_accent.svg);
			top: 11px;
		}
		
		button:hover:before {
			background-image: url(../images/undo_accent.svg);
		}
	}	
	
	#gantt-save-btn {
		@include btn;
		@include btn-secondary;
		background-image: url(../images/save_white.svg);
		padding-left: 2.5rem !important;
		background-position: 21px center !important;
		
		&:hover {
			background-color: darken($secondary, 10%) !important;
			background-image: url(../images/save_white.svg) !important;
		}
	}
	
	.gantt-export-group button {
		@include btn;
		@include btn-tetriary;
		background-image: url(../images/download_accent.svg) !important;
	}
	
	#gantt-critical-path-btn,
	#gantt-settings-btn,
	#gantt-groupby-btn,
	.btn-gantt {
		text-transform: uppercase;
	}
	
	.btn-gantt {
		padding: 2px 8px;
		
		@include media-breakpoint-up(2k) {
			padding: 2px 16px;
		}
		
		&:not(#btn-settings):not(#gantt-undo-btn):not(#gantt-redo-btn) {
			margin-bottom: 4px !important;
		}
	}
	
	.gantt_btn_set.gantt_save_btn_set, 
	.dhtmlx_popup_controls div[result="save"] {
		background: $secondary;
		color: $white;
	}
	
	#btn-settings {
		background-image: none;
		border-color: transparent;
		width: 2.25rem;
		height: 2.25rem;
		
		.fa {
			display: inline-block;
			font-weight: 300 !important;
		}
		
		&:hover {
			background-image: none;
		}
	}
}

.controller-redmine_x_gantt {
	
	#users-expand>div>.select-btn {
		@include btn;
		@include btn-primary;
	}
	
	#filters_form #filters_wrapper {
		min-height: 53px;
	}
	
	#filters_form #query_form_content #query_form_content {
		padding: 1rem;
		margin-bottom: 1rem;
	}
	
	#query_form_modal fieldset {
		margin: 0 -1.5rem 1rem -1.5rem;
	}
	
	#query_form_modal .tabular {
		border: none !important;
	}
	
	#query_form_modal > .box {
		margin-bottom: 1rem;
	}
	
	#save-query-modal-gantt-btn, 
	#cancel-query-modal-gantt-btn {
		align-self: center;
	}
	
	#save-query-modal-gantt-btn {
		@include btn-primary;
		margin-right: 1rem;
	}
	
	#cancel-query-modal-gantt-btn {
		@include btn-tetriary;
	}
}

.settings-rx-gantt-default {
	
	.collapsible legend {
		background: none;
	}
	
	.filters-block {
		padding: 1rem;
		border: 1px solid $border-color-light;
	}
	
	.filters-block+fieldset:not(#filters):not(#options):not(.collapsible) {
		border: none !important;
		padding: 0 !important;
	}	
}

.gantt-right .gantt-settings-group {
	margin-bottom: 4px !important;
}