/**
 * Device Preview Floating Icon - Styles
 */

/* ========================================
   FLOATING BUTTON
======================================== */
.pretpot-device-preview-wrapper {
	position: fixed;
	z-index: 9999;
}

/* Position Classes */
.pretpot-position-top-left {
	top: 30px;
	left: 30px;
}

.pretpot-position-top-right {
	top: 30px;
	right: 30px;
}

.pretpot-position-bottom-left {
	bottom: 30px;
	left: 30px;
}

.pretpot-position-bottom-right {
	bottom: 30px;
	right: 30px;
}

/* Button */
.pretpot-device-preview-btn {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	background-color: #0073e6;
	color: #ffffff;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}

.pretpot-device-preview-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 115, 230, 0.4);
}

.pretpot-device-preview-btn:active {
	transform: scale(0.95);
}

.pretpot-device-preview-btn i,
.pretpot-device-preview-btn svg {
	width: 26px;
	height: 26px;
}

/* Pulse Ring Animation */
.pretpot-pulse-ring::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 2px solid rgba(0, 115, 230, 0.6);
	opacity: 0;
	animation: pretpot-pulse 2s infinite;
}

@keyframes pretpot-pulse {
	0% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 1;
	}
	100% {
		transform: translate(-50%, -50%) scale(1.5);
		opacity: 0;
	}
}

/* ========================================
   MODAL OVERLAY
======================================== */
.pretpot-device-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.pretpot-device-modal-overlay.active {
	opacity: 1;
}

/* Modal Content */
.pretpot-device-modal-content {
	background: #ffffff;
	border-radius: 20px;
	max-width: 95%;
	max-height: 90vh;
	padding: 40px 30px 30px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	position: relative;
	transform: scale(0.9);
	opacity: 0;
	transition: all 0.3s ease;
}

.pretpot-device-modal-overlay.active .pretpot-device-modal-content {
	transform: scale(1);
	opacity: 1;
}

/* Close Button */
.pretpot-device-modal-close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 40px;
	height: 40px;
	border: none;
	background: rgba(0, 0, 0, 0.1);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	z-index: 10;
}

.pretpot-device-modal-close:hover {
	background: rgba(0, 0, 0, 0.2);
	transform: rotate(90deg);
}

.pretpot-device-modal-close svg {
	color: #333;
}

/* ========================================
   DEVICE SWITCHER TABS
======================================== */
.pretpot-device-switcher {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.pretpot-device-tab {
	padding: 10px 20px;
	border: 2px solid #e0e0e0;
	background: #ffffff;
	border-radius: 25px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #666;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.pretpot-device-tab:hover {
	border-color: #0073e6;
	color: #0073e6;
}

.pretpot-device-tab.active {
	background: #0073e6;
	border-color: #0073e6;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
}

/* ========================================
   DEVICE CONTAINER
======================================== */
.pretpot-device-container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
}

.pretpot-device-frame {
	display: none;
	position: relative;
	transition: all 0.4s ease;
}

.pretpot-device-frame.active {
	display: block;
	animation: pretpot-device-fadein 0.4s ease;
}

@keyframes pretpot-device-fadein {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* ========================================
   DEVICE FRAMES - DESKTOP
======================================== */
.pretpot-device-desktop .pretpot-device-screen {
	width: 900px;
	max-width: 85vw;
	height: 550px;
	max-height: 65vh;
	background: #1a1a1a;
	border-radius: 12px;
	padding: 10px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	position: relative;
	overflow: hidden;
}

.pretpot-device-desktop .pretpot-device-screen::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 35px;
	background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
	border-radius: 12px 12px 0 0;
	z-index: 1;
}

.pretpot-device-desktop .pretpot-device-screen::after {
	content: '⚫ ⚫ ⚫';
	position: absolute;
	top: 12px;
	left: 15px;
	font-size: 10px;
	color: #666;
	z-index: 2;
	letter-spacing: 3px;
}

/* ========================================
   DEVICE FRAMES - TABLET
======================================== */
.pretpot-device-tablet .pretpot-device-screen {
	width: 600px;
	max-width: 80vw;
	height: 480px;
	max-height: 60vh;
	background: #1a1a1a;
	border-radius: 20px;
	padding: 15px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	position: relative;
	overflow: hidden;
}

