@import "compass";

/* ---------- All tasks toggle ---------- */

.tasks-portlet {
	.taglib-search-iterator-page-iterator-bottom {
		padding: 0;

		.delta-selector, .search-results {
			display: none;
		}

		.search-pages {
			padding-top: 5px;
		}
	}

	.tasks-options {
		height: 1em;
		margin-top: 5px;

		@include opacity(0.6);

		table {
			float: right;
		}

		td {
			padding-left: 5px;
		}
	}

	/* ---------- Controls ---------- */

	.control-wrapper {
		border: 1px solid #C8C9CA;
		margin: 0.5em 0;
		padding: 6px;

		a {
			background: no-repeat 0% 50%;
			padding: 1px 10px 1px 20px;
		}

		.add-task {
			background-image: url(@theme_image_path@/common/add.png);
		}

		.filter-tasks {
			background-image: url(@theme_image_path@/common/tag.png);
			float: right;
			padding-right: 0;
		}

		.permission-tasks {
			background-image: url(@theme_image_path@/common/permissions.png);
		}
	}

	/* ---------- Filter ---------- */

	.filter-wrapper {
		background: #DFF4FF;
		border: 1px solid #A7CEDF;
		margin: 0 0 1em;
		position: relative;

		&:after {
			border: 10px solid;
			border-color: transparent transparent #A7CEDF;
			content: "";
			position: absolute;
			right: 10px;
			top: -20px;
		}

		h3 {
			background: #A7CEDF;
			font-size: 11px;
			margin: 0;
			padding: 2px 5px;
		}
	}

	.filter-container {
		padding: 0.2em 0.5em;
	}

	.filter-control-container {
		padding-top: 0;
		text-align: right;
	}

	.asset-tag-filter .asset-tag {
		background: url(../images/unselected.png) no-repeat 0% 50%;
		margin-right: 0.5em;
		padding-left: 16px;

		&.selected {
			background-image: url(../images/selected.png);
			font-weight: bold;
		}
	}

	.group-filter select {
		min-width: 175px;
	}

	/* ---------- Priority ---------- */

	.tasks-title {
		padding: 1px 0 1px 20px;
	}

	/* ---------- Progress ---------- */

	.progress-wrapper {
		background: #FFF;
		border: 1px solid #CCC;
		font-size: 11px;
		position: relative;
	}

	.new-progress, .progress {
		background: #E8EFF4;
	}

	.progress {
		height: 100%;
	}

	.progress-wrapper {
		&, div {
			height: 15px;
			width: 100px;
		}

		.new-progress {
			width: 0%;
			z-index: 9;
		}
	}

	.progress-wrapper .due-date, .progress-indicator, .progress-selector, .progress-wrapper .new-progress {
		left: 0;
		position: absolute;
		top: 0;
	}

	.progress-wrapper .due-date, .progress-indicator {
		text-align: center;
	}

	.past-due {
		color: red;
	}

	.progress-wrapper .due-date {
		z-index: 10;
	}

	.progress-indicator {
		z-index: 11;
	}

	.progress-selector {
		background: url(@theme_image_path@/spacer.png);
		z-index: 12;

		a {
			display: block;
			float: left;
			height: 100%;
			width: 20%;
		}
	}

	/* ---------- Result style ---------- */

	.result-data {
		color: #777;

		span {
			margin-right: 1em;
			white-space: nowrap;
		}
	}

	/* ---------- Table style ---------- */

	.list-wrapper {
		.col-2 {
			width: 105px;
		}

		.col-3 {
			width: 16px;
		}
	}

	/* ---------- Tags ---------- */

	.tags-wrapper {
		position: relative;
		width: 16px;

		.icon {
			background: url(@theme_image_path@/common/tag.png) no-repeat;
			height: 16px;
			width: 16px;
		}
	}

	.tags {
		background: #E5F6FF;
		border: 1px solid #B5D7E5;
		max-width: 350px;
		min-width: 150px;
		padding: 0 4px;
		position: absolute;
		right: 20px;
		top: 0;
		z-index:20;
	}
}

/* ---------- Dialog ---------- */

.portal-popup .tasks-portlet {
	.lfr-table .lfr-label {
		font-weight: bold;
		vertical-align: top;
	}

	.input-task-description {
		min-width: 350px;
	}

	.task-data-container {
		color: #777;
		margin-bottom: 1em;

		.task-data {
			border-right: 1px solid #777;
			display: inline;
			margin-right: 0.5em;
			padding: 1px 0.5em 1px 20px;
		}

		.reporter {
			background: url(@theme_image_path@/common/add_user.png) no-repeat 0 50%;
		}

		.assignee {
			background: url(@theme_image_path@/common/assign.png) no-repeat 0 50%;
		}

		.modified-date {
			background: url(@theme_image_path@/common/calendar.png) no-repeat 0 50%;
			border-right-width: 0;
		}
	}

	.layout {
		margin-bottom: 1em;
	}

	.task-data-table .task-data {
		display: block;
		padding: 1px 0 1px 20px;
	}

	.fieldset {
		.due-date-label {
			margin-top: 10px;
		}

		.due-date-toggle {
			margin: 0 0 10px;
			padding-left: 2px;
		}
	}

	.task-action {
		background: #EEE;
		border-top: 1px solid #BFBFBF;
		margin: 1em 0;
		overflow: hidden;
		padding: 0.5em;

		.button-submit {
			margin-right: 3px;
		}

		.button, .task-action-button, .task-action-spacer {
			float: left;
		}
	}

	.task-action-spacer {
		border-left: 1px solid #BFBFBF;
		margin-left: 0.5em;
		padding-left: 0.5em;
	}

	.task-action-right {
		float: right;
	}

	/* Comments */

	.comment-form {
		height: 50px;
		margin-bottom: 0.5em;
		width: 400px;
	}

	.comment-wrapper {
		margin-bottom: 1em;
	}

	.edit-notice {
		font-style: italic;
		margin-right: 2px;
		padding: 0 2px;
	}

	.comment-info {
		color: #777;

		span {
			margin-right: 0.5em;
		}
	}
}

.upcoming-tasks-portlet .tasks-entries-container {
	ul, li, {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.tasks-title a {
		display: block;
		padding: 1px 0 1px 20px;
	}
}

.tasks-portlet .task-data-table .high, .tasks-portlet .tasks-title.high, .upcoming-tasks-portlet .tasks-entries-container .high a {
	background: url(../images/priority_high.png) no-repeat 0 50%;
}

.tasks-portlet .task-data-table .normal, .tasks-portlet .tasks-title.normal, .upcoming-tasks-portlet .tasks-entries-container .normal a {
	background: url(../images/priority_normal.png) no-repeat 0 50%;
}

.tasks-portlet .task-data-table .low, .tasks-portlet .tasks-title.low, .upcoming-tasks-portlet .tasks-entries-container .low a {
	background: url(../images/priority_low.png) no-repeat 0 50%;
}

.tasks-portlet .task-data-table .due-date, .upcoming-tasks-portlet .tasks-entries-container .due-date a {
	background: url(@theme_image_path@/common/date.png) no-repeat 0 50%;
}

.ie6 .tasks-portlet .tags {
	width: 250px;
}

/* ---------- Extras ---------- */

.tasks-portlet {
	.control-wrapper, .filter-wrapper {
		@include border-radius(4px);
	}
}