/**
 * Global Popup CSS for CareMaker X Donaus
 * ระบบ popup แบบง่ายที่ใช้งานได้ในทุกหน้า
 */

/* Global Popup Overlay */
.global-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	backdrop-filter: blur(3px);
}

.global-popup-overlay.show {
	opacity: 1;
	visibility: visible;
}

/* Global Popup Container */
.global-popup-container {
	background: white;
	border-radius: 15px;
	padding: 0;
	max-width: 350px;
	width: 90%;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
	transform: scale(0.8) translateY(-20px);
	transition: all 0.3s ease;
	overflow: hidden;
	border: 1px solid #e9ecef;
}

.global-popup-overlay.show .global-popup-container {
	transform: scale(1) translateY(0);
}

/* Global Popup Content */
.global-popup-content {
	padding: 25px;
	text-align: center;
}

/* Global Popup Icon */
.global-popup-icon {
	font-size: 2.5rem;
	margin-bottom: 15px;
	display: flex;
	justify-content: center;
}

.global-popup-icon i {
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
}

/* Global Popup Message */
.global-popup-message {
	margin: 0 0 20px 0;
	font-size: 1rem;
	color: #344767;
	line-height: 1.5;
	font-weight: 500;
}

/* Global Popup Buttons */
.global-popup-buttons {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 20px;
}

.global-popup-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	min-width: 80px;
	font-size: 0.9rem;
}

.global-popup-btn.primary {
	background: linear-gradient(135deg, #008fd5, #4db3e8);
	color: white;
}

.global-popup-btn.primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0, 143, 213, 0.3);
}

.global-popup-btn.secondary {
	background: #f8f9fa;
	color: #6c757d;
	border: 1px solid #dee2e6;
}

.global-popup-btn.secondary:hover {
	background: #e9ecef;
	transform: translateY(-2px);
}

/* Animation */
@keyframes globalPopupSlideIn {
	from {
		opacity: 0;
		transform: scale(0.8) translateY(-30px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.global-popup-overlay.show .global-popup-container {
	animation: globalPopupSlideIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 480px) {
	.global-popup-container {
		width: 95%;
		max-width: 300px;
	}

	.global-popup-content {
		padding: 20px;
	}

	.global-popup-icon {
		font-size: 2rem;
	}

	.global-popup-icon i {
		width: 50px;
		height: 50px;
	}

	.global-popup-message {
		font-size: 0.9rem;
	}

	.global-popup-buttons {
		flex-direction: column;
		gap: 8px;
	}

	.global-popup-btn {
		width: 100%;
		padding: 12px 20px;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.global-popup-container {
		background: #2d3748;
		border-color: rgba(255, 255, 255, 0.1);
	}

	.global-popup-message {
		color: #e2e8f0;
	}

	.global-popup-btn.secondary {
		background: #4a5568;
		color: #e2e8f0;
		border-color: #718096;
	}

	.global-popup-btn.secondary:hover {
		background: #2d3748;
	}

	.global-popup-icon i {
		background: rgba(255, 255, 255, 0.1);
	}
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
	.global-popup-container {
		border: 2px solid #000;
	}

	.global-popup-btn {
		border: 2px solid #000;
	}
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.global-popup-overlay,
	.global-popup-container,
	.global-popup-btn {
		transition: none;
	}

	.global-popup-overlay.show .global-popup-container {
		animation: none;
	}
}
