/* Estilos generales */
:root {
    --toast-success-bg: #4caf50;
    --toast-info-bg: #2196F3;
    --toast-warning-bg: #ff9800;
    --toast-error-bg: #f44336;
    --toast-normal-bg: #333;
    --toast-text: #ffffff;
    --toast-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --toast-radius: 4px;
}

/* Contenedor principal de notificaciones */
.toast-container {
    position: fixed;
    z-index: 9999; /* Valor alto para que aparezca sobre modales */
    display: flex;
    flex-direction: column;
    max-width: 350px;
    padding: 12px;
    box-sizing: border-box;
    pointer-events: none; /* Evita que bloquee interacciones */
}

/* Posicionamiento de los contenedores */
.toast-container.top-right {
    top: 0;
    right: 0;
}

.toast-container.top-left {
    top: 0;
    left: 0;
}

.toast-container.top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.bottom-right {
    bottom: 0;
    right: 0;
}

.toast-container.bottom-left {
    bottom: 0;
    left: 0;
}

.toast-container.bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Estilos de las notificaciones individuales */
.toast {
    display: flex;
    align-items: center;
    min-width: 250px;
    margin: 6px 0;
    padding: 12px 15px;
    border-radius: var(--toast-radius);
    box-shadow: var(--toast-shadow);
    color: var(--toast-text);
    opacity: 0;
    pointer-events: auto; /* Habilita interacciones con la notificación */
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: var(--toast-success-bg);
}

.toast.info {
    background-color: var(--toast-info-bg);
}

.toast.warning {
    background-color: var(--toast-warning-bg);
}

.toast.error {
    background-color: var(--toast-error-bg);
}

.toast.normal {
    background-color: var(--toast-normal-bg);
}

/* Contenido de la notificación */
.toast-content {
    flex: 1;
    margin-right: 10px;
}

.toast-title {
    font-weight: bold;
    margin-bottom: 3px;
}

.toast-message {
    word-break: break-word;
}

/* Botón de cierre */
.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* Icono de la notificación */
.toast-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Diseño para móviles */
@media (max-width: 480px) {
    .toast-container {
        width: 100%;
        max-width: 100%;
        padding: 8px;
    }

    .toast {
        width: 100%;
        min-width: auto;
    }
}