@import "aui/alloy-font-awesome/scss/variables";
@import "compass";

/* ---------- Dragging/sorting indicators ---------- */

.portlet-layout.dragging {
	border-collapse: separate;
}

.drop-area {
	background-color: #D3DADD;
}

.active-area {
	background: #FFC;
}

.portlet-boundary.yui3-dd-dragging {
	@include opacity(0.6);

	.portlet {
		border: 2px dashed #CCC;
	}
}

.sortable-layout-proxy {
	@include opacity(1);

	.portlet-topper {
		background-image: none;
	}
}

.proxy {
	cursor: move;

	@include opacity(0.65);

	position: absolute;

	&.generic-portlet {
		height: 200px;
		width: 300px;

		.portlet-title {
			padding: 10px;
		}
	}

	&.not-intersecting .forbidden-action {
		background: url(../images/application/forbidden_action.png) no-repeat;
		display: block;
		height: 32px;
		position: absolute;
		right: -15px;
		top: -15px;
		width: 32px;
	}
}

.resizable-proxy {
	border: 1px dashed #828F95;
	position: absolute;
	visibility: hidden;
}

.sortable-proxy {
	background: #727C81;
	margin-top: 1px;
}

.lfr-freeform-layout-drag-indicator {
	visibility: hidden;
}

.sortable-layout-drag-target-indicator {
	margin: 2px 0;
}

.yui3-dd-proxy {
	z-index: 1110 !important;
}

/* ---------- Portal tool tips ---------- */

.tooltip {
	max-width: 200px;
}

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

.tagselector-content {
	border-width: 0;
	margin-bottom: 15px;
	overflow: visible;
	padding: 0;

	.textboxlistentry-holder {
		background: #FFF;
		border: 1px solid #CCC;
		margin-bottom: 5px;
		overflow: visible;
		padding: 5px;
		position: relative;

		li {
			line-height: 1;
		}

		.lfr-tag-selector-input {
			border-width: 0;
			margin-bottom: 0;
		}
	}

	.textboxlistentry-remove {
		padding: 0 3px 1px;
	}
}

.tagselector {
	.lfr-tags-selector-content {
		border-width: 0;
	}

	.lfr-tag-selector-input {
		background: none;
		padding: 0;
		width: auto;
	}

	.field .field-content {
		margin: 0;
	}

	.textboxlist-input-container {
		margin: 0;
	}
}

.tagselector-focused .textboxlistentry-holder {
	background: #FFF none;
	border: 1px solid #CCC;
}

.categoriesselector-content .textboxlistentry-holder {
	background-color: transparent;
	border-width: 0;
	padding: 0;
}

/* ---------- Tag cloud and tag list ---------- */

.tag-items {
	list-style: none;
	margin: 0 1em 0 0;
	padding: 0 1em 0.5em 1em;
	white-space: normal;

	li {
		display: inline;
		float: left;
		margin: 0 1em 0 0;
	}

	a {
		white-space: nowrap;
	}
}

.tag-selected {
	color: #000;
	font-weight: bold;
	text-decoration: none;
}

.tag-cloud {
	line-height: 2.5em;

	$tag-popularity-font-size: 0.7em;

	@for $i from 1 through 6 {
		.tag-popularity-#{$i} {
			font-size: $tag-popularity-font-size + ($i * 0.3);
		}
	}
}

/* ---------- Underlay ---------- */

.underlay {
	clear: both;
	top: 100%;

	.yui3-widget-hd {
		height: 38px;
	}

	.lfr-portlet-item {
		border-width: 0;
	}
}

.underlay-hidden {
	display: none;
}

.underlay-content {
	background: #F4F3F3 url(../images/common/message_panel_shadow.png) repeat-x 0 0;
	border: 0 solid #AEAFB1;
	border-width: 0 1px 1px;
}

.underlay-close {
	position: absolute;
	right: 5px;
	top: 5px;
}

/* ---------- Tabs ---------- */

.tab-active strong {
	font-weight: normal;
}

.tab-back {
	float: right;
}

.tab-back-content {
	border-width: 0;
	padding: 1px;
}

/* ---------- Miscellaneous ---------- */

.lfr-panel-container {
	background: #FFF;
}

.lfr-panel-content {
	padding: 5px 10px;
}

.lfr-panel-basic .lfr-panel-content {
	padding-left: 15px;
}

.dialog-bd {
	min-height: 30px;
}

.dialog-content {
	border: 1px solid #C8C9CA;
	padding: 5px;
}

.panel-hd {
	background: #C0C2C5 url(../images/application/panel_header_bg.png) repeat-x 0 0;
	border: 1px solid;
	border-color: #C8C9CA #AEB2B8 #AEB2B8 #C8C9CA;
	padding-left: 10px;
	text-shadow: 1px 1px #FFF;
}

