@import "compass";

$border-color: #EBEBEB;
$section-header-bg: #CCE6F7;
$toolbar-bg: #DCE3EA;

#wrapper .contacts-portlet .panel-page-body {
	padding: 0;
}

.contacts-portlet {
	.clear {
		clear: both;
	}

	.aui-column-content, .aui-column-content-center {
		padding: 0;
	}

	.toolbar-content {
		.filter-container {
			float: left;
		}
	}

	.contact-group-filter {
		font-size: 14px;
		min-height: 31px;

		.contact-group-filter-select select {
			width: 223px;
		}

		.contact-group-filter-content {
			padding: 5px;
		}

		select {
			height: 26px;
		}
	}

	.contacts-search {
		float: left;
		width: 30%;

		.contacts-search-content {
			height: 28px;
			padding: 5px 0;
			position: relative;

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

			.search-input {
				left: 5px;
				position: absolute;
				right: 5px;
			}
		}
	}

	.lfr-contact {
		border-bottom: 1px solid #CCC;

		.lfr-contact-checkbox {
			float: left;
			padding: 5px;
		}
	}

	.lfr-contact-grid-item, .lfr-detail-info {
		display: block;
		overflow: hidden;

		.lfr-contact-thumb {
			float: left;
		}

		.lfr-contact-thumb img {
			width: 100px;
		}

		.lfr-contact-info {
			margin-left: 100px;

			&.no-icon {
				margin-left: 0;
			}

			.lfr-contact-name {
				font-weight: bold;
			}

			.lfr-contact-extra {
				color: #777;
			}

			.lfr-social-relations {
				margin-top: 5px;

				span {
					margin-right: 10px;
				}
			}
		}

		.lfr-contact-extra, .lfr-contact-job-title, .lfr-contact-name {
			overflow-x: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}
	}

	.contacts-container {
		.lfr-contact-grid-item {
			margin-bottom: 5px;
			padding-left: 5px;
			padding-top: 5px;

			.lfr-contact-thumb img {
				width: 80px;
			}
		}

		.lfr-selected-user {
			cursor: pointer;

			&.alt {
				background-color: #F5F8FB;
			}

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

		.portlet-msg-success {
			border-width: 0 0 1px;
			margin: 0;
		}
	}

	.contacts-result, .my-contacts {
		.lfr-contact-grid-item {
			cursor: pointer;
			height: 35px;
			padding: 5px;

			.lfr-contact-thumb {
				height: 35px;
				overflow: hidden;

				img {
					width: 35px;
				}
			}
		}
	}

	.contacts-result {
		border-right: 1px solid #C9C9C9;
		width: 30%;

		.contacts-result-content {
			bottom: 0;
			overflow-x: hidden;
			overflow-y: scroll;
			position: absolute;
			top: 40px;
			width: 250px;

			.more-results a {
				border: 1px solid #CCC;
				display: block;
				margin: 5px;
				padding: 2px;
				text-align: center;

				&:hover {
					background-color: #CCE6F7;
					text-decoration: underline;
				}
			}
		}

		.lfr-contact-grid-item .lfr-contact-info {
			font-size: 1em;
			margin-left: 0;
			overflow-x: hidden;
			padding-left: 10px;
		}

		.lfr-contact-grid-item:hover, .more-results {
			background-color: #E8EFF4;
		}

		.empty {
			background: url(@theme_image_path@/messages/alert.png) no-repeat 0 50%;
			margin: 5px;
			padding-left: 25px;
		}

		.last-name-anchor a {
			background: $section-header-bg;
			border-bottom: 1px solid $border-color;
			cursor: default;
			display: block;
			padding: 1px 5px;
		}

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

	.personal-contact-list .contacts-result-content {
		top: 38px;
	}

	.my-contacts {
		padding-left: 8px;

		.lfr-contact-grid-item .lfr-contact-info {
			margin-left: 40px;
		}
	}

	.contacts-home {
		padding: 5px;
	}

	.contacts-profile {
		.lfr-detail-info {
			border-bottom-width: 0;
			padding: 10px 10px 5px;
		}

		.lfr-contact-name {
			font-size: 2em;
			height: 1.25em;
			line-height: 1em;
			overflow: hidden;
			position: relative;
			text-overflow: ellipsis;
		}

		.lfr-contact-name a {
			position: absolute;
		}

		.lfr-contact-job-title {
			color: #777;
			font-size: 1.25em;
			font-weight: bold;
		}

		.aui-column-content {
			padding: 10px;
		}

		.aui-column:before {
			border-width: 0;
		}

		.social-relations .lfr-asset-metadata {
			display: none;
		}
	}

	.contacts-result-container .contacts-container {
		min-height: 600px;
	}

	.contacts-result-container-content {
		padding-left: 250px;
		position: relative;

		.contacts-list {
			bottom: 0;
			left: 0;
			position: absolute;
			top: 0;
			width: 250px;

			.contacts-search {
				background: $toolbar-bg;
				border-bottom: 1px solid #C9C9C9;
				padding: 5px;

				.aui-field-input {
					width: 208px;
				}
			}
		}

		.contacts-container {
			float: none;
			width: 100%;

			.lfr-button-column {
				background-color: #E9E8E8;
				overflow: hidden;
				padding: 4px 6px;

				.edit-toolbar {
					margin: 0;
					overflow: visible;
				}

				.aui-icon-remove-coworker {
					background-image: url(@theme_image_path@/social/remove_coworker.png);
				}

				.aui-icon-add-coworker {
					background-image: url(@theme_image_path@/social/add_coworker.png);
				}

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

				.aui-icon-block {
					background-image: url(@theme_image_path@/social/block.png);
				}

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

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

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

				.aui-icon-follow {
					background-image: url(@theme_image_path@/social/follow.png);
				}

				.aui-icon-send-message {
					background-image: url(@theme_image_path@/mail/compose.png);
				}

				.aui-icon-unblock {
					background-image: url(@theme_image_path@/social/unblock.png);
				}

				.aui-icon-unfollow {
					background-image: url(@theme_image_path@/social/unfollow.png);
				}

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

		.contacts-profile .lfr-contact-info {
			padding: 8px;
		}
	}

	.social-relations {
		width: auto;

		a {
			display: inline-block;
			padding: 3px 4px;

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

	.contacts-action-content span {
		display: inline-block;
		padding: 3px 4px 0px;

		&:first-child {
			padding-left: 10px;
		}
	}

	.search-column {
		width: 240px;
	}

	.section {
		border-bottom: 1px solid #E7E7E7;
		clear: both;
		padding: 10px;
		zoom: 1;

		&:after {
			content: "";
			display: block;
			clear: both;
		}

		h3 {
			color: #B4BEC8;
			float: left;
			font-size: 1em;
			margin: 0;
			text-align: right;
			width: 100px;
		}

		.property-list {
			margin: 0 0 0 105px;
			padding: 0;
		}
	}

	.toolbar {
		background-color: $toolbar-bg;
		min-height: 31px;

		.add-contact {
			float: right;
			margin: 5px;

			input {
				background: #E9E8E8 url(@theme_image_path@/common/add.png) no-repeat 5px 4px;
				padding-left: 25px;
			}
		}
	}

	.portlet-content {
		.portlet-body {
			border: 1px solid #C9C9C9;

			.lfr-app-column-view {
				border-width: 0;
			}
		}
	}

	.property-type {
		font-weight: bold;
	}

	.property-list li {
		list-style: none;
	}

	.user-information-title {
		color: #666;
		font-size: 1.5em;
		text-align: right;
		width: 110px;
	}

	.lfr-user-info-container {
		margin-bottom: 10px;
	}

	.lfr-user-comments {
		float: none;
	}

	.contacts-center-home {
		.contacts-center-home-content {
			padding: 10px;
		}

		.header-title {
			margin: 0px;
		}

		.contacts-count {
			font-weight: bold;

			&, .contacts-center-introduction {
				margin: 5px 0;
			}
		}
	}

	.export-group {
		margin-top: 1em;
	}

	.lfr-user-profile-preferences {
		margin-left: 20px;
	}

	.lfr-user-action-confirm a {
		background: url(@theme_image_path@/common/activate.png) no-repeat;
	}

	.lfr-user-action-ignore a {
		background: url(@theme_image_path@/common/deactivate.png) no-repeat;
	}

	.lfr-asset-metadata {
		margin-bottom: 5px;

		.lfr-asset-coworker, .lfr-asset-follower, .lfr-asset-following {
			padding: 0 20px
		}

		.lfr-asset-coworker {
			background: url(@theme_image_path@/social/coworker.png) no-repeat;
		}

		.lfr-asset-follower {
			background: url(@theme_image_path@/social/follower.png) no-repeat;
		}

		.lfr-asset-following {
			background: url(@theme_image_path@/social/following.png) no-repeat;
		}
	}

	.members-container {
		clear: both;
		margin: 1em 0;
	}

	.lfr-members-grid-item {
		float: left;
		height: 50px;
		margin-bottom: 10px;
		max-width: 300px;
		min-width: 200px;
		overflow: hidden;
		width: 25%;

		.lfr-members-thumb {
			float: left;
			margin: 0 5px;

			a {
				clip: rect(0 50px 50px 0);
				position: absolute;
			}

			img {
				width: 50px;
			}
		}

		.lfr-user-data-info {
			margin-left: 60px;
		}

		.lfr-user-data-name {
			font-weight: bold;
		}

		.lfr-user-data-extra, .lfr-user-data-job-title, .lfr-user-data-name a {
			overflow: hidden;
			text-overflow: hidden;
			word-wrap: nowrap;
		}
	}

	.edit-profile {
		cursor: pointer;
	}

	.lfr-panel, .taglib-header {
		margin-bottom: 1em;
	}

	.lfr-search-container {
		margin-top: 1em;
	}

	.my-profile .field-group:hover {
		background: #E9E8E8 url(@theme_image_path@/common/edit.png) no-repeat right 5px;
		cursor: pointer;
	}

	.profile-actions {
		background: #EEE;
		border: 1px solid #C7D0DA;
		margin: 20px 65px;
		padding: 4px 4px 0;

		.portlet-msg-info {
			background-color: transparent;
			border-width: 0;
			margin: 0;
		}

		h3 {
			color: #B4BEC8;
			float: left;
			font-size: 1em;
			margin: 0;
			text-align: right;
			width: 100px;
		}

		.field-actions-toolbar {
			.actions-conjunction {
				display: inline-block;
				font-weight: bold;
				list-style: none;
				padding: 10px 5px;
			}

			.settings-actions {
				display: inline-block;
				margin: 0px;
				padding-left: 24px;
			}

			.settings-header-label {
				font-weight: bold;
				padding: 0 5px;
			}

			.action-field {
				background: url(@theme_image_path@/common/add.png) no-repeat 2px 50%;
				float: left;
				margin: 2px;
				padding-left: 21px;
			}

			.lfr-token {
				background-color: #FFF;
				border-width: 0;

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

	.profile-actions-title {
		color: #929292;
		font-weight: bold;
		padding: 6px 0 0;
	}
}

.contact-dialog {
	input[type="text"], textarea {
		width: 90%;
	}

	.aui-field-text {
		display: block;
		margin-bottom: 10px;
	}
}

.profile-dialog {
	input[type="text"], select {
		padding: 5px 1px;
	}

	.addresses .aui-field {
		float: none;
		width: auto;
	}

	.aui-field.primary-ctrl {
		margin: 1.8em 0;
	}

	.aui-field-select .aui-field-content {
		margin: 10px 0;
	}

	.form-section h3 {
		display: none;
	}

	.lfr-textarea {
		height: 60px !important;
		width: 350px !important;
	}

	.social-network {
		clear: both;
		overflow: hidden;

		.aui-field {
			float: left;
		}

		img {
			margin-left: 1.5em;
			margin-top: 2.4em;
		}
	}

	.user-profile-image {
		padding-top: 20px;

		.lfr-change-logo {
			background: none;
		}
	}
}

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

.contacts-portlet {
	.contacts-container .portlet-msg-success {
		@include border-radius(0);
	}

	.profile-actions {
		@include border-radius(4px);
	}
}

.private-messaging-portlet {
	.message-to input, .message-subject input {
		width: 300px;
	}

	.message-body {
		width: 90%;
	}
}