.panel.folders_panel  {
	width: 15%;
	
	.panel_bottom {
		background: none;
		border: 0px;
		border-radius: 0px;
		height: 30px;
		padding: 0px;
	}
	
	.quota_visible .panel_bottom {
		height: 42px;
	}
	.quota_visible.quota_has_text_below .panel_bottom {
		height: 60px;
	}
	
	.manage_folders {
		font-size: 8pt;
		line-height: 16px;
		text-align: center;
	}
}

.SettingsLayout .items_list .item {
	.unified_marker {
		border-radius: 10px;
		background: #959595;
		display: inline-block;
		color: white;
		font-size: 8pt;
		font-weight: normal;
		padding: 1px 6px;
	}
}
.messages_panel {

	.items_list {
		@import "../common/flag.less";
	}
	
	.items_list .item {
		.controls .separator,
		.data .separator {
			display: block;
		}
		
		.unified_marker,
		.search_folder_marker {
			display: none;
		}
		.custom_marker,
		.unified_messages_panel& .unified_marker,
		.search_multi_folders& .search_folder_marker {
			background: #959595;
			border-radius: 10px;
			color: white;
			display: block;
			float: right;
			font-size: 8pt;
			font-weight: normal;
			margin-top: 1px;
			padding: 0px 6px 1px;
		}
		
		.search_multi_folders& .search_folder_marker {
			background: inherit;
			color: #a1a3ab;
			border: solid 1px #a1a3ab;
			padding: 0px 6px;
			margin-left: 4px;
		}

		.search_multi_folders&.selected .search_folder_marker {
			color: #fff;
			border: solid 1px #fff;
		}

		.size {
			display: none;
			text-align: right;
			width: 40px;
		}

		.subject,
		.from {
			display: block;
			overflow: hidden;
		}

		.subject {
			color: #6d6d6d;
			font-size: 13pt;
			line-height: 130%;
		}

		&.selected .subject {
			color: @theme-list-selected-item-color;
		}

		&.nosubject .subject {
			color: #888888;
			.opacity(0.3);
		}

		&.selected.nosubject .subject {
			color: #ffffff;
		}

		.from {
			font-size: 10.5pt;
			margin-bottom: 10px;
			min-height: 16px;
		}

		.text {
			color: #b6b6b6;
			display: block;
			white-space: normal;
		}

		&.selected .text {
			color: #b4d4f0;
		}

		& > .separator {
			clear: both;
		}

		@import "../common/answered-marker.less";
		
		.importance {
			border: 1px solid;
			border-radius: 50%;
			display: inline-block;
			height: 14px;
			line-height: 1;
			margin-top: -3px;
			text-align: center;
			vertical-align: middle;
			width: 14px;

			.init-icon-font();
			
			&:before {
				content: "\e620";
				display: inline-block;
				font-size: 13px;
				vertical-align: top;
				width: 7px;
			}
		}
		
		&.selected .importance {
			color: #ffffff;
			border-color: #ffffff;
		}

		.attachments {
			display: inline-block;
			height: 20px;
			vertical-align: bottom;
			width: 20px;

			&.has_attachments {
				.init-icon-font();
				
				&:before {
					.opacity(0.7);
					
					content: "\e622";
					font-size: 20px;
				}
			}

			&.has_vcard_attachment:before {
				content: "\e621";
			}

			&.has_ical_attachment:before {
				content: "\e623";
			}
		}
		
		&.selected .attachments.has_attachments:before {
			color: @theme-list-selected-item-color;
		}
		
		@import "../common/thread-pin.less";
	}
}

.messages_panel .items_list .item {
	.from {
		margin-bottom: 6px !important;
	}
	
	.thread-pin {
		margin-top: 2px !important;
	}
}

@media
	only screen and (-webkit-min-device-pixel-ratio: 1.3),
    only screen and (-moz-min-device-pixel-ratio: 1.3),
    only screen and (~"-o-min-device-pixel-ratio: 1.3 / 1"),
    only screen and (min-resolution: 1.3dppx),
    only screen and (min-resolution: 125dpi)
{
	.file .icon,
	.messages_panel .items_list .item .marker,
	.panel.files .items_list .folder .icon,
	.html_editor .toolbar .item .icon
	{
		background-image: url("../../images/sprites2x.png");
		background-size: 1440px 560px;
	}
}

