/**
 * Public-facing styles for RD Popovers plugin.
 * All classes prefixed with 'spt-' to avoid conflicts.
 *
 * @package    Rd_Popovers
 * @subpackage Rd_Popovers/public/css
 */

.spt-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.75);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	padding: 20px;
	box-sizing: border-box;
}

.spt-popup-overlay.spt-active {
	opacity: 1;
	visibility: visible;
}

.spt-popup-container {
	position: relative;
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.spt-popup-overlay.spt-active .spt-popup-container {
	transform: scale(1);
}

.spt-popup-content {
	position: relative;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	overflow: hidden;
}

.spt-popup-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: rgba(0, 0, 0, 0.1);
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
	transition: background-color 0.2s ease, transform 0.2s ease;
	z-index: 10;
	padding: 0;
}

.spt-popup-close:hover {
	background: rgba(0, 0, 0, 0.2);
	transform: scale(1.1);
}

.spt-popup-close:focus {
	outline: 2px solid #0066cc;
	outline-offset: 2px;
}

.spt-popup-close svg {
	width: 20px;
	height: 20px;
}

.spt-popup-inner {
	padding: 40px 30px 30px;
	max-height: calc(90vh - 40px);
	overflow-y: auto;
	overflow-x: hidden;
}

.spt-popup-inner::-webkit-scrollbar {
	width: 8px;
}

.spt-popup-inner::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.spt-popup-inner::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.spt-popup-inner::-webkit-scrollbar-thumb:hover {
	background: #555;
}

@media (max-width: 768px) {
	.spt-popup-overlay {
		padding: 15px;
	}

	.spt-popup-container {
		max-width: 100%;
	}

	.spt-popup-inner {
		padding: 35px 20px 20px;
	}

	.spt-popup-close {
		top: 10px;
		right: 10px;
		width: 32px;
		height: 32px;
	}
}

.spt-popup-overlay.spt-active .spt-popup-inner > * {
	animation: spt-fadeInUp 0.4s ease 0.1s backwards;
}

@keyframes spt-fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
