/**
 * MN Image or Icon Widget Styles
 * 
 * @package MN_Elements
 * @since 1.0.0
 */

/* ==========================================================================
   Wrapper
   ========================================================================== */
.mn-image-or-icon-wrapper {
	display: inline-block;
	position: relative;
}

/* ==========================================================================
   Image Styles
   ========================================================================== */
.mn-image-or-icon-image {
	display: inline-block;
	position: relative;
	overflow: hidden;
}

.mn-image-or-icon-image img {
	display: block;
	max-width: 100%;
	height: auto;
	transition: all 0.3s ease;
}

.mn-image-or-icon-image a {
	display: block;
}

/* Image Filter Effects - From MN Posts */
/* Grayscale to Color */
.mn-filter-grayscale img {
	filter: grayscale(100%);
}

.mn-filter-grayscale:hover img {
	filter: grayscale(0%);
}

/* Blur to Sharp */
.mn-filter-blur img {
	filter: blur(3px);
}

.mn-filter-blur:hover img {
	filter: blur(0);
}

/* Sepia to Color */
.mn-filter-sepia img {
	filter: sepia(100%);
}

.mn-filter-sepia:hover img {
	filter: sepia(0%);
}

/* Desaturated to Saturated */
.mn-filter-saturate img {
	filter: saturate(0%);
}

.mn-filter-saturate:hover img {
	filter: saturate(100%);
}

/* Dark to Bright */
.mn-filter-brightness img {
	filter: brightness(50%);
}

.mn-filter-brightness:hover img {
	filter: brightness(100%);
}

/* Low to High Contrast */
.mn-filter-contrast img {
	filter: contrast(50%);
}

.mn-filter-contrast:hover img {
	filter: contrast(100%);
}

/* ==========================================================================
   Icon Styles
   ========================================================================== */
.mn-image-or-icon-icon-wrapper {
	display: inline-block;
}

.mn-image-or-icon-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	transition: all 0.3s ease;
}

.mn-image-or-icon-icon i {
	display: inline-block;
	transition: transform 0.3s ease;
}

.mn-image-or-icon-icon svg {
	display: inline-block;
	transition: transform 0.3s ease;
}

/* Icon View - Default */
.mn-view-default .mn-image-or-icon-icon {
	color: #6ec1e4;
}

/* Icon View - Stacked */
.mn-view-stacked .mn-image-or-icon-icon {
	background-color: #6ec1e4;
	color: #fff;
	border-radius: 50%;
}

.mn-shape-square.mn-view-stacked .mn-image-or-icon-icon {
	border-radius: 0;
}

/* Icon View - Framed */
.mn-view-framed .mn-image-or-icon-icon {
	color: #6ec1e4;
	border: 3px solid #6ec1e4;
	background-color: transparent;
	border-radius: 50%;
}

.mn-shape-square.mn-view-framed .mn-image-or-icon-icon {
	border-radius: 0;
}

/* ==========================================================================
   Icon Loop Animations
   ========================================================================== */
/* Pulse */
.mn-icon-loop-pulse {
	animation: mn-icon-pulse 2s ease-in-out infinite;
}

@keyframes mn-icon-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.1); }
}

/* Bounce Up */
.mn-icon-loop-bounce {
	animation: mn-icon-bounce 1s ease infinite;
}

@keyframes mn-icon-bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-10px); }
	60% { transform: translateY(-5px); }
}

/* Bounce Down - Perfect for scroll down arrow indicator */
.mn-icon-loop-bounce-down {
	animation: mn-icon-bounce-down 1.5s ease-in-out infinite;
}

@keyframes mn-icon-bounce-down {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(10px); }
	60% { transform: translateY(5px); }
}

/* Shake */
.mn-icon-loop-shake {
	animation: mn-icon-shake 0.5s ease-in-out infinite;
}

@keyframes mn-icon-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* Rotate */
.mn-icon-loop-rotate {
	animation: mn-icon-rotate 2s linear infinite;
}

