/* Flash Modal Styles */
.flash-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.flash-modal.show {
	display: flex;
	animation: flashModalFadeIn 0.3s ease-out;
}

.flash-modal-content {
	background: white;
	border-radius: 12px;
	padding: 0;
	max-width: 500px;
	width: 90%;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	animation: flashModalSlideIn 0.3s ease-out;
	overflow: hidden;
	position: relative;
}

.flash-modal-header {
	padding: 1.5rem 2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	border-bottom: 1px solid #e0e0e0;
}

.flash-modal-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: bold;
	font-size: 14px;
	flex-shrink: 0;
}

.flash-modal-icon.success {
	background: #4CAF50;
}

.flash-modal-icon.error {
	background: #f44336;
}

.flash-modal-icon.warning {
	background: #FF9800;
}

.flash-modal-icon.info {
	background: #2196F3;
}

.flash-modal-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-dark);
	margin: 0;
	flex: 1;
}

.flash-modal-close {
	background: none;
	border: none;
	font-size: 20px;
	color: var(--text-muted);
	cursor: pointer;
	padding: 0.5rem;
	border-radius: 4px;
	transition: all 0.2s ease;
	line-height: 1;
}

.flash-modal-close:hover {
	background: #f5f5f5;
	color: var(--text-dark);
}

.flash-modal-body {
	padding: 1.5rem 2rem;
}

.flash-modal-message {
	color: var(--text-dark);
	line-height: 1.5;
	margin: 0;
	font-size: 0.95rem;
}

.flash-modal-footer {
	padding: 1rem 2rem 1.5rem;
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
}

.flash-modal-btn {
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 80px;
}

.flash-modal-btn.primary {
	background: var(--primary-color);
	color: white;
}

.flash-modal-btn.primary:hover {
	background: var(--primary-dark);
	transform: translateY(-1px);
}

.flash-modal-btn.secondary {
	background: #6c757d;
	color: white;
}

.flash-modal-btn.secondary:hover {
	background: #5a6268;
	transform: translateY(-1px);
}

/* Auto-dismiss flash messages (toast-style) */
.flash-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 10000;
	max-width: 400px;
	width: auto;
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	border-left: 4px solid #4CAF50;
	display: none;
	animation: flashToastSlideIn 0.3s ease-out;
}

.flash-toast.show {
	display: block;
}

.flash-toast.success {
	border-left-color: #4CAF50;
}

.flash-toast.error {
	border-left-color: #f44336;
}

.flash-toast.warning {
	border-left-color: #FF9800;
}

.flash-toast.info {
	border-left-color: #2196F3;
}

.flash-toast-content {
	padding: 1rem 1.5rem;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.flash-toast-icon {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 12px;
	font-weight: bold;
	flex-shrink: 0;
	margin-top: 1px;
}

.flash-toast-message {
	flex: 1;
	color: var(--text-dark);
	font-size: 0.9rem;
	line-height: 1.4;
}

.flash-toast-close {
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 16px;
	padding: 0;
	line-height: 1;
	margin-left: 0.5rem;
}

.flash-toast-close:hover {
	color: var(--text-dark);
}

/* Animations */
@keyframes flashModalFadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes flashModalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes flashToastSlideIn {
	from {
		opacity: 0;
		transform: translateX(100%);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes flashToastSlideOut {
	from {
		opacity: 1;
		transform: translateX(0);
	}

	to {
		opacity: 0;
		transform: translateX(100%);
	}
}

/* Responsive Design */
@media (max-width: 768px) {
	.flash-modal-content {
		width: 95%;
		margin: 1rem;
	}

	.flash-modal-header,
	.flash-modal-body,
	.flash-modal-footer {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}

	.flash-toast {
		top: 10px;
		right: 10px;
		left: 10px;
		max-width: none;
	}

	.flash-toast-content {
		padding: 0.875rem 1.25rem;
	}
}

/* Stack multiple toasts */
.flash-toast:nth-child(2) {
	top: 90px;
}

.flash-toast:nth-child(3) {
	top: 160px;
}

.flash-toast:nth-child(4) {
	top: 230px;
}

/* Progressive opacity for stacked toasts */
.flash-toast:nth-child(2) {
	opacity: 0.9;
}

.flash-toast:nth-child(3) {
	opacity: 0.8;
}

.flash-toast:nth-child(4) {
	opacity: 0.7;
}