@import "compass";
@import "mixins";

.private-messaging-portlet {
	.layout {
		width: auto;
	}

	.alert {
		margin-bottom: 0;
	}

	.column-content .check-all {
		margin: 0 20px 0 5px;
	}

	.lfr-search-container {
		margin: 0;
		overflow: visible;
	}

	.controls {
		background: #EEE9E9;
		border-bottom-width: 0;
		padding: 5px 10px;

		.check-all {
			float: left;
			margin: 0 18px 0 0;
		}
		
		.pull-right {
			float: right;
		}
	}

	.table-bordered th, .aui .table-bordered td {
		border:none;
	}

	.messages .table-data tr.mobile td {
		border: none;
		background: #f5f5f5;
		box-shadow: 0 1px 3px rgba(0,0,0,0.4);
		-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
		-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}

	.messages .table-data tr.unread td {
		background: #D1D1E1;
	}

	.taglib-user-display {
		position:relative;
		z-index:10;
	}

	.user-profile-image {
		width:78px;
		height:78px;
		border-radius:45px;
		-webkit-border-radius:45px;
		-moz-border-radius:45px;
		border: #9e9e9f solid 1px;
		margin-right:10px;
		overflow:hidden;
		
		img.avatar {
			width:80px;
		}
	}
	
	.table-bordered, .table-bordered th, .table-bordered td {
		border:none;
	}
	
	.table-data tr:nth-child(odd) td,
	.table-data tr td,
	.table-striped .table-data .first,
	.table-striped .table-data .last {
		background: #f5f5f5;
		border-bottom:#fff solid 10px
	}
	
	.table-striped {
		border-spacing: 0px 15px;	
	}	
	
	.message-link {
		.subject {
			padding-top: 2px;
			color: #E98003;
			font-weight: bold;
			word-wrap: break-word;
		}
		
		.body {
			padding-top: 6px;
			color: #000;
			margin-bottom: 8px;
			word-wrap: break-word;
			text-decoration:none;
			/*
			display: flex;
			display: -webkit-flex;
			*/
		}
		
		.footer {
			font-size: .88em;
			color: #999;
		}
	}
	.message-link:hover {
		text-decoration:none;
	}
	
	/*
	.message-link .body, .message-link .subject {
		font-size: 16px;
		overflow-x: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		line-height: 20px;
		max-width: 842px;
	}
	*/
	
	img.avatar {
		max-width: 80px;
	}

	.thread .message-container {
		margin: 0 10px;
	}

	.message-container .portlet-msg-error {
		display: block;
		margin-bottom: 10px;
	}

	.message-attachments {
		clear: both;

		li {
			list-style: none;
		}
	}

	.message-to input, .message-subject input {
		width: 500px;
	}

	.message-body, .message-subject, .message-to {
		width: 500px;
	}

	.message-body {
		height: 80px;
	}

	input[type="file"] {
		height: 24px;
		line-height: 24px;
		padding: 0;
	}

	.author-sender {
		font-weight: normal;
		color: #777;
	}

	.private-messaging-container .results-header, .taglib-user-display.display-style-2 .user-details, .taglib-user-display.display-style-2 .user-name {
		display: none;
	}

	.table {
		border-top: 0;
		margin-bottom: 0;

		thead {
			display: none;
		}

		.first {
			vertical-align: middle;
			width: 12px;
		}
	}

	/* Messages */

	.taglib-page-iterator {
		padding: 10px;

		.lfr-pagination-buttons, .lfr-pagination-config, .search-results {
			line-height: 30px;
		}
	}

	.taglib-search-iterator-page-iterator-top {
		border-top: 1px solid #DDD;
		margin-bottom: 0;
	}

	/* Thread */

	.thread {
		.body {
			line-height: 20px;
			padding: 5px 5px 0 0;
			margin-bottom: 10px;

			-ms-word-break: break-all;
			word-break: break-word;
			word-wrap: break-word;
			-webkit-hyphens: auto;
			-moz-hyphens: auto;
			hyphens: auto;					

			.image-thumbnail {
				float: left;
				height: 84px;
				width: 84px;
				margin: 10px;

				img {
					max-height: 84px;
					max-width: 84px;
				}
			}
		}

		.thread-info {
			padding: 0 10px 10px;
		}

		tr td {
			background-color: transparent;
			border-bottom: 1px solid #CFCFCF;

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

		.lfr-search-container, .message-body-container-content {
			margin: 0;
		}

		.name {
			font-weight: normal;
			color: #777;
		}
	}

	.date {
		color: #777;
	}

	.messages .taglib-user-display, .thread .taglib-user-display {
		float: left;
		padding: 0;
	}

	.line-through {
		text-decoration: line-through;
	}
	
	.ww-portlet {
		h3 {
			font-size: 20px; 
			color: #999;
		} 
		h4 {
			font-size: 18px;
			color: #000;
		} 
	}
}

/* ---------- Responsive ---------- */

@include respond-to(phone) {
	.private-messaging-portlet {
		.message-to input, .message-subject input {
			width: 275px;
		}

		.message-body, .message-subject, .message-to {
			width: 275px;
		}

		.message-body {
			height: 60px;
		}
	}
}

/*
html.aui {
	@media (max-width: 979px) {
		.private-messaging-portlet {
			.btn-group, .button-holder {
				width: auto;
			}
		}
	}

	@media (max-width: 767px) {
		.private-messaging-portlet {
			button, button:hover {
				width: 100%;

				&.close {
					width: auto;
				}
			}
		}
	}
}
*/

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

.private-messaging-portlet .controls {
	@include border-radius(4px);
}

.ie7 .private-messaging-portlet {
	.message-to {
		position: relative;
		z-index: 1;
	}
}