.images-upload-container {
	width: 220px;
	position: relative;
	float:right;
}
.image-upload {
	width: 180px;
	height: 140px;
	margin-bottom: 20px;
	border: 1px solid #ccc;
	box-sizing: content-box;
	position: relative;
	background-color: white; /*rgba(127,127,127,0);*/
	transition: background-color .2s, opacity .2s ease-out;
}
.image-upload.loading {
	background-image: url(/static/assets/loader-big.gif);
	background-image: url(/static/assets/loader-big.svg), linear-gradient(transparent, transparent);
	background-size: 98px 98px;
	background-position: 50% 50%;
}
.image-upload > DIV { position: absolute; left: 0; top: 0; bottom: 0; right: 0; }

.image-upload-drop {
	margin: 10px;
	border: 2px dashed #ccc;
	border-radius: 6px;
	padding: 15px;
	position: relative;
	transition: margin 0.2s;
	opacity: 1;
}
.image-upload.is-dragover { background-color: #eee; /*rgba(127,127,127,0.2);*/ }
.image-upload.is-dragover .image-upload-drop { display: block; margin: 15px; }
.image-upload.no-drop { background-color: #fee; /*rgba(127,127,127,0.2);*/ }
.image-upload.is-dragover, .image-upload.is-dragover * { cursor: copy; }
.image-upload.no-drop, .image-upload.no-drop * { cursor: no-drop; }

.image-upload-drop > SPAN { display: block; position: absolute; left: 5px; right: 5px; text-align: center; font-size: 15px; color: #999; }
.image-upload-drop LABEL { display: inline-block !important; width: auto !important; }
/*
.image-upload-drop > SPAN.image-upload-drop-text { display: none; }
.image-upload.is-dragover .image-upload-drop > SPAN.image-upload-drop-text { display: inline; }
.image-upload.is-dragover .image-upload-drop > SPAN.image-upload-drag-text { display: none; }
*/

.image-upload-drop LABEL {
	display: inline-block;
	position: relative;
	text-decoration: underline;
	cursor: pointer;
	color: #397BC7;
	overflow: hidden;
	width: auto;
	padding: 0;
}
.tse-touch-safe .image-upload-drop LABEL:hover {
	background: transparent;
}
.image-upload-drop LABEL > INPUT {
	opacity: 0;
	cursor: pointer;
	position: absolute;
	left: -200%;
	width: 300%;
	height: 100%;
}
.image-upload-canvas { overflow: hidden; display: none; }
.image-upload-canvas > CANVAS { width: auto; height: auto; }
.image-upload.pan-mode .image-upload-canvas {
	cursor: move;
	cursor: grab;
	cursor: -moz-grab;
	cursor: -webkit-grab;
}
.image-upload.is-panning .image-upload-canvas {
	cursor: grabbing;
	cursor: -moz-grabbing;
	cursor: -webkit-grabbing;
}

.image-upload > DIV.image-upload-controls { width: 40px; right: -40px; left: auto; }
.image-upload > DIV.image-upload-controls > A { display: inline-block; font-size: 16px; padding: 1px; margin: 4px; cursor: pointer; }
.tse-touch-safe .image-upload > DIV.image-upload-controls > A:hover:not(.disabled):not(:active) { color: #60a1ec; }
.image-upload > DIV.image-upload-controls > A.selected,
.image-upload > DIV.image-upload-controls > A:active { background: #397BC7; border-radius: 2px; color: white; }
.image-upload > DIV.image-upload-controls > A.disabled { color: #bbb; }

.image-upload.loaded .image-upload-drop,
.image-upload.loading .image-upload-drop { display: none; }
.image-upload.loaded .image-upload-canvas { display: block; }

[data-tool][data-mode="sort"] { display: none !important; }
.images-upload-container.sort-mode [data-tool]:not([data-mode="sort"]) { display: none !important; }
.images-upload-container.sort-mode [data-tool][data-mode="sort"] { display: inline !important; }

/* Hide controls when sorting */
.image-upload.ui-sortable-helper .image-upload-controls { display: none; }

/* Hints link */
.images-upload-container .question-mark { opacity: 1; transition: opacity ease-out .2s, color linear 0s .2s, border-color linear 0s .2s; border: 1px solid #397BC7; color: #397BC7; cursor: help; width: 22px; height: 22px; line-height: 20px; vertical-align: top; }
.images-upload-container:hover .question-mark { opacity: 1; } /*color: #ccc; border-color: #ccc; transition: opacity ease-out .2s, color ease-out .2s 3s, border-color ease-out .2s 3s; }*/

/*iOS toggle as per http://www.designcouch.com/home/why/2013/09/19/ios7-style-pure-css-toggle/ */

.ios-cb-wrapper {
	max-width:300px;
	display: inline-block;
	text-align:center;
}

.ios-cb-wrapper > * {
	-webkit-tap-highlight-color: rgba(0,0,0,0);
}

.ios-cb-wrapper > INPUT {
	max-height: 0;
	max-width: 0;
	opacity: 0;
}
.ios-cb-wrapper > INPUT + LABEL {
	display: inline-block;
	position: relative;
	box-shadow: inset 0 0 0px 1px #d5d5d5;
	xtext-indent: -5000px;
	height: 30px;
	width: 50px;
	border-radius: 15px;
}

.ios-cb-wrapper > INPUT + LABEL:before {
	content: "";
	position: absolute;
	display: block;
	height: 30px;
	width: 30px;
	top: 0;
	left: 0;
	border-radius: 15px;
	background: rgba(19,191,17,0);
	-moz-transition: .25s ease-in-out;
	-webkit-transition: .25s ease-in-out;
	transition: .25s ease-in-out;
}

.ios-cb-wrapper > INPUT + LABEL:after {
	content: "";
	position: absolute;
	display: block;
	height: 30px;
	width: 30px;
	top: 0;
	left: 0px;
	border-radius: 15px;
	background: white;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 1px 4px rgba(0,0,0,.2);
	-moz-transition: .25s ease-in-out;
	-webkit-transition: .25s ease-in-out;
	transition: .25s ease-in-out;
}

.ios-cb-wrapper > INPUT:checked + LABEL:before {
	width: 50px;
	background: rgba(19,191,17,1);
}

.ios-cb-wrapper > INPUT:checked + LABEL:after {
	left: 20px;
	box-shadow: inset 0 0 0 1px rgba(19,191,17,1), 0 1px 4px rgba(0,0,0,.2);
}

/* Specifics */
.ios-cb-wrapper > INPUT#cb-images-sort-mode + LABEL:after {
	content: 'Sort';
	font-size: 13px;
	line-height: 24px;
	width: 40px;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 1px 1px rgba(0,0,0,.1);
}
.ios-cb-wrapper > INPUT#cb-images-sort-mode:checked + LABEL:after {
	left: 10px;
}
.ios-cb-wrapper > INPUT#cb-images-sort-mode + LABEL { background: #fdfdfd; }
.ios-cb-wrapper > INPUT#cb-images-sort-mode + LABEL,
.ios-cb-wrapper > INPUT#cb-images-sort-mode + LABEL:before,
.ios-cb-wrapper > INPUT#cb-images-sort-mode + LABEL:after {
	height: 25px;
}