/**
 * ULearn Minimal Notification System (Toast & Modal Dialogs)
 * Zero external dependencies. Ultra-clean, modern minimalist aesthetic.
 */

/* Toast Container */
.ulearn-notify-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
	max-width: 380px;
	width: calc(100vw - 48px);
}

/* Toast Card */
.ulearn-toast {
	pointer-events: auto;
	background: #0f172a;
	color: #ffffff;
	border-radius: 12px;
	padding: 14px 18px;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	opacity: 0;
	transform: translateY(16px) scale(0.96);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.ulearn-toast.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.ulearn-toast.is-leaving {
	opacity: 0;
	transform: translateY(8px) scale(0.96);
}

/* Toast Icon */
.ulearn-toast-icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 16px;
}

.ulearn-toast-success .ulearn-toast-icon { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.ulearn-toast-error .ulearn-toast-icon   { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.ulearn-toast-warning .ulearn-toast-icon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.ulearn-toast-info .ulearn-toast-icon    { background: rgba(99, 102, 241, 0.2); color: #818cf8; }

.ulearn-toast-body {
	flex: 1;
}

.ulearn-toast-close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	padding: 4px;
	margin: -4px -4px -4px 0;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s, background 0.15s;
}

.ulearn-toast-close:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.1);
}

/* Modal Backdrop */
.ulearn-dialog-backdrop {
	position: fixed;
	inset: 0;
	z-index: 999998;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ulearn-dialog-backdrop.is-visible {
	opacity: 1;
}

/* Modal Card */
.ulearn-dialog-card {
	background: #ffffff;
	border-radius: 16px;
	padding: 28px;
	max-width: 420px;
	width: 100%;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	border: 1px solid #f1f5f9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
	text-align: center;
	transform: scale(0.95);
	transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ulearn-dialog-backdrop.is-visible .ulearn-dialog-card {
	transform: scale(1);
}

.ulearn-dialog-icon {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
	font-size: 26px;
}

.ulearn-dialog-icon.is-info    { background: #e0e7ff; color: #4f46e5; }
.ulearn-dialog-icon.is-success { background: #dcfce7; color: #16a34a; }
.ulearn-dialog-icon.is-warning { background: #fef3c7; color: #d97706; }
.ulearn-dialog-icon.is-danger  { background: #fee2e2; color: #dc2626; }

.ulearn-dialog-title {
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 8px;
}

.ulearn-dialog-message {
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
	margin: 0 0 24px;
	white-space: pre-line;
}

.ulearn-dialog-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}

.ulearn-dialog-btn {
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.15s ease;
	flex: 1;
}

.ulearn-dialog-btn-primary {
	background: var(--ulearn-primary, #4f46e5);
	color: #ffffff;
}

.ulearn-dialog-btn-primary:hover {
	background: var(--ulearn-primary-hover, #4338ca);
}

.ulearn-dialog-btn-danger {
	background: #ef4444;
	color: #ffffff;
}

.ulearn-dialog-btn-danger:hover {
	background: #dc2626;
}

.ulearn-dialog-btn-secondary {
	background: #f1f5f9;
	color: #475569;
	border-color: #e2e8f0;
}

.ulearn-dialog-btn-secondary:hover {
	background: #e2e8f0;
	color: #1e293b;
}