.messages_panel .items_list .not_use_threads .item {
	& .thread_loading,
	&.thread_more_messages,
	& .thread-pin {
		display: none;
	}
}

.message_viewer {
	.panel_top,
	.panel_bottom {
		padding: 0px;
	}
	.panel_center {
		//.box-sizing;
		//background: none;
		overflow: auto;
	}
	
	.newtab & {
		height: 100%;
		width: 100%;
	}
	
	.panel_content {
		margin: 0px !important;
		padding: 0px !important;
	}
	
	.message_body {
		font-size: 11pt;
		padding: 20px;
		
		li {
			margin-bottom: 0.6em;
		}
	}
	
	.message_body_info {
		color: #cccccc;
		font: normal 18px Tahoma;
		margin: 30px;
		text-align: center;
		
		.message_body_secondary_info {
			font-size: 14px;
			margin-top: 10px;
		}
	}
	
	.message_header {
		background: @theme-mail-message-header-background;
		color: #4d4d4d;
		padding-bottom: 6px;
		position: relative;
		white-space: normal;

		.nosubject .subject {
			color: #888888;
			
			.opacity(0.3);
		}

		.resizer {
			height: 85px;

			&.large {
				height: 130px;
			}
		}
	
		.header_row {
			clear: both;
			
			&:last-child {
				margin-top: 12px; 
			}
		}
		
		.toolbar {
			background: none;
			border: 0px;
			filter: none;
			float: right;
			margin-bottom: 0px;
			max-width: 100%;
			overflow: visible;
			padding: 0px;
			position: relative;
			top: -4px;
			width: auto;
			z-index: 1;
			
			html.rtl & {
				float: left;
			}

			.content {
				padding: 0px;
				
				& > .item {
					background: none !important;
					border: 0px;
					box-shadow: none !important;
					margin-right: 16px;
					padding: 0px;
					
					.theme-message-toolbar-item();
					
					&:last-child {
						margin-right: 0px;
					}
					
					.icon.arrow:before {
						font-size: 20px;
					}
					
					.dropdown .item .icon {
						margin-right: 5px;
					}
				}
			}
		}
		
		.header_content {
			padding: 18px 18px 8px;
		}
		
		.message_info {
			font-size: 10pt;
			padding-top: 1px; /* fix nested element negative margin */
			position: relative;
			
			html.rtl & {
				margin-right: 14px;
			}
			
			.message_info_line {
				margin: 0;
				overflow: hidden;
				position: relative;
				top: -4px;
				white-space: nowrap;

				.to_arrow {
					display: inline-block;
					height: 1em;
					line-height: 1;
					margin: 0 0 4px;
					vertical-align: middle;
				}
			}
			
			&.message_detail_info .message_info_line:last-child {
				margin-top: 8px;
			}
			
			&.message_detail_info .message_info_line {
				max-height: 72px;
				overflow-y: auto !important;
				white-space: normal;
			}
		}
		
		.details_show,
		.details_hide {
			color: #727272;
			display: inline-block;
			float: left;
			height: 16px;
			overflow: hidden;
			position: absolute;
			vertical-align: bottom;
			width: 16px;
			
			html.rtl & {
				margin-left: 6px;
				margin-right: 0px;
			}
			
			.init-icon-font();
			
			&:before {
				content: "\e66d";
				display: inline-block;
				font-size: 18px;
			}
		}
		
		.details_hide:before {
			content: "\e66e";
		}
		
		.title {
			color: #777777;
		}
		
		.subject {
			color: #4d4d4d;
			display: inline-block;
			font-size: 18pt;
			font-weight: normal;
			margin: 0px;
			padding: 0px;
		}
		
		.icon {
			margin: 0px;
			padding: 0px;
			
			.attachments {
				background: url("../../images/sprites.png") no-repeat -120px -120px;
				cursor: pointer;
				display: inline-block;
				float: left;
				height: 16px;
				margin-right: 8px;
				width: 16px;
				
				html.rtl & {
					float: right;
					margin-left: 8px;
					margin-right: 0px;
				}
			}
		}
		
		.date {
			float: right;
			font-size: 8.5pt;
			margin-top: 6px;
			
			html.rtl & {
				float: left;
			}
		}
		
		.from {
			font-weight: bold;
			
			html.rtl & {
				padding-right: 7px;
			}
		}
	}
	
	.notice {
		background: @theme-mail-viewer-notice-background;
		border-bottom: 1px solid #eae7ca;
		color: #b5ad94;
		font-size: 8pt;
		padding: 4px 6px;

		.item {
			display: block;
		}

		.link {
			color: @theme-mail-viewer-notice-link-color;
		}
	}
	
	.message {
		height: 100%;

		.message_content {
			height: 100%;
			overflow: auto;
			white-space: normal;

			.bodyparts_separator {
				background-color: #e2e2e2;
				display: none;
				height: 1px;
				margin: 0px 20px;
			}
		}

		&.has_bodytext.has_attachments .bodyparts_separator {
			display: block;
		}
	}

	.appointment {
		background: @theme-mail-viewer-appointment-background;
		border-bottom: @theme-mail-viewer-appointment-border-bottom;
		padding: 15px;

		.row:last-child {
			margin: 0;
		}

		.row.row_info {
			margin: 0px 0px 12px;

			& > * {
				font-size: 11pt;
				color: #515151;
			}
		}

		.row.fluid {
			padding-left: 100px;
		}

		.label {
			vertical-align: top;
			width: 100px;
		}

		.row.fluid .label {
			margin-left: -100px;
		}

		.value {
			display: inline-block;
			
			.break-word();
		}

		.row.fluid .value {
			width: 99%;
		}

		.event_state {
			color: #929292;
			padding-left: 5px;
		}

		.buttons {
			display: inline-block;
			margin: 0 0 8px 0;

			.button {
				margin-right: 5px;

				&.selected_button {
					background: #ffffff;
					border: 1px solid #6fa8de;
					color: #4f88be;
					cursor: default;
					text-shadow: none;

					&.disabled {
						color: mix(#ffffff, #000, 50%);

						&:hover {
							background: #ffffff;
						}
					}
				}
			}

			&.animation .button {
				.transition(~"opacity 200ms ease, background 200ms ease, color 200ms ease");
			}

			&.touched .button {
				opacity: 0.4;

				&:hover,
				&.selected_button {
					opacity: 1;
				}
			}
		}
	}
	
	.panels.has_attachments {
		padding-right: 170px;
		
		.message_panel {
			border-right: 1px solid #e2e2e2;
		}
	}
	
	.message_panel {
		border-radius: 0px;
		box-shadow: none;
		width: 100%;
	}
	
	.attachments_panel {
		box-shadow: none;
		float: right;
		margin-right: -170px;
		width: 170px;
	}
}

.panel.thread_viewer .panel_top .expand .owner.found,
.message_viewer .message_header .expand .from.found {
	background: #ffffff;
	border-radius: 4px 4px 0px 0px;
	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5);
	display: inline-block;
	margin: -3px -7px 0px 0px;
	padding: 3px 7px 0px;
	position: relative;
	z-index: 1001;
}

.item_viewer .add_contact {
	color: @theme-common-link-color;
	cursor: pointer;
	display: inline-block;
	height: auto;
	margin: 0;
	padding: 0;
	vertical-align: bottom;
	width: auto;

	.init-icon-font();
	
	&:before {
		content: "\e641";
		display: inline-block;
		font-size: 15px;
		height: auto;
		margin: 0;
		vertical-align: bottom;
		width: auto;
	}
}

.toolbar {
	.sort .icon:before {
		    content: "\e913";
	}
	.sort .dropdown_content .item.selected {
		background: #f9f9f9 !important;
	}

	.sort-order-icon:before {
		speak: none;
		font-style: normal;
		font-weight: normal;
		font-variant: normal;
		text-transform: none;
		line-height: 1;
		font-family: 'afterlogic';
		-webkit-font-smoothing: antialiased;
		content: "\e66d";
		display: inline-block;
		font-size: 16px;
		vertical-align: text-bottom;
	}

	.sort-order-desc-icon:before {
		content: "\e66e";
	}
}