.app-view-drop-active {
	background-color: #00A2EA;
	font-weight: bold;

	.category-portlets & {
		color: #FFF;
	}
}

.basecelleditor [class~="form-validator-message"] {
	clip: rect(auto auto auto auto);
	width: auto;
}

.document-library-file-entry-cell-editor-hidden {
	display: none;
}

.previous-level {
	display: inline-block;
	font-size: 21px;
	line-height: 21px;
	margin-right: 5px;
	text-decoration: none;
	vertical-align: middle;
}

/* ---------- Menus ---------- */

.lfr-page-templates li {
	a {
		padding: 0;

		label {
			cursor: pointer;
			display: block;
			padding: 5px 0 5px 5px;
		}
	}
}

.menu {
	position: absolute;
	width: auto;

	.notice-message {
		background-image: none;
		margin: 3px;
		padding: 6px;
	}
}

.menu-content {
	background: #FFF;
	list-style: none;
	min-width: 150px;

	li {
		margin: 0;
		padding: 0;

		.disabled {
			color: #999;
		}
	}
}

.menu-content {
	background: #CCC9C9 url(../images/application/menu_bg.png) repeat-x 0 0;
	border: 1px solid;
	border-color: #AEAFB1 #777879 #777879 #AEAFB1;
	padding: 2px 0;
}

.menugroup-content .menu-label {
	background: #D2D6DE;
	color: #5B677D;
	display: block;
	padding: 5px 3px;
	text-shadow: 1px 1px #FFF;
}

.menugroup-content ul {
	display: block;
	min-width: 0;
}

.menu-content li {
	border-bottom: 1px solid #BCBBBB;
	border-top: 1px solid #EEE;
	display: block;
	margin: 0;
	padding: 0;

	&.first {
		border-top-width: 0;
	}

	&.last {
		border-bottom-width: 0;
	}
}

.menu-content li a, .menu-content li .disabled {
	color: #2C2F34;
	display: block;
	padding: 4px 5px;
	text-decoration: none;
}

.menu-content li a.focus, .lfr-menu-expanded li a:focus {
	background-color: #5B677D;
	color: #FFF;
	text-shadow: -1px -1px #2C2F34;
}

/* ---------- Loading mask ---------- */

.loadingmask-content {
	background: #CCC;
}

.loadingmask-message {
	background: #D4D4D4 url(../images/portlet/header_bg.png) repeat-x 0 0;
}

/* ---------- Tree view ---------- */

.tree-node {
	.icon-check {
		padding-right: 2px;

		&:before {
			content: $check-empty;
		}
	}

	.tree-node-checked {
		.icon-check {
			padding-right: 0;

			&:before {
				content: $check;
			}
		}
	}

	.tree-node-over .tree-label {
		text-decoration: underline;
	}

	[class ^="icon-"] {
		margin-right: 5px;
	}

	.tree-node-checkbox-container {
		margin-right: 0;
	}

	.tree-node-selected .tree-label {
		background: none;
	}
}

.tree-node-content {
	.tree-hitarea {
		color: #999;
		font-size: 10px;
		padding-right: 6px;
	}

	.tree-label {
		margin-left: 3px;
	}

	.tree-node-hidden-hitarea {
		visibility: hidden;
	}
}

.tree-node-selected .tree-label {
	background-color: transparent;
}

/* ---------- Page customization ---------- */

.dragging .portlet-column.customizable {
	background-color: #CFFCCF;
	outline: 3px solid #9CC97B;
}

.customizable-layout-column-content {
	background-color: #C92C3C;

	&.yui3-widget-content-expanded {
		border: 3px solid #333;
		margin: 0.2em;
	}
}

.customizable .customizable-layout-column-content {
	background-color: #9CC97B;
}

.layout-customizable-controls {
	background-color: #FFF;
	font-size: 1.5em;
	margin: 1em;

	@include opacity(0.9);

	padding: 1em;
	position: absolute;
	z-index: 15;
}

/* ---------- Pagination ---------- */

.paginator-link {
	background: #EEE url() no-repeat scroll 50% 1px;
	border: 1px solid #F0F1F2;
	border-color: #F0F1F2 #B2B2B2 #949494 #F0F1F1;
	color: #1F1E1E;
	display: inline-block;
	height: 20px;
	padding: 0;
	text-indent: -9999px;
	width: 20px;
}

.paginator-page-link {
	height: auto;
	text-indent: 0;
}

.paginator-current-page {
	background: #0083BD url(../images/application/paginator_link_current_bg.png) 0 0 repeat-x;
	border-color: #38B6EF #006D9E #006D9E #46B4E6;
	color: #FFF;
	text-shadow: -1px -1px #003C57;
}

.paginator-first-link {
	background-image: url(../images/arrows/paging_first.png);
}

