.cGalleryDialog {
	display: flex;
	flex-direction: column;
	position: relative;
	min-height: 550px;
}

.ipsDialog .cGalleryDialog_inner,
.ipsDialog .cGalleryDialog_titleAndUpload {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

	.cGalleryDialog.cGalleryDialog_uploadStep .cGalleryDialog_titleAndUpload {
		right: 380px;
	}

.cGallerySubmit_imageDetails {
	width: 380px;
	min-width: 380px;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	overflow: auto;
	display: none;
}

	/* The pseudo element prevents content from being overlaid by the fixed submit bar on desktops */
	@media (min-width: 768px){
		.cGallerySubmit_imageDetails::after{
			content: '';
			display: block;
			height: 95px;
		}
	}

	.cGalleryDialog.cGalleryDialog_uploadStep .cGallerySubmit_imageDetails {
		display: block;
	}

	.cGallerySubmit_imageDetails .ipsAttachment_dropZone [data-action="uploadFile"] {
		margin: 0 0 10px 0;
		float: none;
		width: 100%;
	}

	.cGallerySubmit_imageDetails .ipsAttachment_dropZone.ipsAttachment_dropZoneSmall {
		padding: 5px;
	}

.cGallerySubmit_preview {
	width: 100%;
	height: 190px;
	text-align: center;
}
	.cGallerySubmit_preview:not(.ipsNoThumb) {
		background: rgb( var(--theme-area_background_reset) );
	}

	.cGallerySubmit_preview .ipsImage {
		max-height: 100%;
	}

.cGalleryDialog .ipsDialog_title {
	padding: 0;
}

.cGalleryDialog_close {
	background-color: #000;
	color: #fff !important;
	font-size: 20px;
	width: 28px;
	height: 28px;
	border-radius: 28px;
	line-height: 28px;
	text-align: center;
	position: absolute;
	right: 4px;
	top: 4px;
	z-index: 10;
	cursor: pointer;
	display: none;
}

	.ipsDialog_content .cGalleryDialog_close {
		display: block;
	}


#elFileTypes_menu strong {
	display: none;
}

/* Step 1: Choose album */
.ipsDialog .cGalleryChooseAlbum_wrap,
.cGalleryChooseAlbum_list {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
}

	.cGalleryChooseAlbum_list {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.cGalleryChooseAlbum_list > ul {
		max-width: 450px;
		width: 100%;
		padding: 0 15px;
	}

.cGalleryChooseAlbum_listItem {
	display: block;
	background: rgb( var(--theme-area_background_reset) );
	border: 1px solid rgb( var(--theme-area_background) );
	padding: 15px;
	border-radius: 6px;
	margin-bottom: 20px;
	padding-right: 40px;
	position: relative;
	transition: 0.075s all ease-in-out;
}
	
	.cGalleryChooseAlbum_listItem[data-disabled] {
		opacity: 0.7;
		cursor: not-allowed;
	}

		.cGalleryChooseAlbum_listItem[data-disabled] .ipsType_sectionHead {
			color: rgb( var(--theme-text_light) );
		}

	.cGalleryChooseAlbum_listItem:not([data-disabled]):after {
		font-family: 'FontAwesome';
		content: '\f105';
		position: absolute;
		right: 10px;
		top: 50%;
		font-size: 36px;
		transform: translateY(-50%);
		color: rgb( var(--theme-text_dark) );
	}

	.cGalleryChooseAlbum_listItem:not([data-disabled]):hover {
		border-color: rgba( var(--theme-text_color), 0.3 );
		transform: scale(1.05);
	}

.cGalleryChooseAlbum_listItem .ipsType_sectionHead {
	font-size: 16px;
}

.ipsDialog .cGalleryDialog_submitBar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	border-bottom-left-radius: var(--radius-2);
	border-bottom-right-radius: var(--radius-2);
}

