@import "compass";

.journal-article-component-list {
	margin: 10px 0 0 0;
}

.portlet-journal {
	.add-article-selector {
		display: inline-block;
		vertical-align: top;

		.lfr-meta-actions {
			padding-top: 0;
		}
	}

	.add-permission-button-row {
		float: left;
	}

	.article-separator {
		clear: both;
	}

	.article-toolbar {
		margin-bottom: 1em;

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

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

		.icon-expire {
			background-image: url(@theme_image_path@/common/time.png);
		}

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

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

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

	.form-section h3 {
		border-bottom: 1px solid #666;
	}

	.journal-metadata {
		min-height: 1.8em;
	}

	.article-structure-template-toolbar, .article-translation-toolbar {
		color: #34404F;
		display: block;
		margin: 0 auto;
		padding: 0;
	}

	.article-structure-template-toolbar {
		.article-structure-toolbar, .article-template-toolbar {
			display: inline;
			margin-bottom: 0;
			margin-left: 0.5em;
		}

		.article-template-image {
			max-height: 50px;
			max-width: 50px;
			vertical-align: middle;
		}
	}

	.article-translation-toolbar {
		.add-translations-menu {
			display: inline;
			float: none;
			margin-left: 2em;
			padding: 0.4em 0;

			li {
				display: inline;

				strong {
					display: inline;
				}
			}
		}

		.contains-translations {
			margin-top: 1em;
		}
	}

	.article-translation-toolbar {
		padding: 1em 0 0 0;
	}

	.journal-article-header-edit {
		background: #FCFCFC;
		border: solid #DDD;
		border-width: 1px 0;
		margin: 0 0 1em;
		padding: 1em;
	}

	.lfr-panel-basic {
		.lfr-panel-title {
			border-bottom: 1px solid #CCC;
			float: none;
			position: relative;
			top: -0.5em;

			span {
				background: #FFF;
				padding: 0 8px 0 4px;
				position: relative;
				top: 0.55em;
			}
		}

		.lfr-panel-content {
			background-color: #F0F5F7;
			padding: 10px;
		}

		.lfr-tag-selector-input {
			width: 100%;
		}
	}

	.lfr-app-column-view .lfr-app-column-view-content {
		background-color: #FAFAFA;
	}

	.journal-article-container {
		ul {
			margin: 0;
		}
	}

	.move-list {
		.move-article, .move-folder {
			background: #F0FAF0 url() no-repeat 5px 50%;
			border-bottom: 1px solid #CCC;
			display: block;
			font-weight: bold;
			margin-bottom: 1px;
			padding: 5px;
			padding-left: 25px;
			position: relative;
		}

		.move-article {
			background-image: url(@theme_image_path@/file_system/small/html.png);
		}

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

		.move-error {
			background-color: #FDD;
			background-image: url(@theme_image_path@/messages/error.png);
			font-weight: normal;

			@include opacity(0.6);

			.error-message {
				position: absolute;
				right: 5px;
			}
		}

		.unstyled {
			margin: 0;
		}
	}

	.journal-breadcrumb ul {
		margin-bottom: 0;
	}

	.move-list-info {
		margin: 5px 0;

		h4 {
			font-size: 1.3em;
		}
	}

	.structure-tree {
		list-style: none;
		position: relative;

		li {
			position: relative;
		}

		li.structure-field {
			&.repeatable-border {
				background: #F7FAFB;
			}

			&.selected {
				background: #EBFFEE;
				border: 1px #C3E7CC solid;
			}

			&.repeated-field .journal-article-variable-name {
				display: none;
			}
		}

		.placeholder {
			display: none;
		}

		.tree-sub-placeholder {
			margin-top: 10px;
		}

		.folder .field-container .journal-article-required-message {
			display: none;
		}

		.folder .field-container.required-field .journal-article-required-message {
			display: block;
			margin: 0;
		}

		.folder-droppable {
			clear: both;
		}

		.journal-subfield input {
			float: left;
		}

		.journal-subfield .journal-article-field-label {
			float: left;
			font-weight: normal;
			padding: 0 0 0 3px;
		}

		.journal-article-move-handler {
			display: none;
		}

		.journal-article-localized {
			font-size: 13px;
			padding-top: 5px;
		}

		.structure-field .structure-field {
			border: 1px solid #D0D0D0;
			border-left-width: 10px;
			margin: 7px 0 0 5px;
			padding: 7px 10px 10px;
		}
	}

	.component-group .tree-placeholder {
		display: none;
	}

	.journal-article-localized-checkbox {
		display: block;
		margin-top: 10px;
	}

	.journal-article-header-edit .journal-article-localized-checkbox {
		margin-bottom: 10px;
	}

	.journal-article-variable-name {
		float: right;

		.field-label {
			font-weight: normal;
			margin-right: 5px;
		}
	}

	.component-group-title {
		font-size: 12px;
		font-weight: bold;
		padding: 4px 0 0;
		text-decoration: underline;
	}

	.journal-article-component-container {
		margin: 3px;
		overflow: hidden;
	}

	.journal-component {
		color: #0E3F6F;
		cursor: move;
		line-height: 25px;
		padding-left: 30px;

		&.dragging {
			font-weight: bold;
		}
	}

	.journal-container {
		.group-info {
			dl {
				margin: 0 0 0 20px;

				dt {
					float: left;
					margin-right: 3px;
				}
			}
		}

		.search-info {
			background-color: #D3E8F1;
			padding: 10px;
			padding-right: 50px;
			position: relative;

			.keywords {
				float: none;
				font-size: 1.4em;
				font-weight: bold;
			}

			.change-search-folder {
				font-size: 0.8em;
				font-weight: normal;
			}

			.close-search {
				margin-top: -8px;
				position: absolute;
				right: 15px;
				top: 50%;
			}
		}
	}

	.journal-container, .article-entries-pagination {
		clear: both;
	}

	.article-entries-pagination {
		margin: 10px 0;
		text-align: center;

		.pagination-content {
			margin: 0;
		}
	}

	.lfr-header-row-content {
		padding-left: 0;
		padding-top: 0;
	}

	.lfr-journal-small-image-content img {
		margin-right: 1em;
	}

	.context-pane .context-pane-content {
		border-left: 1px solid #7B7B7B;
		position: relative;
	}

	.taglib-search-iterator-page-iterator-top, .taglib-search-iterator-page-iterator-bottom, .paginator-container {
		clear: both;
		padding: 5px;
		position: relative;
	}

	.taglib-search-iterator-page-iterator-top.page-iterator-bottom, .lfr-app-column-view .taglib-search-iterator-page-iterator-bottom {
		bottom: 0;
		left: 0;
		position: absolute;
		right: 0;
	}

	.taglib-search-iterator {
		table-layout: fixed;

		.align-left {
			word-wrap: break-word;
		}
	}

	.entry-thumbnail .taglib-workflow-status {
		left: 6px;
		margin: 0;
		padding: 0;
		position: absolute;
		top: 4px;

		.workflow-status {
			margin: 0;
			padding: 0;
		}
	}

	.app-view-entry-taglib.entry-display-style.display-icon {
		.entry-title {
			@include ellipsis;

			overflow: hidden;
			position: relative;
			white-space: nowrap;
		}
	}

	.journal-article-instructions-container {
		display: normal;
	}

	.journal-container {
		margin-top: 5px;
	}

	.journal-field-template {
		display: none;
	}

	.journal-fieldmodel-container {
		display: none;
	}

	.journal-icon-button {
		cursor: pointer;
	}

	.portlet-section-header td {
		background: #CFE5FF;
	}

	.journal-form-presentation-label {
		color: #0E3F6F;
		padding-top: 3px;
	}

	.journal-edit-field-control, .journal-list-subfield .journal-icon-button {
		display: none;
	}

	.journal-icon-button span img {
		margin-bottom: 3px;
	}

	.journal-article-instructions-message {
		margin: 5px 0 0 0;
	}

	.structure-links {
		margin-right: 0.5em;
	}

	.taglib-workflow-status {
		margin: 0 0 1em 0;
	}

	.default-link {
		font-size: 0.9em;
		font-weight: normal;
	}

	.journal-image-preview {
		border: 1px dotted;
		margin-top: 2px;
		overflow: scroll;
		padding: 4px;
		width: 500px;
	}

	.repeatable-field-image {
		cursor: pointer;
		position: absolute;
		right: 10px;
		top: 10px;
	}

	.repeatable-field-delete {
		display: none;
	}

	.repeated-field .repeatable-field-delete {
		display: inline;
	}

	.lfr-textarea {
		width: 350px;
	}

	.localization-disabled {
		.journal-article-language-options, .structure-field .journal-article-localized-checkbox {
			display: none;
		}
	}

	.journal-structure-selection-break {
		.journal-article-field-label, .journal-article-localized-checkbox, .journal-article-buttons {
			display: none;
		}
	}

	.journal-article-buttons {
		display: none;
	}

	.form-navigator {
		.article-info {
			font-weight: bold;
			margin-bottom: 15px;

			.article-name {
				color: #036;
				display: block;
				font-size: 14px;
			}

			.article-image {
				float: left;
				margin-right: 10px;
				padding: 0;
				width: 35px;
			}
		}
	}

	.display-page-item-container {
		margin-bottom: 1em;
		margin-top: 1em;

		.display-page-item {
			background-color: #DEE7F8;
			border: 1px solid #CAD8F3;
			padding: 5px 28px 5px 11px;
			position: relative;

			.display-page-item-remove {
				cursor: pointer;
				display: block;
				height: 16px;
				overflow: hidden;
				position: absolute;
				right: 8px;
				top: 3px;
				width: 16px;

				&:hover {
					background-color: #CAD8F3;
				}
			}
		}
	}

	.display-page-toolbar {
		margin-top: 0.5em;
	}

	.wcm-image-preview img {
		max-width: 600px;
	}
}

.portlet-journal-edit-mode {
	.structure-tree {
		li {
			background: url(@theme_image_path@/journal/form_builder_bg.png);
			border: 1px solid #C6D9F0;
			margin: 15px;
			padding: 10px 10px 10px 22px;

			&.structure-field {
				.structure-field {
					border-left: 10px solid #C6D9F0;
				}

				&.repeated-field {
					background: #F7FAFB;
					border: 1px dashed #C6D9F0;

					&.selected {
						border: 1px dashed #C3E7CC;
					}

					.journal-edit-field-control, .journal-delete-field {
						display: none;
					}
				}

				&.yui3-dd-draggable .journal-article-move-handler {
					background: transparent url(@theme_image_path@/application/handle_sort_vertical.png) no-repeat scroll right 50%;
					cursor: move;
					display: block;
					height: 20px;
					left: 7px;
					position: absolute;
					top: 8px;
					width: 16px;
					z-index: 420;
				}

				.journal-article-close {
					background: url(@theme_image_path@/journal/form_builder_close.png);
					cursor: pointer;
					display: block;
					height: 29px;
					position: absolute;
					right: -10px;
					top: -9px;
					width: 29px;
					z-index: 420;
				}

				.journal-edit-field-control {
					display: block;
				}

				.journal-article-instructions-container {
					display: none;
				}
			}

			&.parent-structure-field {
				background: none;
				background-color: #FFFFE6;
				border: 1px dotted #FFE67F;
				padding-bottom: 30px;

				.journal-article-close, .journal-delete-field {
					display: none;
				}
			}
		}

		span.folder, span.file {
			display: block;
			padding: 10px;
			padding-top: 0;
		}

		.placeholder, .tree-placeholder, .tree-sub-placeholder {
			background: #FFF;
			border: 1px #CDCDCD dashed;
			height: 100px;

			@include opacity(0.75);
		}

		li {
			margin: 10px;
			padding-top: 5px;
			position: relative;
		}
	}

	.repeatable-field-delete {
		display: inline;
	}

	.journal-article-buttons {
		display: block;
		margin-top: 18px;
		text-align: right;

		.edit-button, .repeatable-button {
			float: left;
			margin-left: 3px;
		}

		&:after {
			clear: both;
			content: ".";
			display: block;
			height: 0;
			visibility: hidden;
		}
	}

	.journal-list-subfield .journal-icon-button {
		display: inline;
	}

	.portlet-journal .structure-field .journal-article-localized-checkbox {
		display: none;
	}

	.journal-article-header-edit {
		width: 100%;
	}

	.taglib-form-navigator .form-section.selected {
		width: 100%;
	}

	.taglib-form-navigator .form-navigator, .article-translation-toolbar, .journal-article-general-fields, .article-toolbar {
		display: none;
	}
}

.display-page-dialog {
	.tree-label {
		a {
			color: black;
		}

		.layout-page-invalid {
			color: #AAA;
			font-style: italic;
		}
	}

	.selected-page-message {
		margin: 5px 0;
	}
}

.ie {
	.journal-article-edit-field-wrapper form {
		width: auto;
	}

	.journal-article-helper .not-intersecting .forbidden-action {
		right: 2px;
		top: 2px;
	}

	.portlet-journal {
		.structure-tree li {
			zoom: 1;
		}
	}
}

.journal-component {
	background: transparent url() no-repeat scroll 3px 3px;
}

.journal-component-text {
	background-image: url(@theme_image_path@/journal/text_field.png);
	background-position: 3px 9px;
}

.journal-component-textbox {
	background-image: url(@theme_image_path@/journal/textbox.png);
	background-position: 3px 6px;
}

.journal-component-textarea {
	background-image: url(@theme_image_path@/journal/textarea.png);
	background-position: 3px 4px;
}

.journal-component-image {
	background-image: url(@theme_image_path@/journal/image_uploader.png);
	background-position: 3px 7px;
}

.journal-component-documentlibrary {
	background-image: url(@theme_image_path@/journal/document_library.png);
}

.journal-component-boolean {
	background-image: url(@theme_image_path@/journal/checkbox.png);
	background-position: 3px 7px;
}

.journal-component-options {
	background-image: url(@theme_image_path@/journal/options.png);
	background-position: 3px 5px;
}

.journal-component-list {
	background-image: url(@theme_image_path@/journal/selectbox.png);
	background-position: 3px 9px;
}

.journal-component-multilist {
	background-image: url(@theme_image_path@/journal/multiselection_list.png);
	background-position: 3px 4px;
}

.journal-component-linktolayout {
	background-image: url(@theme_image_path@/journal/link_to_page.png);
	background-position: 3px 9px;
}

.journal-component-formgroup {
	background-image: url(@theme_image_path@/journal/form_group.png);
	background-position: 3px 5px;
}

.journal-component-selectionbreak {
	background-image: url(@theme_image_path@/journal/selection_break.png);
	background-position: 3px 12px;
}

.component-group {
	&.form-controls {
		border-top: 1px solid #E0ECFF;
	}

	.component-dragging {
		background-color: #FFF !important;
	}
}

.journal-article-helper {
	background: #DEDEDE;
	border: 1px #555 dashed;
	cursor: move;

	@include opacity(0.8);

	position: absolute;
	visibility: hidden;
	width: 100px;

	&.draggable-dragging {
		font-size: 15px;
	}

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

	.journal-component {
		height: 25px;
		line-height: 25px;
		margin-left: 5px;
		padding-left: 25px;
	}
}

.journal-article-edit-field-wrapper {
	&.overlaycontextpanel {
		margin: 0 13px 0 0;
		padding: 0;
		position: relative;
	}

	&.overlaycontextpanel-container, .overlaycontextpanel-container {
		background-color: #EBFFEE;
		border-color: #C3E7CC;
	}

	&.overlaycontextpanel-arrow-tl .overlaycontextpanel-pointer-inner {
		border-bottom: 10px solid #EBFFEE;
	}

	.container-close {
		display: none;
	}
}

.journal-article-edit-field {
	padding: 5px;
	position: relative;
	width: 180px;
	z-index: 420;

	.field {
		padding: 0;

		.textarea {
			height: 6em;
		}
	}

	strong {
		font-size: 14px;
		text-decoration: underline;
	}

	.journal-edit-label {
		margin-top: 10px;
	}
}

.journal-article-edit-field-wrapper {
	.cancel-button, .save-button {
		display: none;
	}

	&.save-mode {
		.close-button {
			display: none;
		}

		.save-button, .cancel-button {
			display: inline;
		}
	}

	.user-instructions {
		border-width: 0;
		margin-bottom: 1em;
		padding: 0;
	}

	.button-holder {
		margin-top: 1.5em;
	}
}

.structure-message {
	margin-top: 5px;
}

.save-structure-template-dialog textarea {
	height: 150px;
	width: 450px;
}

.save-structure-name {
	width: 470px;
}

.save-structure-description {
	height: 150px;
	width: 470px;
}

.journal-template-error {
	.scroll-pane {
		border: 1px solid #BFBFBF;
		max-height: 200px;
		min-height: 50px;
		overflow: auto;
		width: 100%;

		.inner-scroll-pane {
			min-width: 104%;
		}

		.error-line {
			background: #FDD;
		}

		pre {
			margin: 0;
			white-space: pre;

			span {
				background: #B5BFC4;
				border-right: 1px solid #BFBFBF;
				display: block;
				float: left;
				margin-right: 4px;
				padding-right: 4px;
				text-align: right;
				width: 40px;
			}
		}
	}
}

.active-area-proxy {
	background: #FFFFE0 url(@theme_image_path@/portlet/pop_up.png) no-repeat 10px 50%;
	font-size: 1.2em;
	padding: 0.3em 0.3em 0.3em 2em;
}