/* auth-notifications.css - สไตล์สำหรับข้อความแจ้งเตือนระบบ authentication */

.auth-notification {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	max-width: 400px;
	padding: 15px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transform: translateX(100%);
	transition: transform 0.3s ease-in-out;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.auth-notification.show {
	transform: translateX(0);
}

.auth-notification.success {
	background: linear-gradient(135deg, #4caf50, #45a049);
	color: white;
	border-left: 4px solid #2e7d32;
}

.auth-notification.error {
	background: linear-gradient(135deg, #f44336, #d32f2f);
	color: white;
	border-left: 4px solid #c62828;
}

.auth-notification.warning {
	background: linear-gradient(135deg, #ff9800, #f57c00);
	color: white;
	border-left: 4px solid #e65100;
}

.auth-notification.info {
	background: linear-gradient(135deg, #2196f3, #1976d2);
	color: white;
	border-left: 4px solid #1565c0;
}

.auth-notification .notification-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.auth-notification .notification-title {
	font-weight: 600;
	font-size: 16px;
}

.auth-notification .notification-close {
	background: none;
	border: none;
	color: white;
	font-size: 18px;
	cursor: pointer;
	opacity: 0.8;
	transition: opacity 0.2s;
}

.auth-notification .notification-close:hover {
	opacity: 1;
}

.auth-notification .notification-message {
	margin: 0;
}

/* Loading spinner สำหรับ login */
.login-loading {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #fff;
	animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Session timeout warning */
.session-timeout-warning {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 9998;
	background: linear-gradient(135deg, #ff9800, #f57c00);
	color: white;
	padding: 12px 16px;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	font-size: 13px;
	transform: translateY(100%);
	transition: transform 0.3s ease-in-out;
}

.session-timeout-warning.show {
	transform: translateY(0);
}

/* Authentication required overlay */
.auth-required-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(5px);
}

.auth-required-modal {
	background: white;
	padding: 30px;
	border-radius: 12px;
	text-align: center;
	max-width: 400px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-required-modal h3 {
	color: #333;
	margin-bottom: 15px;
}

.auth-required-modal p {
	color: #666;
	margin-bottom: 20px;
}

.auth-required-modal .btn {
	margin: 0 10px;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s;
}

.auth-required-modal .btn-primary {
	background: #2196f3;
	color: white;
	border: none;
}

.auth-required-modal .btn-primary:hover {
	background: #1976d2;
	transform: translateY(-2px);
}

.auth-required-modal .btn-secondary {
	background: #f5f5f5;
	color: #333;
	border: 1px solid #ddd;
}

.auth-required-modal .btn-secondary:hover {
	background: #e0e0e0;
}

/* Responsive design */
@media (max-width: 768px) {
	.auth-notification {
		top: 10px;
		right: 10px;
		left: 10px;
		max-width: none;
		transform: translateY(-100%);
	}

	.auth-notification.show {
		transform: translateY(0);
	}

	.session-timeout-warning {
		bottom: 10px;
		left: 10px;
		right: 10px;
	}

	.auth-required-modal {
		margin: 20px;
		padding: 20px;
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	.auth-required-modal {
		background: #2d3748;
		color: white;
	}

	.auth-required-modal h3 {
		color: white;
	}

	.auth-required-modal p {
		color: #cbd5e0;
	}

	.auth-required-modal .btn-secondary {
		background: #4a5568;
		color: white;
		border-color: #718096;
	}

	.auth-required-modal .btn-secondary:hover {
		background: #2d3748;
	}
}
