/* Image Resize and Pop-up (canaryfans/imageresize) */

/* Post images (BBCode [img] and image attachments): at most 600px wide,
   and never wider than the post on narrow screens */
.postbody .content img.postimage,
.postbody .attach-image img.postimage {
	max-width: 100%;
	max-width: min(600px, 100%);
	height: auto;
}

/* Marked by imageresize.js when shown smaller than its real size */
.postbody img.cf-img-zoomable {
	cursor: zoom-in;
}

/* Pop-up showing the image at actual size; scrolls when larger than the screen */
.cf-img-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 10000;
	overflow: auto;
	direction: ltr;
	text-align: center;
	background-color: rgba(0, 0, 0, 0.85);
	cursor: zoom-out;
	-webkit-overflow-scrolling: touch;
}

.cf-img-overlay img {
	display: block;
	max-width: none;
	height: auto;
	margin: 50px auto 20px;
	background-color: #FFFFFF;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.cf-img-overlay-close {
	position: fixed;
	top: 8px;
	right: 12px;
	z-index: 10001;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background-color: #4d1100;
	color: #FFFFFF;
	font-size: 24px;
	line-height: 36px;
	cursor: pointer;
}

.cf-img-overlay-close:hover {
	background-color: #800000;
}

body.cf-img-overlay-open {
	overflow: hidden;
}
