// ------------ Aloha styles for adding/editing tables ------------ //

$alohaTableOptionsHeight: 25px;
$alohaTableOptionsWidth: 25px;

.aloha-table {
	tr.aloha-table-selectcolumn {
		line-height: 0.01em;
		height: $alohaTableOptionsHeight !important;
	}

	td.aloha-table-selectrow {
		width: $alohaTableOptionsWidth !important;
	}
}

.aloha-editable div.aloha-table-wrapper,
.aloha-table-wrapper div.aloha-table-cell-editable,
.aloha-table-wrapper .aloha-table-leftuppercorner div,
.aloha-table-wrapper tr.aloha-table-selectcolumn td,
.aloha-table-wrapper td.aloha-table-selectrow,
.aloha-table-wrapper div.aloha-editable-caption {
	margin: 0;
	padding: 0;
	border-color: #444;
	background: 0;
	outline: 0 solid transparent;
	zoom: 1;
}

div.aloha-table-cell-editable {
	height: 100%;
	min-height: 100%;
	width: 100%;
	z-index: 99999;
}

tr.aloha-table-selectcolumn td,
td.aloha-table-selectrow {
	visibility: hidden;
}

.aloha-editable-active {
	tr.aloha-table-selectcolumn td,
	td.aloha-table-selectrow {
		visibility: visible;
	}
}

.aloha-cell-selected {
	background-color: $blue !important;
	color: $textOnGray;
}

.aloha-table {
	td.aloha-table-selectrow,
	tr.aloha-table-selectcolumn td {
		background-color: #444;

		&:hover {
			background-color: $blue;
		}
	}

	td .aloha-table-cell-editable {
		cursor: text !important;
	}

	tr.aloha-table-selectcolumn td {
		cursor: s-resize;
	}

	td.aloha-table-selectrow {
		cursor: e-resize;
	}
}

.aloha-table-textarea {
	width: 90%;
	height: 100px;
	margin-left: 5px;
	margin-right: 5px;
}

.aloha-table-label {
	margin-left: 5px;
}

.aloha-block:hover > .aloha-block-draghandle,
.aloha-block-active > .aloha-block-draghandle {
	display: block;
}

.aloha-block-droppable {
	border-left: 1px solid $warning;
	margin-left: -1px;
}

.aloha-ie7 .aloha-block-droppable {
	margin-left: 0;
}

.aloha-block-droppable.aloha-block-droppable-right {
	margin-left: 0 !important;
	border-left: none !important;
	margin-right: -1px;
	border-right: 1px solid $warning;
}

.aloha-block-droppable-blocklevel {
	position: relative;
}

.aloha-block-blockleveldragdropline {
	position: absolute;
	width: 100%;
	height: 2px;
	background-color: $warning;
	bottom: 0;
}

.aloha-block .aloha-editable {
	cursor: auto;
}

.aloha-block {
	position: relative;
}

.aloha-block:hover>.aloha-block-draghandle, .aloha-block-active>.aloha-block-draghandle {
	display: block;
}

.aloha-block-draghandle {
	position: absolute;
	left: 0px;
	top: 0px;
	padding: 5px 0px 0px 5px;
	@include box-sizing(border-box);
	height: $alohaTableOptionsHeight !important;
	width: $alohaTableOptionsWidth !important;
	overflow: hidden;
	display: hidden;
	line-height: 1em;
	@include icon-FontAwesome();
	font-size: 16px;
	cursor: pointer;
	color: $textOnGray;

	&:hover {
		color: $blue;
	}

	&:before {
		text-decoration: inherit;
		display: inline-block;
		speak: none;
		content: $move;
	}
}

.aloha-table-wrapper .aloha-table-leftuppercorner {
	.aloha-wai-red,
	.aloha-wai-green {
		display: none;
	}

	&:hover {
		background: #444 !important;
		cursor: pointer !important;
	}
}

.aloha-block.ui-draggable-dragging .aloha-block-draghandle {
	display: none;
}

.aloha-block-editor label {
	display: block;
}

.aloha-block-dropInlineElementIntoEmptyBlock {
	border: 1px solid $warning;
}

.aloha-block-dropzone {
	background-color: #CCC;
}