/*
 * Admin styles if any
 */

// {
// 	content: "\f316";
// }

.ccimage-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	background: rgba(0,0,0,.4);
	display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    padding: 5px;
	background: rgba(0,0,0,0);
	transition: all .3s ease-in-out;
	&:hover {
		background: rgba(0,0,0,.4);
	}
	.ccimage-download {
		position: absolute;
	    top: 10px;
	    right: 10px;
	    background: #FF6766;
	    font-size: 16px;
	    line-height: 20px;
	    padding: 7px 6px 5px;
	    border-radius: 100%;
	    height: 20px;
	    text-align: center;
	    color: #fff;
	    width: 20px;
		transition: all .3s ease-in-out;
		transform: scale(.8);
		opacity: 0;
		&:before {
		    content: "\f316";
		    font-family: dashicons;
		}
	}
	.ccimage-download-label {
		color: #fff;
		position: absolute;
		top: 10px;
		line-height: 30px;
		right: 50px;
		transition: all .3s ease-in-out;
		transform: translateX(15px);
		opacity: 0;
		font-size: 11px !important;
	}
	.ccimage-info {
	    width: 40px;
	    height: 40px;
	    font-size: 40px;
	    color: #fff;
		transition: all .15s ease-in-out;
	    opacity: 0;
		transform: scale(.1);
	    position: absolute;
	    top: 50%;
	    margin-top: -20px;
	    left: 50%;
	    margin-left: -20px;
	    line-height: 1em;
	    text-shadow: 0 0 10px black;
		&:before {
			font-family: dashicons;
		    content: "\f348";
		    content: "\f223";
		}
	}
	&:hover {
		.ccimage-download {
			transform: scale(.95);
			opacity: .85;
		}
		.ccimage-download-label {
			transform: translateX(0px);
			opacity: 1;
		}
		.ccimage-info {
			transform: scale(1);
			opacity: .3;
		}
	}
	.ccimage-downloading {
		background: rgba(0,0,0,.5);
	    position: absolute;
	    z-index: 2;
	    top: 0;
	    right: 0;
	    left: 0;
	    bottom: 0;
	    color: #fff;
	    font-size: 50px;
	    line-height: 1em;
		opacity: 0;
		z-index: 0;
		&:before {
			font-family: dashicons;
			content: "\f463";
			top: 50%;
			position: absolute;
			opacity: .6;
			left: 50%;
			margin-top: -30px;
			margin-left: -25px;
		}
	}
	.ccimage-download:hover {
		transform: scale(1);
		opacity: 1;
	}
	.ccimage-provider-flickr, .ccimage-provider-pixabay, .ccimage-provider-unsplash, .ccimage-provider-pexels, .ccimage-provider-giphy, .ccimage-badge-warning {
		background-image: url(../images/flickr.svg);
		background-color: #fff;
		padding: 5px;
		background-size: 14px;
		background-repeat: no-repeat;
		background-position: center;
		border-radius: 100%;
		width: 14px;
		height: 14px;
		margin: 2px;
		box-shadow: 0 0 10px rgba(0,0,0,.4);
		box-sizing: content-box;
		opacity: .8;
		z-index: 1;
	}
	.ccimage-provider-pixabay {
		background-image: url(../images/pixabay.svg);
	}
	.ccimage-provider-unsplash {
		background-image: url(../images/unsplash.svg);
	}
	.ccimage-provider-pexels {
		background-image: url(../images/pexels.svg);
	}
	.ccimage-provider-giphy {
		background-image: url(../images/giphy.svg);
	}
	.ccimage-badge-warning {
		background-image: url(../images/warning.svg);
	}
	.ccimage-badge-cc, .ccimage-badge-noncommercial, .ccimage-badge-zero {
		background-image: url(../images/cc-attribution.svg);
		background-color: #fff;
		padding: 0;
		background-size: 24px;
		background-repeat: no-repeat;
		background-position: center;
		border-radius: 100%;
		box-shadow: inset 0 0 0 2px #000, 0 0 10px rgba(0,0,0,.4);
		width: 24px;
		height: 24px;
		margin: 2px;
		box-sizing: content-box;
		opacity: .8;
		z-index: 1;
	}
	.ccimage-badge-noncommercial {
		background-image: url(../images/cc-noncommercial.svg);
	}
	.ccimage-badge-zero {
		background-image: url(../images/cc-zero.svg);
	}
}
li.attachment.downloading {
	pointer-events: none;
	.ccimage-overlay {
		.ccimage-download {
			transform: scale(.1);
			opacity: 0;
		}
		.ccimage-download-label {
			transform: translateX(15px);
			opacity: 0;
		}
		.ccimage-downloading {
			opacity: 1;
			&:before {
				animation: ccimage-spin 5s linear infinite;
			}
		}
	}
}
.downloaded .ccimage-overlay {
	overflow: hidden;
	.ccimage-download {
		background: #71BA51;
		opacity: 1;
		z-index: 9;
	    box-shadow: 0 0 100px 100px rgba(0,0,0,.3);
	    transform: scale(1);
		&:before {
		    content: "\f147";
		}
	}
	.ccimage-download-label {
		transform: translateX(15px);
		opacity: 0;
	}
}

@-moz-keyframes ccimage-spin { 100% { -moz-transform: rotate(360deg); } }
@-webkit-keyframes ccimage-spin { 100% { -webkit-transform: rotate(360deg); } }
@keyframes ccimage-spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }

.ccimage-result-container {
	.landscape .thumbnail img {
		height: 100% !important;
		width: auto !important;
	}
	.portrait .thumbnail img {
		width: 100% !important;
		height: auto !important;
	}
}

.ccimage-details {
	.attachment-info .thumbnail, .attachment-info .thumbnail img {
		max-width: 100%;
    	max-height: 500px;
		width: auto;
	}
	.provider, .owner, .license, .sizes {
		a:after {
			position: inline;
			font-family: dashicons;
			content: " \f504";
		}
	}
}

/* Download note in Media Manager */
.ccimage-search-toolbar {
	.media-toolbar-primary {
		position: relative;
	}
	.media-search-input-note {
		position: absolute;
		right: 100%;
		white-space: nowrap;
		top: 50%;
		transform: translateY(-50%);
		margin-right: 20px;
		font-style: italic;
		color: #888;
	}
}
@media screen and (max-width: 1200px) {
	.media-search-input-note {
		display: none;
	}
}

.ccimage-search-active .attachments-browser .media-toolbar-secondary {
	width: 100%;
}