.attachments {
	@levelColor: #e4e4e4;
	
	.children {
		background: @levelColor;
		border-radius: 1px;
		box-shadow: 0 0 0 8px @levelColor;
		margin: 10px 0px 5px;
			
		.children {
			background: darken(@levelColor, 10%);
			box-shadow: 0 0 0 8px darken(@levelColor, 10%);
			
			.children {
				background: darken(@levelColor, 20%);
				box-shadow: 0 0 0 8px darken(@levelColor, 20%);
				
				.size {
					color: #777777;
				}
				
				.children {
					background: darken(@levelColor, 30%);
					box-shadow: 0 0 0 8px darken(@levelColor, 30%);
					
					.title {
						color: #000000
					}
					
					.size {
						color: #555555;
					}
				}
			}
		}
	}
		
	.expanded {
		background: #e4e4e4;
		box-shadow: 0 0 0 8px #e4e4e4;
		
		.expanded {
			box-shadow: 0 0 0 8px #c2c2c2;
			background: #c2c2c2;
		}
	}
	
	.item {
		background: inherit;
		border-radius: 1px;
		display: block;
		margin: 0 16px 20px 0;
		max-height: inherit;
		overflow: visible;
		vertical-align: top;
		width: 136px;
		
		&:last-child {
			margin-bottom: 0px
		}
		
		&.fail {
			opacity: 0.3;
			
			.csstransitions & {
				.transition(opacity 1000ms ease 1s);
			}
		}

		.item_content {
			background: #ffffff;
			border: 0px;
			border-radius: 3px;
			box-shadow: 0 2px 6px #ccc;
			display: block;
			margin-bottom: 6px;
			padding: 9px 9px 7px;
		}

		.cancel {
			display: none;
		}
		.upload& .cancel,
		&.incomplete .cancel {
			background: #e84d49;
			color: #ffffff;
			cursor: pointer;
			display: block;
			float: right;
			font-size: 12px;
			height: 18px;
			line-height: 18px;
			margin-left: -18px;
			overflow: hidden;
			position: relative;
			right: -18px;
			text-align: center;
			top: -18px;
			width: 18px;
			z-index: 10;

			.init-icon-font();

			&:before {
				content: "\e63e";
				display: inline-block;
				height: 100%;
				line-height: inherit;
				width: 100%;
			}
		}
		.upload& .cancel {
			border-radius: 26px;
			right: -18px;
			top: -18px;
			background: #aaaaaa;
		}
		&.incomplete .cancel {
			border-radius: 3px;
			right: 2px;
			top: 2px;
		}

		.footer {
			min-height: 22px;
		}
		
		.progress {
			display: block;
			height: 3px;
			padding: 8px 0px;
			width: 100%;
			
			span {
				display: block;
				height: 3px;
				background: #ef4a4a;
			}
			
			.progress-percent {
				display: block;
				background: none;
				text-align: center;
				font-size: 8pt;
				color: #000000 !important;
			}
		}

		.image {
			border-bottom: 1px solid #dedede;
			display: block;
			min-height: 100px;
			overflow: hidden;
			position: relative;
			text-align: center;
			white-space: nowrap;
			
			&:after {
				content: "";
				display: inline-block;
				min-height: inherit;
				vertical-align: middle;
			}
			
			img {
				position: absolute;
				top: calc(50% - 4px);
				transform: translate(-50%, -50%);
				max-height: 94px;
			}
		}
		
		&.has_child > .item_content > .image {
			display: none;
		}
		
		.text {
			color: #c7c7c7;
			display: inline-block;
			font-size: 18pt;
			margin: 36px 0px 0px;
			text-transform: uppercase;
		}

		.icon {
			margin: 15px 0px 0px !important;
			vertical-align: top;
		}

		.has_action {
			cursor: pointer;
		}
		
		.title {
			.box-sizing;

			display: inline-block;
			font-weight: bold;
			height: 2.2em;
			overflow: hidden;
			white-space: normal;
			width: 100%;
			word-wrap: break-word;

			margin-bottom: 0px;
			display: flex;
			align-items: center;
			margin-top: 4px;

			.name {
				display: inline-block;
				overflow: hidden;
				width: 100%;
				max-height: 2.2em;
				line-height: 1.1;
			}
		}

		.ext {
			display: inline-block;
		}

		.size {
			color: #929292;
			margin: 0px;
		}
		
		.status_text {
			display: block;
			margin: 0;
			padding: 6px 0px 0px;
			white-space: normal;
		}
		
		&.fail .status_text {
			color: #ff0000;
		}
		
		&.success .status_text {
			color: #308F00;
		}
		
		.buttons {
			display: flex;
			justify-content: space-between;
			margin: 0;
			padding: 0px 8px 0px;
			
			.button {
				background: none;
				border: 0px;
				color: @theme-attachment-action-link-color;
				font-size: 9pt;
				font-weight: normal;
				padding: 0px;
				text-shadow: none;
				overflow: hidden;
				text-overflow: ellipsis;

				&:hover {
					color: lighten(@theme-attachment-action-link-color, 5%);
				}
			}
		}

		.main_action {
			position: absolute;
			top: 0;
			z-index: 0;
			width: 100%;
			height: 88px;
			background: #fff;
			opacity: 0;
			display: flex;
			justify-content: center;
			align-items: center;
			font-weight: bold;
			transition: opacity 0.3s ease;
			padding-top: 20px;

			.button {
				color: @theme-attachment-action-link-color;

				&:hover {
					color: lighten(@theme-attachment-action-link-color, 5%)
				}
			}
		}

		&:hover .main_action {
			opacity: 0.9;
		}
	}
}