.paginator-prev-link {
	background-image: url(../images/arrows/paging_previous.png);
}

.paginator-last-link {
	background-image: url(../images/arrows/paging_last.png);
}

.paginator-next-link {
	background-image: url(../images/arrows/paging_next.png);
}

.paginator-current-page-report, .paginator-total {
	color: #555;
	font-size: 0.9em;
}

.paginator-current-page-report {
	margin-left: 2em;
}

.taglib-page-iterator .search-pages .page-links {
	padding: 0;
}

/* ---------- CKEditor contents ---------- */

.aui {
	.cke_editable [class*="span"] {
		float: none;
	}
}

/* ---------- CKEditor menu ---------- */

.aui {
	.cke_dialog .cke_dialog_ui_input_text {
		height: auto;
	}

	.cke_editable_inline a {
		cursor: pointer;
	}
}

/* ---------- CKEditor panel menu ---------- */

.cke_panel.cke_combopanel {
	width: 220px;
}

.cke_panel_block {
	.cke_panel_grouptitle {
		font-size: 20px;
		line-height: 20px;
		margin-top: 0;
	}

	.cke_panel_list {
		margin-left: 0;

		.cke_panel_listItem {
			line-height: initial;

			a:hover {
				text-decoration: none;
			}
		}
	}
}

/* ---------- CKEditor source ---------- */

.aui {
	.cke_source {
		@include box-sizing(border-box);
	}
}

/* ---------- CKEditor table ---------- */

.cke_show_border {
	width: 500px;

	td {
		height: 15px;
	}
}

/* ---------- HTML editor ---------- */

body.html-editor {
	background: #FFF;
	color: #000;
	padding: 1em;
}

.html-editor.portlet-message-boards {
	@include hyphenation;

	word-wrap: break-word;

	blockquote {
		background: #EEF0F2 url(../images/message_boards/quoteleft.png) no-repeat 5px 5px;
		border: 1px solid #777;
		padding: 5px 45px;

		&:after {
			background: url(../images/message_boards/quoteright.png) no-repeat 50%;
			content: '';
			display: block;
			float: right;
			height: 24px;
			margin-right: -35px;
			margin-top: -25px;
			width: 31px;
			z-index: 999;
		}

		cite {
			display: block;
			font-weight: bold;
		}
	}

	pre {
		background: #F9F9F9;
		border: 1px solid #777;
		padding: 0.5em;
	}
}

/* ---------- Inline editing ---------- */

.lfr-editable {
	$edit-color: #68BB30;
	$edit-color-hover: darken(#68BB30, 10);

	outline: 1px dashed $edit-color;
	outline-offset: 2px;
	position: relative;

	&:after {
		background: $edit-color url(../images/common/edit_white.png) no-repeat 50%;
		content: '';
		display: block;
		height: 20px;
		position: absolute;
		right: 5px;
		top: 5px;
		width: 30px;
	}

	&:focus {
		&:after {
			display: none;
		}

		&:hover {
			background-color: transparent;
		}
	}

	&:hover {
		background-color: rgba(255, 255, 255, 0.3);
		outline-color: $edit-color-hover;

		&:after {
			background-color: $edit-color-hover;
		}
	}
}

.lfr-editable-notice-close {
	margin-left: 1em;
}

.lfr-portlet-title-editable {
	margin-top: 0;
	z-index: 9999;

	.lfr-portlet-title-editable-content {
		padding: 0;

		.combobox-content {
			.field-content .field-input-text {
				display: block;
				margin-bottom: 0;
			}

			.field-label.textfield-label {
				display: none;
			}

			.toolbar-content {
				margin-top: 0;
				vertical-align: top;

				.btn-group {
					margin-top: 0;
				}
			}
		}
	}
}

.lfr-page-layouts .lfr-layout-template .layout-template-entry {
	height: 25px;
	width: 25px;
}

.ie {
	& input.cke_dialog_ui_input_text {
		height: auto;
	}

	.proxy.not-intersecting .forbidden-action {
		right: 2px;
		top: 2px;
	}
}

.ie7 {
	.menu-content li {
		z-index: 10;
	}

	.paginator-link {
		color: transparent;
		font-size: 0;
		overflow: hidden;
		text-indent: 0;
		vertical-align: middle;
	}

	.paginator-page-link {
		color: #1F1E1E;
		font-size: 1em;
		height: auto;
		line-height: 1.4;
		overflow: visible;
		text-indent: 0;
	}

	.paginator-current-page {
		color: #FFF;
	}
}

.ie8 {
	.row-fluid {
		input[class*=span].search-query {
			line-height: 20px;
			min-height: 20px;
		}
	}
}

.ios.mobile {
	.modal-content .dialog-iframe-bd {
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}
}