/**
 * DDL Toast System — sistema de notificaciones branded.
 * Paleta: cream (#E1DAD3), brown (#6B5B4E), orange (#FF5500).
 */

#ddl-toast-container {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	pointer-events: none;
	width: auto;
	max-width: 92vw;
}

.ddl-toast {
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 280px;
	max-width: 480px;
	padding: 14px 36px 14px 14px;
	border-radius: 14px;
	background: #F8F4EF;
	color: #3D2E24;
	box-shadow: 0 8px 24px rgba(61, 46, 36, 0.18), 0 2px 6px rgba(61, 46, 36, 0.08);
	border: 1px solid rgba(107, 91, 78, 0.15);
	font-family: inherit;
	opacity: 0;
	transform: translateY(-12px) scale(0.96);
	transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2);
	cursor: pointer;
	position: relative;
}

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

.ddl-toast.is-leaving {
	opacity: 0;
	transform: translateY(-10px) scale(0.95);
}

.ddl-toast__icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	background: #6B5B4E;
	color: #F8F4EF;
	font-weight: 700;
}

.ddl-toast__body {
	flex: 1;
	min-width: 0;
}

.ddl-toast__title {
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-style: italic;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 2px 0;
	color: #3D2E24;
}

.ddl-toast__message {
	font-size: 13px;
	line-height: 1.4;
	color: #6B5B4E;
	margin: 0;
}

.ddl-toast__close {
	position: absolute;
	top: 6px;
	right: 8px;
	background: transparent;
	border: none;
	color: #6B5B4E;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 4px;
	opacity: 0.5;
	transition: opacity 0.2s ease;
}

.ddl-toast__close:hover {
	opacity: 1;
	background: rgba(107, 91, 78, 0.1);
}

/* Variantes por tipo — el color lo comunica el icono y el fondo sutil */
.ddl-toast--info .ddl-toast__icon {
	background: #6B5B4E;
}

.ddl-toast--success {
	background: #F4F7F0;
}
.ddl-toast--success .ddl-toast__icon {
	background: #7B9D6F;
}

.ddl-toast--warning {
	background: #FDF7EC;
}
.ddl-toast--warning .ddl-toast__icon {
	background: #E6A555;
}

.ddl-toast--error {
	background: #FBF0EF;
}
.ddl-toast--error .ddl-toast__icon {
	background: #C85450;
}

.ddl-toast--progress {
	background: #FCF2EC;
}
.ddl-toast--progress .ddl-toast__icon {
	background: #FF5500;
}

.ddl-toast--progress .ddl-toast__icon {
	animation: ddl-toast-pulse 1.4s ease-in-out infinite;
}

@keyframes ddl-toast-pulse {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.1); }
}

/* Accesibilidad: respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.ddl-toast,
	.ddl-toast--progress .ddl-toast__icon {
		transition: opacity 0.15s ease;
		animation: none;
	}
}

/* Móvil: ocupar casi todo el ancho del viewport */
@media (max-width: 600px) {
	#ddl-toast-container {
		top: 10px;
		left: 2.5vw;
		right: 2.5vw;
		transform: none;
		width: 95vw;
		max-width: 95vw;
	}
	.ddl-toast {
		min-width: 0;
		width: 100%;
		max-width: 100%;
		padding: 14px 40px 14px 14px;
		box-sizing: border-box;
	}
	.ddl-toast__title {
		font-size: 15px;
	}
	.ddl-toast__message {
		font-size: 13px;
	}
}