@keyframes mn-icon-rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Swing */
.mn-icon-loop-swing {
	animation: mn-icon-swing 1s ease-in-out infinite;
	transform-origin: top center;
}

@keyframes mn-icon-swing {
	0%, 100% { transform: rotate(0deg); }
	25% { transform: rotate(15deg); }
	75% { transform: rotate(-15deg); }
}

/* Flash */
.mn-icon-loop-flash {
	animation: mn-icon-flash 1.5s ease-in-out infinite;
}

@keyframes mn-icon-flash {
	0%, 50%, 100% { opacity: 1; }
	25%, 75% { opacity: 0.3; }
}

/* Push */
.mn-icon-loop-push {
	animation: mn-icon-push 1s ease-in-out infinite;
}

@keyframes mn-icon-push {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(0.9); }
}

/* ==========================================================================
   Icon Hover Animations
   ========================================================================== */
/* Grow */
.mn-icon-hover-grow {
	transition: transform 0.3s ease;
}

.mn-icon-hover-grow:hover {
	transform: scale(1.2);
}

/* Shrink */
.mn-icon-hover-shrink {
	transition: transform 0.3s ease;
}

.mn-icon-hover-shrink:hover {
	transform: scale(0.8);
}

/* Rotate 90 */
.mn-icon-hover-rotate-90 {
	transition: transform 0.3s ease;
}

.mn-icon-hover-rotate-90:hover {
	transform: rotate(90deg);
}

/* Rotate 180 */
.mn-icon-hover-rotate-180 {
	transition: transform 0.3s ease;
}

.mn-icon-hover-rotate-180:hover {
	transform: rotate(180deg);
}

/* Rotate 360 */
.mn-icon-hover-rotate-360 {
	transition: transform 0.5s ease;
}

.mn-icon-hover-rotate-360:hover {
	transform: rotate(360deg);
}

/* Wobble */
.mn-icon-hover-wobble {
	transition: transform 0.3s ease;
}

.mn-icon-hover-wobble:hover {
	animation: mn-icon-wobble 0.5s ease;
}

@keyframes mn-icon-wobble {
	0% { transform: rotate(0deg); }
	25% { transform: rotate(-15deg); }
	50% { transform: rotate(10deg); }
	75% { transform: rotate(-5deg); }
	100% { transform: rotate(0deg); }
}

/* Buzz */
.mn-icon-hover-buzz {
	transition: transform 0.3s ease;
}

.mn-icon-hover-buzz:hover {
	animation: mn-icon-buzz 0.3s linear infinite;
}

@keyframes mn-icon-buzz {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-2px); }
	75% { transform: translateX(2px); }
}

/* Slide Up */
.mn-icon-hover-slide-up {
	transition: transform 0.3s ease;
}

.mn-icon-hover-slide-up:hover {
	transform: translateY(-10px);
}

/* Slide Down */
.mn-icon-hover-slide-down {
	transition: transform 0.3s ease;
}

.mn-icon-hover-slide-down:hover {
	transform: translateY(10px);
}

/* Slide Left */
.mn-icon-hover-slide-left {
	transition: transform 0.3s ease;
}

.mn-icon-hover-slide-left:hover {
	transform: translateX(-10px);
}

/* Slide Right */
.mn-icon-hover-slide-right {
	transition: transform 0.3s ease;
}

.mn-icon-hover-slide-right:hover {
	transform: translateX(10px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
	.mn-image-or-icon-image img {
		max-width: 100%;
	}
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	.mn-image-or-icon-image img,
	.mn-image-or-icon-icon,
	.mn-image-or-icon-icon i,
	.mn-image-or-icon-icon svg {
		transition: none;
	}
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.mn-image-or-icon-icon {
		border-width: 2px;
	}
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
	.mn-image-or-icon-wrapper {
		break-inside: avoid;
	}
	
	.mn-filter-grayscale img,
	.mn-filter-blur img,
	.mn-filter-sepia img,
	.mn-filter-saturate img,
	.mn-filter-brightness img,
	.mn-filter-contrast img {
		filter: none;
	}
}
