// 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) {}

/* ==========================================================================
   Project
   ========================================================================== */

.controller-projects {
	
	.new_project,
	&.action-new #content>h2 {
		max-width: 1200px; 
		margin-left: auto;
		margin-right: auto;
	}
	
	&.action-show {
		
		.box {
			
			h3 {
				margin-top: 0;
				margin-bottom: 1.25em;
			}
			
			&.projects {
				display: none !important;
			}
			
			&.issues h3 {
				margin-bottom: 0;
			}
			
			&.members {
				
				p {
					margin-bottom: 0.5rem;
				}
			}
			
			&#duplicates {
				
				#duplicates {
					float: left;
				}
				
				.small {
					display: block;
					clear: both;
					padding-top: 1rem;
				}
				
				.tooltip span.tip {
					@include dropdown;
					right: unset;
					left: 0;
				}
			}
		}
	}
	
	&.action-settings .tab-content {
		
		p>.icon-add,
		.contextual .icon {
			@include btn;
		}
	}
}

.splitcontent {
	display: flex !important; // to override redmine_issue_dynamic_edit
	flex-direction: row;
	justify-content: flex-start;
	align-items: flex-start;
	flex-wrap: wrap;
}

.splitcontentleft,
.splitcontentright {
	flex: 0 0 100%;
	max-width: 100%;
	
	@include media-breakpoint-up(lg) {
		flex: 0 0 50%;
		max-width: 50%;
		float: left;
		width: 50%;
	}
}

.splitcontentleft {
	
	@include media-breakpoint-up(lg) {
		padding: 0 0.75rem 0 0;
	}
}

.splitcontentright {
	
	@include media-breakpoint-up(lg) {
		padding: 0 0 0 0.75rem;
	}
}

.projects li {
	list-style: none;
}
	
#projects-index {
	background: $white;
	border: 1px solid $border-color-light;
	
	.description {
		display: none;
	}
	
	ul {
		padding-left: 2rem;
	}
	
	&>ul.projects {
		padding-left: 0;
	}
	
	li {
		position: relative;
		
		&:focus {
			outline: none;
		}
	}
	
	div.root { /*div specified because there's li.root*/
		padding: 0 0 0 4rem;
	}
	
	div.root>a.project {
		padding: 1rem 0;
		display: block;
		z-index: 10;
	}
	
	a {
		color: $text-color;
		
		&:hover {
			color: $link-color;
		}
	}
	
	a.my-project {
		padding-right: 2rem;
	}
	
	.collapsible .root{
		position: relative;
	}
		
	li.root li.child {
		margin-top: 0.75rem;
		margin-bottom: 0.75rem;
	}
	
	li.root>ul>li.child {
		margin-top: 0.25rem;
	}
	
	div.root + ul.projects {
		margin-left: 3rem;
	}
}

label.floating {
	display: block;
}

#new_project {
	
	#erpmineproject_profit_overhead_percentage {
		margin-right: 0.5rem;
	}
	
	em.info {
		display: block;
	}
}

#activity_report_settings {
	
	p {
		padding: 0;
		margin: 0;
	}
	
	#activity_report_settings_with_subprojects {
		top: 3px;
	}
}

/* ==========================================================================
   Project Aggregate
   ========================================================================== */
 
.project-aggregate {
	
	.project-completion .value:not(.overflow) {
		color: $brand-success;
	}
	
	.project-completion .value.overflow {
		color: $brand-warning;
	}
	
	.project-item {
		display: flex;
		flex-direction: row-reverse;
		border-bottom: 1px solid $border-color-light;
		padding: 0.75rem;
		
		&>div {
			flex: 0 0 50%;
		}
		
		&:last-child {
			border-bottom: none;
		}
	}
	
	.project-completion, 
	.project-creation,
	.estimated-hours, 
	.spent-time {
		
		.value {
			font-weight: 600;
		}
	}
	
	table.progress {
		width: 90%;
		max-width: 160px;
		top: 3px;
	}
	
	.percent {
		margin-left: 0.5rem;
		margin-bottom: 0;
		top: -4px;
	}
	
	table.progress,
	.percent {
		float: left;
		margin-top: 0.5rem;
		position: relative;
	}
}