.cGallerySubmit_albumChoice {
	max-width: 1100px;
	margin: 20px auto 0;
}

	.cGallerySubmit_albumChoice .ipsSelectTree {
		margin: 0 auto;
	}

	#elGallerySubmit_albumChooser > li > div {
		position: relative;
		border: 1px solid rgba( var(--theme-text_color), 0.1 );;
		border-radius: 3px;
		margin-bottom: 7px;
	}

		#elGallerySubmit_albumChooser > li > div ul.ipsType_medium {
			line-height: 1;
		}

	#elGallerySubmit_albumChooser > li > div:hover {
		background: rgb( var(--theme-area_background_light) );
		cursor: pointer;
	}

	#elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div {
		background: rgb( var(--theme-brand_primary) );
		color: #fff;
	}

		#elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div:before {
			content: '\f00c';
			font-family: "FontAwesome";
			font-size: 36px;
			position: absolute;
			top: 50%;
			transform: translateY(-50%);
			opacity: 0.6;
			color: inherit;
		}

			html[dir="ltr"] #elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div:before {
				right: 17px;
			}
			html[dir="rtl"] #elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div:before {
				left: 17px;
			}

		#elGallerySubmit_albumChooser > li > input[type="radio"]:checked + div .ipsType_light {
			color: inherit;
			opacity: 0.7;
		}

.cGallerySubmit_albumImage {
	width: 40px;
	height: 40px;
	background-color: rgba(0,0,0,0.3);
}

	html[dir="ltr"] .cGallerySubmit_albumImage {
		float: left;
	}
	html[dir="rtl"] .cGallerySubmit_albumImage {
		float: right;
	}

html[dir="ltr"] .cGallerySubmit_albumInfo {
	margin-left: 47px;
}
html[dir="rtl"] .cGallerySubmit_albumInfo {
	margin-right: 47px;
}

.cGallerySubmit_chooseCategory {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

/* Step 2: Upload files */
.cGallerySubmit_uploadImages {
	overflow-y: auto;
}
	.cGallerySubmit_details {
		padding-bottom: 20px;
	}


.cGallerySubmit_uploadImages .ipsAttachment_dropZone {
	border-width: 3px;
	border-style: dashed;
	transition: none;
}

.cGallerySubmit_uploadImages .ipsAttachment_dropZone:not( .ipsDragging ) {
	background: transparent;
	border-color: rgb( var(--theme-area_background) );
}

/* Positioning required to make the dialog full screen */
.cGalleryDialog_content {
	position: absolute;
	top: 80px;
	bottom: 0;
	right: 0;
	left: 0;
}
.ipsDialog_content .cGalleryDialog_content.cGalleryDialog_content_moderated {
	top: 150px;
}

.cGalleryDialog_imageForm {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
}

	.cGalleryDialog_imageForm [data-role="imageForm"] {
		position: absolute;
		top: 80px;
		left: 0;
		right: 0;
		bottom: 85px;
		overflow: auto;
	}

#elGallerySubmit > .ipsGrid {
	position: absolute;
	top: 30px;
	left: 30px;
	bottom: 70px;
	right: 30px;
}

/* Step 3: Image info */
.cGallerySubmit_bottomBar {
	background: rgba( var(--theme-area_background_reset), 0.9 );
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 85px;
	z-index: 100;
}

.ipsApp button.cGallerySubmit_button {
	font-size: 66px;
	background: transparent;
	color: rgb( var(--theme-text_color) );
	opacity: 0.4;
	text-align: center;
	position: absolute;
	top: 50%;
	margin-top: -20px;
	border: 0;
	height: 150px; /* Make the clickable area bigger for ease */
	width: 60px;
	outline: 0;
}

/* Style the uploader */
#elGallerySubmit_imageUploader {
	position: relative;
	min-height: 200px;
}

