/**
 * Flip Image Widget Styles (Single Image with Flip)
 *
 * @package Dove Agency
 * @since 1.0.0
 */

/* Image Container */
.dove-single-flip-container {
	position: relative;
	perspective: 1000px;
	width: 100%;
	line-height: 0;
}

.dove-single-flip-inner {
	position: relative;
	width: 100%;
	transform-style: preserve-3d;
	transition: transform 0.6s ease;
}

.dove-single-flip-container.show-back .dove-single-flip-inner {
	transform: rotateY(180deg);
}

/* Image Sides */
.dove-single-flip-side {
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	width: 100%;
}

.dove-single-flip-side img {
	width: 100%;
	height: auto;
	display: block;
}

.dove-single-flip-front {
	position: relative;
	z-index: 2;
	transform: rotateY(0deg);
}

.dove-single-flip-back {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform: rotateY(180deg);
}

.dove-single-flip-back img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Back HTML Content */
.dove-single-flip-back-html-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	overflow-y: auto;
	box-sizing: border-box;
}

.dove-single-flip-back-html-content.has-background-image {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.dove-single-flip-back-html-content.has-background-image::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ffffff;
	opacity: 0.9;
	z-index: 0;
	pointer-events: none;
}

.dove-single-flip-back-html-content > * {
	position: relative;
	z-index: 1;
}

.dove-single-flip-back-html-content > *:first-child {
	margin-top: 0;
}

.dove-single-flip-back-html-content > *:last-child {
	margin-bottom: 0;
}

/* Back Template Content */
.dove-single-flip-back-template-content {
	width: 100%;
	height: 100%;
	overflow-y: auto;
	box-sizing: border-box;
}

/* Rotate Button */
.dove-single-flip-rotate-btn, .dove-single-flip-rotate-btn:focus {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	aspect-ratio: 1/1;
	padding:0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 100;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dove-single-flip-rotate-btn img{
	width:40px !important;
	height:40px !important;
}

.dove-single-flip-rotate-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	background: rgba(255, 255, 255, 1);
}

.dove-single-flip-rotate-btn:active {
	transform: scale(0.95);
}

.dove-single-flip-rotate-btn svg {
	width: 24px;
	height: 24px;
	color: #000000;
}

/* Prevent interaction during flip */
.dove-single-flip-container.flipping {
	pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
	.dove-single-flip-rotate-btn {
		width: 45px;
		height: 45px;
		top: 15px;
		right: 15px;
	}
	
	.dove-single-flip-rotate-btn svg {
		width: 20px;
		height: 20px;
	}
}

@media (max-width: 480px) {
	.dove-single-flip-rotate-btn {
		width: 40px;
		height: 40px;
		top: 12px;
		right: 12px;
	}
	
	.dove-single-flip-rotate-btn svg {
		width: 18px;
		height: 18px;
	}
}
