/*
 * Redhopper - Kanban boards for Redmine, inspired by Jira Agile (formerly known as
 * Greenhopper), but following its own path.
 * Copyright (C) 2015-2019 infoPiiaf <contact@infopiiaf.fr>
 *
 * This file is part of Redhopper.
 *
 * Redhopper is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * Redhopper is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Redhopper.  If not, see <http://www.gnu.org/licenses/>.
 */
$gutter: 1em

=space($margin, $padding: $margin)
	margin: $margin
	padding: $padding

.KanbanBoard
	+space(0)

	display: flex
	flex-direction: row
	list-style: none
	overflow: scroll
	text-align: center

	&-column
		margin: 0 $gutter
		/* width property is ignored in flexbox */
		max-width: 20em
		min-width: 20em

	ol, ul
		+space(0)

		list-style: none

.Column

	&-dropzone
		background-color: transparent
		border: 2px dashed transparent
		border-radius: 5px
		height: $gutter

		&[dropzone=move]
			border-color: lightgray

		&.dragover
			background-color: lightgray

.Kanban
	margin: 0

	table
		display: block
		width: 100%

	tbody
		display: block

	tr
		+space(0)

		background-color: lighten(lightgray, 10%)
		border-radius: 2px
		box-shadow: 0 1px 1px 0 darken(lightgray, 50%)
		display: block

		&.highlight_danger
			background-color: lighten(lightcoral, 10%)

		&.highlight_warning
			background-color: lightgoldenrodyellow

	td
		+space(0)

		display: block

		&:after
			content: ""
			display: block
			clear: both


	input[type=checkbox]
		float: left
		margin: 0 0 $gutter

	.unsortable, .sortable
		float: right

	p
		clear: both
		margin: 0 0 $gutter

		&.blocker
			margin: $gutter / 2 $gutter

			span
				text-decoration: underline dashed

	.issue-id
		float: left
		margin-left: 0.2em

	.issue-due-before
		float: left

		&.overdue
			color: red
			font-weight: bold

	.meta-data
		float: right

		span
			margin: 0 0 0 $gutter

			&.icon-user
				img.gravatar
					width: 32px
					height: 32px

/* Prevent the text contents of draggable elements from being selectable. */
[draggable]
	-moz-user-select: none
	-khtml-user-select: none
	-webkit-user-select: none
	user-select: none
	/* Required to make elements draggable in old WebKit */
	-khtml-user-drag: element
	-webkit-user-drag: element

.icon-exclamation
	background-image: url(../../../images/locked.png)