#elGallerySubmit_imageUploader .ipsAttachment_dropZone {
	position: absolute !important;
	top: 0;
	left: 0;
	height: 190px !important;
	width: 100%;
	padding: 10px;
	float: left;
	cursor: pointer;
}

	.cGalleryDialog.cGalleryDialog_uploadStep #elGallerySubmit_imageUploader .ipsAttachment_dropZone {
		width: 200px;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_dropZone:not( .ipsAttachment_dropZoneSmall ) > i:first-child {
		font-size: 100px;
		margin-top: 20px;
		color: rgb( var(--theme-text_light) );
	}
		#elGallerySubmit_imageUploader .fa-cloud-upload:before {
			content: "\f055";
		}

	#elGallerySubmit_imageUploader .ipsAttachment_supportDrag {
		font-size: 12px;
		color: rgb( var(--theme-text_light) );
	}

	#elGallerySubmit_imageUploader a[data-action="uploadFile"] {
		display: none;
	}

	#elGallerySubmit_imageUploader .moxie-shim.moxie-shim-html5, 
	#elGallerySubmit_imageUploader .moxie-shim.moxie-shim-html5 > input[type="file"]  {
		top: 0 !important;
		left: 0 !important;
		width: 0.1px !important;
		height: 0.1px !important;
	}

/* Media thumbnail upload area */
.cGalleryThumbField .ipsAttachment_dropZoneSmall_info {
	clear: left;
	margin-left: auto !important;
}

.cGalleryThumbField h2[data-role="title"] {
	width: 150px;
	max-width: 150px;
}

.cGalleryThumbField p.ipsDataItem_meta {
	width: 100px;
}

.cGalleryThumbField .ipsDataItem_generic {
	padding-top: 55px;
}

.cGalleryThumbField .ipsDataItem_size5,
.cGalleryThumbField .ipsDataItem_size8 {
	width: 83px;
	min-width: 83px;
	padding-left: 0px !important;
	padding-right: 0px;
}

.cGalleryThumbField .ipsDataItem_size8 {
	text-align: left !important;
	padding-left: 80px;
}

/* This is a bit messy, but we need to overwrite styles from the uploader for this page */
#elGallerySubmit_imageUploader .ipsAttachment_fileList {
	margin-top: 0;
}

	#elGallerySubmit_imageUploader .ipsAttachment_fileList .cGallerySubmit_fileList {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		margin-top: 4px;
	}

	#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach {
		height: 200px;
		width: 200px;
		background-color: rgb( var(--theme-area_background_reset) );
		border: 1px solid rgb( var(--theme-area_background) );
		margin-bottom: 30px !important;
		margin-right: 30px;
		cursor: move;
		border-radius: var(--radius-1);
	}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach .cGalleryImageAttach_info {
			padding-right: 30px;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:hover {
			border-color: rgb( var(--theme-area_background_dark) );
			background-color: rgb( var(--theme-area_background_light) );
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_activeFile {
			border-color: rgb( var(--theme-brand_primary) );
			box-shadow: 0px 0px 0px 1px #8ec2ed, 0px 0px 0px 5px rgba(142,194,237,0.3);
			background: rgb( var(--theme-selected) ) !important;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageSaved:before,
		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageError:before {
			width: 28px;
			height: 28px;
			border-radius: 28px;
			line-height: 28px;
			color: #fff;
			font-family: 'FontAwesome';
			font-size: 14px;
			position: absolute;
			bottom: 8px;
			right: 8px;
			text-align: center;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageSaved:before {
			content: '\f00c';
			background: #558B2F;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageError:not( .cGallerySubmit_activeFile ) {
			border-color: #a72f35;
			box-shadow: 0 1px 1px rgba(0,0,0,0.075), 0px 1px 5px rgba(167,47,53,0.6);
		}

			#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach.cGallerySubmit_imageError:before {
				content: '\f071';
				background: #a72f35;
			}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach:first-child {
			margin-left: 230px;
		}

		#elGallerySubmit_imageUploader .ipsAttachment_fileList .ipsImageAttach .ipsImageAttach_thumb {
			height: 135px;
		}

		#elGallerySubmit_imageUploader .ipsAttach.ipsAttach_done [data-action="insertFile"] {
			cursor: move;
		}

#elInput_image_copyright,
#elInput_image_tags_wrapper {
	max-width: 100%;
}