.pretpot-device-tablet .pretpot-device-screen::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 4px;
	background: #333;
	border-radius: 2px;
	z-index: 2;
}

/* ========================================
   DEVICE FRAMES - MOBILE
======================================== */
.pretpot-device-mobile .pretpot-device-screen {
	width: 340px;
	max-width: 90vw;
	height: 620px;
	max-height: 70vh;
	background: #1a1a1a;
	border-radius: 30px;
	padding: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	position: relative;
	overflow: hidden;
}

.pretpot-device-mobile .pretpot-device-screen::before {
	content: '';
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 50px;
	height: 4px;
	background: #333;
	border-radius: 2px;
	z-index: 2;
}

.pretpot-device-mobile .pretpot-device-screen::after {
	content: '';
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 100px;
	height: 4px;
	background: #333;
	border-radius: 2px;
	z-index: 2;
}

/* ========================================
   SCREENSHOT STYLES
======================================== */
.pretpot-screenshot {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
	object-fit: cover;
	object-position: top center;
	max-height: 100%;
}

/* Desktop Screenshot Container */
.pretpot-device-desktop .pretpot-device-screen .pretpot-screenshot {
	position: absolute;
	top: 45px;
	left: 10px;
	width: calc(100% - 20px);
	height: calc(100% - 55px);
	border-radius: 6px;
}

/* Tablet Screenshot Container */
.pretpot-device-tablet .pretpot-device-screen .pretpot-screenshot {
	position: absolute;
	top: 20px;
	left: 15px;
	width: calc(100% - 30px);
	height: calc(100% - 30px);
	border-radius: 10px;
}

/* Mobile Screenshot Container */
.pretpot-device-mobile .pretpot-device-screen .pretpot-screenshot {
	position: absolute;
	top: 20px;
	left: 12px;
	width: calc(100% - 24px);
	height: calc(100% - 32px);
	border-radius: 18px;
}

/* ========================================
   SCROLL ANIMATION
======================================== */
.pretpot-scroll-animate {
	animation: pretpot-scroll-animation 15s linear infinite;
}

@keyframes pretpot-scroll-animation {
	0% {
		object-position: top center;
	}
	50% {
		object-position: bottom center;
	}
	100% {
		object-position: top center;
	}
}

/* Pause on Hover */
.pretpot-device-screen:hover .pretpot-scroll-animate {
	animation-play-state: paused;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
	.pretpot-device-preview-btn {
		width: 50px;
		height: 50px;
		font-size: 20px;
	}
	
	.pretpot-position-top-left,
	.pretpot-position-top-right,
	.pretpot-position-bottom-left,
	.pretpot-position-bottom-right {
		top: auto;
		left: auto;
		right: auto;
		bottom: 20px;
	}
	
	.pretpot-position-bottom-right {
		right: 20px;
	}
	
	.pretpot-device-modal-content {
		padding: 30px 15px 15px;
		border-radius: 15px;
	}
	
	.pretpot-device-switcher {
		gap: 8px;
		margin-bottom: 20px;
	}
	
	.pretpot-device-tab {
		padding: 8px 15px;
		font-size: 12px;
	}
	
	.pretpot-device-desktop .pretpot-device-screen {
		max-width: 95vw;
		max-height: 55vh;
	}
	
	.pretpot-device-tablet .pretpot-device-screen {
		max-width: 90vw;
		max-height: 60vh;
	}
	
	.pretpot-device-mobile .pretpot-device-screen {
		max-width: 85vw;
		max-height: 65vh;
	}
}

@media (max-width: 480px) {
	.pretpot-device-modal-overlay {
		padding: 10px;
	}
	
	.pretpot-device-tab {
		padding: 6px 12px;
		font-size: 11px;
	}
}

/* ========================================
   ACCESSIBILITY
======================================== */
.pretpot-device-preview-btn:focus,
.pretpot-device-modal-close:focus,
.pretpot-device-tab:focus {
	outline: 2px solid #0073e6;
	outline-offset: 2px;
}

.pretpot-device-modal-overlay[aria-hidden="true"] {
	display: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.pretpot-pulse-ring::before {
		animation: none;
	}
	
	.pretpot-scroll-animate {
		animation: none;
	}
	
	.pretpot-device-preview-btn,
	.pretpot-device-modal-close,
	.pretpot-device-tab,
	.pretpot-device-frame {
		transition: none;
	}
}